[lvc-project] [PATCH v2] xen-netfront: handle NULL returned by xdp_convert_buff_to_frame()
Fedor Pchelkin
pchelkin at ispras.ru
Tue Apr 22 14:23:45 MSK 2025
On Thu, 17. Apr 12:21, Alexey Nepomnyashih wrote:
> The function xdp_convert_buff_to_frame() may return NULL if it fails
> to correctly convert the XDP buffer into an XDP frame due to memory
> constraints, internal errors, or invalid data. Failing to check for NULL
> may lead to a NULL pointer dereference if the result is used later in
> processing, potentially causing crashes, data corruption, or undefined
> behavior.
>
> On XDP redirect failure, the associated page must be released explicitly
> if it was previously retained via get_page(). Failing to do so may result
> in a memory leak, as the pages reference count is not decremented.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Cc: stable at vger.kernel.org # v5.9+
> Fixes: 6c5aa6fc4def ("xen networking: add basic XDP support for xen-netfront")
> Signed-off-by: Alexey Nepomnyashih <sdl at nppct.ru>
> ---
Просьба выслать версию патча под 5.10 в lvc-patches. Спасибо!
More information about the lvc-project
mailing list