Commit 04ffdbcd authored by Dan Carpenter's avatar Dan Carpenter Committed by Kaixiong Yu
Browse files

staging: rtl8192e: Fix use after free in _rtl92e_pci_disconnect()

stable inclusion
from stable-v4.19.219
commit bca19bb2dc2d89ce60c4a4a6e59609d4cf2e13ef
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9S27V
CVE: CVE-2021-47571

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



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

commit b535917c upstream.

The free_rtllib() function frees the "dev" pointer so there is use
after free on the next line.  Re-arrange things to avoid that.

Fixes: 66898177 ("staging: rtl8192e: Fix unload/reload problem")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211117072016.GA5237@kili


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKaixiong Yu <yukaixiong@huawei.com>
parent a0395933
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment