CVE-2024-36012·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: msft: fix slab-use-after-free in msft_do_close() Tying the msft->data lifetime to hdev by freeing it in hci_release_dev() to fix the following case: [use] msft_do_close() msft = hdev->msft_data; if (!msft) ...(1) <- passed. return; mutex_lock(&msft->filter_lock); ...(4) <- used after freed. [free] msft_unregister() msft = hdev->msft_data; hdev->msft_data = NULL; ...(2) kfree(msft); ...(3) <- msft is freed. ================================================================== BUG: KASAN: slab-use-after-free in __mutex_lock_common kernel/locking/mutex.c:587 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock+0x8f/0xc30 kernel/locking/mutex.c:752 Read of size 8 at addr ffff888106cbbca8 by task kworker/u5:2/309
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.8.10
- Published
- 2024-05-23
Affected versions
From: 6.7
Until: 6.8.10
Fixed in: 6.8.10
How to fix this CVE
Update your Linux kernel to version 6.8.10 or later to resolve a critical use-after-free vulnerability in the Bluetooth MSFT subsystem. This issue occurs when the msft_data structure is accessed after being freed during device unregistration, potentially causing kernel crashes or memory corruption. Apply the patch through your distribution's kernel update mechanism immediately.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your kernel version by running `uname -r` and compare against the affected range 6.7 to 6.8.10
- Step 2: Verify Bluetooth MSFT driver is active by checking `lsmod | grep bluetooth` and `cat /proc/config.gz | zgrep CONFIG_BT_MSFT`
- Step 3: Search system logs for KASAN warnings with pattern `KASAN: slab-use-after-free in __mutex_lock` using `sudo journalctl -xe | grep -i 'slab-use-after-free'`
- Step 4: After patching, verify the new kernel version loads correctly with `uname -r` and ensure no KASAN errors appear in `sudo dmesg`
FAQ
What is CVE-2024-36012?
CVE-2024-36012 is a use-after-free vulnerability in the Linux kernel's Bluetooth MSFT (Microsoft) extension subsystem where the msft_data structure is accessed by msft_do_close() after being freed by msft_unregister(), leading to potential kernel crashes or memory corruption.
Is CVE-2024-36012 being actively exploited?
No, CVE-2024-36012 is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, the high CVSS score of 7.8 warrants prompt patching.
What versions of Kernel are affected by CVE-2024-36012?
Linux kernel versions 6.7 through 6.8.10 are vulnerable. The vulnerability was resolved in kernel 6.8.10 and later stable releases.
How do I check if my server is vulnerable to CVE-2024-36012?
Run `uname -r` to check your kernel version. If it reports a version between 6.7 and 6.8.9 (inclusive), and Bluetooth is enabled via `lsmod | grep bluetooth`, your system is vulnerable.
Does Defensia detect CVE-2024-36012?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2024-36012 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/10f9f426ac6e752c8d87bf4346930ba347aaabac
- https://git.kernel.org/stable/c/4f1de02de07748da80a8178879bc7a1df37fdf56
- https://git.kernel.org/stable/c/a85a60e62355e3bf4802dead7938966824b23940
- https://git.kernel.org/stable/c/e3880b531b68f98d3941d83f2f6dd11cf4fd6b76
- https://git.kernel.org/stable/c/10f9f426ac6e752c8d87bf4346930ba347aaabac
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-36012. Free for 1 server.
Get started free