]> git.baikalelectronics.ru Git - kernel.git/commit
net: hisilicon: Fix potential use-after-free in hisi_femac_rx()
authorLiu Jian <liujian56@huawei.com>
Sat, 3 Dec 2022 09:42:39 +0000 (17:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Dec 2022 10:30:47 +0000 (11:30 +0100)
commit22727a194d4672cc713a0f83d1469c8673199d8b
tree0bc764d50b9dc85100431eaf826c03ba964870bb
parentaf0994ac59602ed1158c969f282668d6916e7622
net: hisilicon: Fix potential use-after-free in hisi_femac_rx()

[ Upstream commit 9551ebe6c7f0da9f5d3c2e89a18bfadb19c79e83 ]

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

Fixes: 1a4f7c5cc864 ("net: hisilicon: Add Fast Ethernet MAC driver")
Signed-off-by: Liu Jian <liujian56@huawei.com>
Link: https://lore.kernel.org/r/20221203094240.1240211-1-liujian56@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hisi_femac.c