summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns/hns_enet.h
diff options
context:
space:
mode:
authorDaniil Maximov <daniil31415it@gmail.com>2023-12-04 11:58:10 +0300
committerPaolo Abeni <pabeni@redhat.com>2023-12-06 11:26:46 +0100
commitcbe860be36095e68e4e5561ab43610982fb429fd (patch)
treeab935381d621f24d6088f6a1e356d5e6bd7b2ea9 /drivers/net/ethernet/hisilicon/hns/hns_enet.h
parent7037d95a047cd89b1f680eed253c6ab586bef1ed (diff)
net: atlantic: Fix NULL dereference of skb pointer in
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: 26efaef759a1 ("net: atlantic: Implement xdp data plane") Signed-off-by: Daniil Maximov <daniil31415it@gmail.com> Reviewed-by: Igor Russkikh <irusskikh@marvell.com> Link: https://lore.kernel.org/r/20231204085810.1681386-1-daniil31415it@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_enet.h')
0 files changed, 0 insertions, 0 deletions