Skip to content
Commit 23d4b185 authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Zhengchao Shao
Browse files

net: dpaa2-eth: fix use-after-free in dpaa2_eth_remove

mainline inclusion
from mainline-v5.16-rc2
commit 9b5a3332
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNEY
CVE: CVE-2021-47204

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b5a333272a48c2f8b30add7a874e46e8b26129c



--------------------------------

Access to netdev after free_netdev() will cause use-after-free bug.
Move debug log before free_netdev() call to avoid it.

Fixes: 7472dd9f ("staging: fsl-dpaa2/eth: Move print message")
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>

Conflicts:
	drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
	drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
[The conflict occurs because the commit 34ff6846("dpaa2-eth: Move
DPAA2 Ethernet driver from staging to drivers/net") is not merged]
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 50a2fbeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment