[lvc-project] [PATCH 5.10] gpu/i915: fix error return in mmap_offset_attach()

Александр C alsp705 at gmail.com
Wed Sep 24 14:31:46 MSK 2025


Hi Krzysztof Karas,

Ignored (unchecked) return values from functions that can fail.
While a single unchecked return may look harmless, in aggregate they create
a broad
attack surface — a latent, easily-exploitable category of vulnerabilities
that can lead to data corruption,
denial-of-service, or privilege escalation when error conditions are hit in
the field.

Counter example:  /drivers/gpu/drm/drm_prime.c:748:
ret = drm_vma_node_allow(&obj->vma_node, priv);
    if (ret)
        goto out;

Counter example:  /drivers/gpu/drm/drm_gem.c:387:
ret = drm_vma_node_allow(&obj->vma_node, file_priv);
    if (ret)
        goto err_remove;

Best Regards,
Alexandr

вт, 23 сент. 2025 г. в 12:07, Krzysztof Karas <krzysztof.karas at intel.com>:

> Hi Alexandr,
>
> > Return value of function 'drm_vma_node_allow', called
> > at i915_gem_mman.c:670, is not checked, but it is usually
> > checked for this function
> Grepping for this function in the repo tells me this is currently
> the only place we call it. I'd rephrase the commit message to focus
> only on missing return code.
>
> After that:
> Reviewed-by: Krzysztof Karas <krzysztof.karas at intel.com>
> --
> Best Regards,
> Krzysztof
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxtesting.org/pipermail/lvc-project/attachments/20250924/422dafeb/attachment.html>


More information about the lvc-project mailing list