Skip to content
Commit 72bc44ff authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Liu Shixin
Browse files

net: ti: fix UAF in tlan_remove_one

stable inclusion
from stable-v4.19.199
commit a0a817b2d308fac090a05cbbe80988e073ac5193
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9S1ZJ
CVE: CVE-2021-47310

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a0a817b2d308fac090a05cbbe80988e073ac5193



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

commit 0336f8ff upstream.

priv is netdev private data and it cannot be
used after free_netdev() call. Using priv after free_netdev()
can cause UAF bug. Fix it by moving free_netdev() at the end of the
function.

Fixes: 1e0a8b13 ("tlan: cancel work at remove path")
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
parent 6a985437
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment