CVE-2024-36012: Vulnerability in Linux Linux
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
AI Analysis
Technical Summary
CVE-2024-36012 is a use-after-free vulnerability identified in the Linux kernel's Bluetooth subsystem, specifically within the Microsoft-specific (msft) Bluetooth driver code. The flaw arises from improper management of the lifetime of the msft_data structure tied to a Bluetooth device (hdev). The vulnerability occurs when the msft_data pointer is freed in the msft_unregister() function but subsequently accessed in msft_do_close() without proper null checks or synchronization. The sequence involves msft_unregister() setting hdev->msft_data to NULL and freeing the msft_data memory, but msft_do_close() may still attempt to lock a mutex within the now-freed msft_data structure, leading to a slab-use-after-free condition. This is confirmed by Kernel Address Sanitizer (KASAN) reports showing use-after-free errors in mutex locking code paths. Exploiting this flaw could cause kernel crashes or potentially allow an attacker to execute arbitrary code in kernel space due to use-after-free memory corruption. The vulnerability affects Linux kernel versions identified by the commit hash bf6a4e30ffbd9e9ef8934582feb937f6532f8b68 and likely other versions containing the same code pattern. No known exploits are currently reported in the wild. The issue was addressed by tying the msft_data lifetime explicitly to the Bluetooth device lifecycle and ensuring proper freeing in hci_release_dev(), preventing use-after-free scenarios. This vulnerability is significant because it affects the core Linux kernel Bluetooth stack, which is widely used across many Linux distributions and devices, including servers, desktops, and embedded systems.
Potential Impact
For European organizations, this vulnerability presents a risk primarily to systems running Linux kernels with affected Bluetooth drivers enabled. Many enterprises and public sector organizations in Europe rely on Linux-based infrastructure for servers, workstations, and IoT devices. Exploitation could lead to denial of service via kernel crashes or potentially privilege escalation if an attacker can execute arbitrary code in kernel context. This could compromise confidentiality, integrity, and availability of critical systems. Organizations using Bluetooth-enabled Linux devices in sensitive environments (e.g., industrial control systems, healthcare, telecommunications) could face increased risk if attackers exploit this flaw to gain unauthorized access or disrupt operations. Although no active exploits are known, the widespread use of Linux in Europe and the critical nature of kernel vulnerabilities mean that timely patching is essential to prevent potential attacks. Additionally, Bluetooth is commonly used in corporate environments for peripherals and device connectivity, expanding the attack surface. The vulnerability could also impact embedded Linux devices used in European critical infrastructure, which may be harder to patch promptly.
Mitigation Recommendations
1. Apply the latest Linux kernel patches that address CVE-2024-36012 as soon as they become available from your Linux distribution vendor. This is the most effective mitigation. 2. For environments where immediate patching is not feasible, consider disabling Bluetooth functionality on Linux systems that do not require it, reducing the attack surface. 3. Implement strict access controls and monitoring on Linux systems to detect unusual Bluetooth activity or kernel crashes that may indicate exploitation attempts. 4. Use kernel hardening features such as Kernel Address Sanitizer (KASAN) and other memory safety tools during development and testing to detect similar issues early. 5. Maintain an inventory of Linux devices with Bluetooth enabled to prioritize patch deployment. 6. For embedded devices, coordinate with vendors for firmware updates or consider network segmentation to isolate vulnerable devices. 7. Educate system administrators about the risks of Bluetooth-related kernel vulnerabilities and the importance of timely updates.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland
CVE-2024-36012: Vulnerability in Linux Linux
Description
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
AI-Powered Analysis
Technical Analysis
CVE-2024-36012 is a use-after-free vulnerability identified in the Linux kernel's Bluetooth subsystem, specifically within the Microsoft-specific (msft) Bluetooth driver code. The flaw arises from improper management of the lifetime of the msft_data structure tied to a Bluetooth device (hdev). The vulnerability occurs when the msft_data pointer is freed in the msft_unregister() function but subsequently accessed in msft_do_close() without proper null checks or synchronization. The sequence involves msft_unregister() setting hdev->msft_data to NULL and freeing the msft_data memory, but msft_do_close() may still attempt to lock a mutex within the now-freed msft_data structure, leading to a slab-use-after-free condition. This is confirmed by Kernel Address Sanitizer (KASAN) reports showing use-after-free errors in mutex locking code paths. Exploiting this flaw could cause kernel crashes or potentially allow an attacker to execute arbitrary code in kernel space due to use-after-free memory corruption. The vulnerability affects Linux kernel versions identified by the commit hash bf6a4e30ffbd9e9ef8934582feb937f6532f8b68 and likely other versions containing the same code pattern. No known exploits are currently reported in the wild. The issue was addressed by tying the msft_data lifetime explicitly to the Bluetooth device lifecycle and ensuring proper freeing in hci_release_dev(), preventing use-after-free scenarios. This vulnerability is significant because it affects the core Linux kernel Bluetooth stack, which is widely used across many Linux distributions and devices, including servers, desktops, and embedded systems.
Potential Impact
For European organizations, this vulnerability presents a risk primarily to systems running Linux kernels with affected Bluetooth drivers enabled. Many enterprises and public sector organizations in Europe rely on Linux-based infrastructure for servers, workstations, and IoT devices. Exploitation could lead to denial of service via kernel crashes or potentially privilege escalation if an attacker can execute arbitrary code in kernel context. This could compromise confidentiality, integrity, and availability of critical systems. Organizations using Bluetooth-enabled Linux devices in sensitive environments (e.g., industrial control systems, healthcare, telecommunications) could face increased risk if attackers exploit this flaw to gain unauthorized access or disrupt operations. Although no active exploits are known, the widespread use of Linux in Europe and the critical nature of kernel vulnerabilities mean that timely patching is essential to prevent potential attacks. Additionally, Bluetooth is commonly used in corporate environments for peripherals and device connectivity, expanding the attack surface. The vulnerability could also impact embedded Linux devices used in European critical infrastructure, which may be harder to patch promptly.
Mitigation Recommendations
1. Apply the latest Linux kernel patches that address CVE-2024-36012 as soon as they become available from your Linux distribution vendor. This is the most effective mitigation. 2. For environments where immediate patching is not feasible, consider disabling Bluetooth functionality on Linux systems that do not require it, reducing the attack surface. 3. Implement strict access controls and monitoring on Linux systems to detect unusual Bluetooth activity or kernel crashes that may indicate exploitation attempts. 4. Use kernel hardening features such as Kernel Address Sanitizer (KASAN) and other memory safety tools during development and testing to detect similar issues early. 5. Maintain an inventory of Linux devices with Bluetooth enabled to prioritize patch deployment. 6. For embedded devices, coordinate with vendors for firmware updates or consider network segmentation to isolate vulnerable devices. 7. Educate system administrators about the risks of Bluetooth-related kernel vulnerabilities and the importance of timely updates.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-05-17T13:50:33.153Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9828c4522896dcbe247b
Added to database: 5/21/2025, 9:08:56 AM
Last enriched: 6/29/2025, 9:25:04 AM
Last updated: 8/5/2025, 6:39:06 PM
Views: 13
Related Threats
CVE-2025-9022: SQL Injection in SourceCodester Online Bank Management System
MediumCVE-2025-9021: SQL Injection in SourceCodester Online Bank Management System
MediumCVE-2025-9020: Use After Free in PX4 PX4-Autopilot
LowCVE-2025-8604: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wptb WP Table Builder – WordPress Table Plugin
MediumCVE-2025-9016: Uncontrolled Search Path in Mechrevo Control Center GX V2
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.