CVE-2024-38630·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger When the cpu5wdt module is removing, the origin code uses del_timer() to de-activate the timer. If the timer handler is running, del_timer() could not stop it and will return directly. If the port region is released by release_region() and then the timer handler cpu5wdt_trigger() calls outb() to write into the region that is released, the use-after-free bug will happen. Change del_timer() to timer_shutdown_sync() in order that the timer handler could be finished before the port region is released.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.9.4
- Published
- 2024-06-21
Affected versions
From: 6.7
Until: 6.9.4
Fixed in: 6.9.4
How to fix this CVE
Update your Linux kernel to version 6.9.4 or later to resolve this use-after-free vulnerability in the cpu5wdt watchdog driver. The fix replaces an unsafe timer deactivation method with a synchronous shutdown that ensures the timer handler completes before hardware port resources are released. Systems running kernels 6.7 through 6.9.3 should prioritize this update to prevent potential kernel memory corruption.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your kernel version with 'uname -r' and compare against 6.9.4 — versions 6.7.x through 6.9.3 are vulnerable
- Step 2: Verify if cpu5wdt module is loaded by running 'lsmod | grep cpu5wdt' — if present, your system uses this watchdog driver
- Step 3: Search kernel logs for timer-related crashes or memory access violations using 'sudo dmesg | grep -i "use-after-free\|cpu5wdt\|outb"'
- Step 4: After patching, confirm the new kernel is running with 'uname -r' and verify it shows 6.9.4 or higher
FAQ
What is CVE-2024-38630?
This is a use-after-free vulnerability in the Linux kernel's cpu5wdt watchdog driver module. When the module is unloaded, a race condition allows the timer handler to write to freed I/O port memory, potentially causing kernel corruption or crashes.
Is CVE-2024-38630 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are available. However, it remains a high-severity issue due to its potential impact on system stability.
What versions of Kernel are affected by CVE-2024-38630?
Linux kernel versions 6.7.0 through 6.9.3 are vulnerable. The fix was released in kernel 6.9.4.
How do I check if my server is vulnerable to CVE-2024-38630?
Run 'uname -r' to get your kernel version. If it shows 6.7.x, 6.8.x, or 6.9.0-6.9.3, you are vulnerable. Additionally, check if 'lsmod | grep cpu5wdt' shows the watchdog driver is loaded.
Does Defensia detect CVE-2024-38630?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-38630 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/573601521277119f2e2ba5f28ae6e87fc594f4d4
- https://git.kernel.org/stable/c/9b1c063ffc075abf56f63e55d70b9778ff534314
- https://git.kernel.org/stable/c/f19686d616500cd0d47b30cee82392b53f7f784a
- https://git.kernel.org/stable/c/573601521277119f2e2ba5f28ae6e87fc594f4d4
- https://git.kernel.org/stable/c/9b1c063ffc075abf56f63e55d70b9778ff534314
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-38630. Free for 1 server.
Get started free