CVE-2024-38627·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: stm class: Fix a double free in stm_register_device() The put_device(&stm->dev) call will trigger stm_device_release() which frees "stm" so the vfree(stm) on the next line is a double free.
- 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 a double-free memory corruption vulnerability in the STM class device registration routine. This flaw could allow local attackers with appropriate privileges to cause a kernel crash or potentially execute arbitrary code. Apply the kernel update immediately through your distribution's package manager.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against version 6.9.4—if less than 6.9.4, you are vulnerable
- Step 2: Verify the STM (System Trace Macrocell) module is loaded by running `lsmod | grep stm` to determine if the vulnerable component is in use
- Step 3: Search kernel logs for STM-related errors using `sudo journalctl -b | grep -i 'stm\|double free\|memory corruption'` to identify potential exploitation attempts
- Step 4: After applying the kernel update, reboot your system with `sudo reboot`, then run `uname -r` again to confirm the new version is active
FAQ
What is CVE-2024-38627?
CVE-2024-38627 is a double-free memory corruption vulnerability in the Linux kernel's STM (System Trace Macrocell) class device registration code, where improper cleanup logic causes the same memory region to be freed twice, potentially leading to kernel instability or privilege escalation.
Is CVE-2024-38627 being actively exploited?
No, according to CISA's Known Exploited Vulnerabilities (KEV) catalog, CVE-2024-38627 is not currently being actively exploited in the wild, and no public proof-of-concept code is available.
What versions of Kernel are affected by CVE-2024-38627?
Linux kernel versions 6.7 through 6.9.3 are vulnerable to CVE-2024-38627; kernel 6.9.4 and later versions contain the fix.
How do I check if my server is vulnerable to CVE-2024-38627?
Run `uname -r` to display your kernel version; if the output is between 6.7 and 6.9.3 inclusive, your system is vulnerable and requires an immediate kernel update.
Does Defensia detect CVE-2024-38627?
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-38627 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/370c480410f60b90ba3e96abe73ead21ec827b20
- https://git.kernel.org/stable/c/3df463865ba42b8f88a590326f4c9ea17a1ce459
- https://git.kernel.org/stable/c/4bfd48bb6e62512b9c392c5002c11e1e3b18d247
- https://git.kernel.org/stable/c/6cc30ef8eb6d8f8d6df43152264bbf8835d99931
- https://git.kernel.org/stable/c/713fc00c571dde4af3db2dbd5d1b0eadc327817b
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-38627. Free for 1 server.
Get started free