]> git.baikalelectronics.ru Git - kernel.git/commit
net: lantiq_xrx200: fix use after free bug
authorAleksander Jan Bajkowski <olek2@wp.pl>
Sat, 5 Mar 2022 11:20:39 +0000 (12:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Mar 2022 11:29:35 +0000 (11:29 +0000)
commit3dd3986cb463188be7db169f56912a35fc93d05f
tree632d939d9251e0464b357b3171f2d7d78f7c3810
parentb80059a74cc6c636d4bdf30ad19f967944dfa6e0
net: lantiq_xrx200: fix use after free bug

The skb->len field is read after the packet is sent to the network
stack. In the meantime, skb can be freed. This patch fixes this bug.

Fixes: d09d5a37c22b ("net: lantiq_xrx200: add ingress SG DMA support")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/lantiq_xrx200.c