ravb: Fix potential use-after-free in ravb_rx_gbeth()
authorYueHaibing <yuehaibing@huawei.com>
Sat, 3 Dec 2022 09:29:41 +0000 (17:29 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 6 Dec 2022 11:37:25 +0000 (12:37 +0100)
commit5a5a3e564de6a8db987410c5c2f4748d50ea82b8
treec88407590067e0177c2d62aa225eaf1460b6af0e
parent7b8232bdb1789a257de3129a9bb08c69b93a17db
ravb: Fix potential use-after-free in ravb_rx_gbeth()

The skb is delivered to napi_gro_receive() which may free it, after calling this,
dereferencing skb may trigger use-after-free.

Fixes: 1c59eb678cbd ("ravb: Fillup ravb_rx_gbeth() stub")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20221203092941.10880-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/renesas/ravb_main.c