CVE-2021-47321·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: watchdog: Fix possible use-after-free by calling del_timer_sync() This driver's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.13.4
- Published
- 2024-05-21
Affected versions
From: 5.13
Until: 5.13.4
Fixed in: 5.13.4
How to fix this CVE
Update your Linux kernel to version 5.13.4 or later to resolve a use-after-free vulnerability in the watchdog timer subsystem. This vulnerability occurs because the timer handler may continue executing after the driver removal completes, leading to potential memory corruption and system instability. Apply the patch immediately to eliminate the race condition between timer cleanup and handler execution.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r — compare against 5.13.4. Versions 5.13.0 through 5.13.3 are vulnerable.
- Verify watchdog driver is loaded: lsmod | grep watchdog — identifies if the affected subsystem is active on your system.
- Review kernel configuration: grep -i watchdog /boot/config-$(uname -r) — determines if watchdog functionality is compiled into your kernel.
- Confirm patch application after update: uname -r should report 5.13.4 or higher; verify with: cat /proc/version | grep -i 5.13.4
FAQ
What is CVE-2021-47321?
A use-after-free vulnerability in the Linux kernel's watchdog timer subsystem where the timer handler may execute after the driver is removed, potentially causing memory corruption and system crashes due to improper synchronization during device cleanup.
Is CVE-2021-47321 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and has no publicly available exploits. However, the high CVSS score (7.8) warrants prompt patching.
What versions of Kernel are affected by CVE-2021-47321?
Linux kernel versions 5.13.0 through 5.13.3 are vulnerable. Version 5.13.4 and later releases contain the fix.
How do I check if my server is vulnerable to CVE-2021-47321?
Run `uname -r` to display your kernel version. If it reports 5.13.0, 5.13.1, 5.13.2, or 5.13.3, your system is vulnerable and requires immediate kernel update.
Does Defensia detect CVE-2021-47321?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47321 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1a053c4d716898a53c2e31c574a70ea0c37044a3
- https://git.kernel.org/stable/c/4c05dac488a660fe2925c047ecb119e7afaaeb1e
- https://git.kernel.org/stable/c/58606882ad8ec6c39e0f40344b922921ef94ab4d
- https://git.kernel.org/stable/c/66ba9cf929b1c4fabf545bd4c18f6f64e23e46e4
- https://git.kernel.org/stable/c/8bec568d7518b1504a602ed5376bb322e4dbb270
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47321. Free for 1 server.
Get started free