Skip to content
Commit 87559196 authored by Daniil Maximov's avatar Daniil Maximov Committed by Greg Kroah-Hartman
Browse files

net: atlantic: Fix NULL dereference of skb pointer in

[ Upstream commit cbe860be ]

If is_ptp_ring == true in the loop of __aq_ring_xdp_clean function,
then a timestamp is stored from a packet in a field of skb object,
which is not allocated at the moment of the call (skb == NULL).

Generalize aq_ptp_extract_ts and other affected functions so they don't
work with struct sk_buff*, but with struct skb_shared_hwtstamps*.

Found by Linux Verification Center (linuxtesting.org) with SVACE

Fixes: 26efaef7

 ("net: atlantic: Implement xdp data plane")
Signed-off-by: default avatarDaniil Maximov <daniil31415it@gmail.com>
Reviewed-by: default avatarIgor Russkikh <irusskikh@marvell.com>
Link: https://lore.kernel.org/r/20231204085810.1681386b

-1-daniil31415it@gmail.com
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 64c78c57
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment