CVE-2021-47479·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: staging: rtl8712: fix use-after-free in rtl8712_dl_fw Syzbot reported use-after-free in rtl8712_dl_fw(). The problem was in race condition between r871xu_dev_remove() ->ndo_open() callback. It's easy to see from crash log, that driver accesses released firmware in ->ndo_open() callback. It may happen, since driver was releasing firmware _before_ unregistering netdev. Fix it by moving unregister_netdev() before cleaning up resources. Call Trace: ... rtl871x_open_fw drivers/staging/rtl8712/hal_init.c:83 [inline] rtl8712_dl_fw+0xd95/0xe10 drivers/staging/rtl8712/hal_init.c:170 rtl8712_hal_init drivers/staging/rtl8712/hal_init.c:330 [inline] rtl871x_hal_init+0xae/0x180 drivers/staging/rtl8712/hal_init.c:394 netdev_open+0xe6/0x6c0 drivers/staging/rtl8712/os_intfs.c:380 __dev_open+0x2bc/0x4d0 net/core/dev.c:1484 Freed by task 1306: ... release_firmware+0x1b/0x30 drivers/base/firmware_loader/main.c:1053 r871xu_dev_remove+0xcc/0x2c0 drivers/staging/rtl8712/usb_intf.c:599 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.15.2
- Published
- 2024-05-22
Affected versions
From: 5.15
Until: 5.15.2
Fixed in: 5.15.2
How to fix this CVE
Update your Linux kernel to version 5.15.2 or later to resolve this use-after-free vulnerability in the RTL8712 wireless driver. The fix ensures the network device is properly unregistered before firmware resources are released, preventing kernel crashes during device removal. Systems running kernel versions 5.15.0 through 5.15.1 should prioritize this update.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check kernel version: uname -r — vulnerable if output shows 5.15.0 or 5.15.1
- Verify RTL8712 driver presence: lsmod | grep rtl8712 — if output exists, the vulnerable code path is loaded
- Search system logs for use-after-free crashes: grep -i 'use-after-free\|rtl871x_open_fw\|rtl8712_dl_fw' /var/log/kern.log /var/log/syslog
- After patching, confirm new kernel is active: uname -r — should show 5.15.2 or newer
FAQ
What is CVE-2021-47479?
CVE-2021-47479 is a use-after-free vulnerability in the Linux kernel's RTL8712 wireless driver that occurs when a race condition between device removal and network interface operations causes the driver to access firmware memory that has already been freed, potentially leading to kernel crashes or code execution.
Is CVE-2021-47479 being actively exploited?
No, CVE-2021-47479 is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2021-47479?
Linux kernel versions 5.15.0 through 5.15.1 are affected. Version 5.15.2 and later contain the fix.
How do I check if my server is vulnerable to CVE-2021-47479?
Run 'uname -r' to check your kernel version — if it shows 5.15.0 or 5.15.1, and 'lsmod | grep rtl8712' shows the driver is loaded, your system is vulnerable.
Does Defensia detect CVE-2021-47479?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47479 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/a65c9afe9f2f55b7a7fb4a25ab654cd4139683a4
- https://git.kernel.org/stable/c/befd23bd3b17f1a3f9c943a8580b47444c7c63ed
- https://git.kernel.org/stable/c/c052cc1a069c3e575619cf64ec427eb41176ca70
- https://git.kernel.org/stable/c/c430094541a80575259a94ff879063ef01473506
- https://git.kernel.org/stable/c/a65c9afe9f2f55b7a7fb4a25ab654cd4139683a4
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47479. Free for 1 server.
Get started free