[lvc-project] [PATCH] liquidio: Fix potential null pointer dereference
Simon Horman
horms at kernel.org
Fri Mar 8 23:19:11 MSK 2024
On Thu, Mar 07, 2024 at 12:29:32PM +0300, Aleksandr Mishin wrote:
> In lio_vf_rep_copy_packet() pg_info->page is compared to a NULL value,
> but then it is unconditionally passed to skb_add_rx_frag() which could
> lead to null pointer dereference.
> Fix this bug by moving skb_add_rx_frag() into conditional scope.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 1f233f327913 (liquidio: switchdev support for LiquidIO NIC)
A correct format for the tag above is:
Fixes: 1f233f327913 ("liquidio: switchdev support for LiquidIO NIC")
> Signed-off-by: Aleksandr Mishin <amishin at t-argos.ru>
I guess this code is never hit.
But I agree this should be fixed.
Reviewed-by: Simon Horman <horms at kernel.org>
More information about the lvc-project
mailing list