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

[ Upstream commit deed862a978881af5bba8a28151e5a801fb57bb2 ]

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

Fixes: bb37f2c9208b ("net: hisilicon: add hix5hd2 mac driver")
Signed-off-by: Liu Jian <liujian56@huawei.com>
Link: https://lore.kernel.org/r/20221203094240.1240211-2-liujian56@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c