Skip to main content

CVE-2024-56604: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-56604cvecve-2024-56604
Published: Fri Dec 27 2024 (12/27/2024, 14:51:09 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc() bt_sock_alloc() attaches allocated sk object to the provided sock object. If rfcomm_dlc_alloc() fails, we release the sk object, but leave the dangling pointer in the sock object, which may cause use-after-free. Fix this by swapping calls to bt_sock_alloc() and rfcomm_dlc_alloc().

AI-Powered Analysis

AILast updated: 07/02/2025, 23:24:57 UTC

Technical Analysis

CVE-2024-56604 is a high-severity vulnerability identified in the Linux kernel's Bluetooth RFCOMM protocol implementation. The flaw arises in the rfcomm_sock_alloc() function, where improper handling of socket (sk) pointers leads to a use-after-free condition. Specifically, the function bt_sock_alloc() attaches an allocated sk object to a provided sock object. If the subsequent call to rfcomm_dlc_alloc() fails, the kernel releases the sk object but neglects to clear the dangling pointer in the sock object. This results in a stale pointer referencing freed memory, which can be exploited to cause memory corruption. The vulnerability is classified under CWE-416 (Use After Free). Exploiting this flaw requires local access with low privileges (PR:L) and no user interaction (UI:N), but the attacker must be able to trigger Bluetooth RFCOMM socket allocation failures. The impact is significant, with the CVSS 3.1 score of 7.8 reflecting high confidentiality, integrity, and availability impacts (C:H/I:H/A:H). An attacker could leverage this vulnerability to execute arbitrary code within the kernel context, escalate privileges, or cause denial of service by crashing the system. The fix involves reordering calls in the code to ensure that the sk pointer is not left dangling by swapping bt_sock_alloc() and rfcomm_dlc_alloc() calls. No known exploits are reported in the wild yet, but given the critical nature of kernel-level use-after-free bugs, timely patching is essential. The affected Linux kernel versions are identified by specific commit hashes, indicating the vulnerability is present in recent kernel builds prior to the fix. This vulnerability affects any Linux system with Bluetooth RFCOMM support enabled, which is common in many distributions and devices.

Potential Impact

For European organizations, the impact of CVE-2024-56604 can be substantial, especially for enterprises and service providers relying on Linux-based infrastructure with Bluetooth capabilities. The vulnerability allows local attackers to gain elevated privileges or cause system crashes, potentially disrupting critical services. This is particularly concerning for sectors such as telecommunications, manufacturing, healthcare, and public administration, where Linux servers and embedded devices with Bluetooth are prevalent. The confidentiality breach risk is high as kernel-level exploits can bypass standard security controls, potentially exposing sensitive data. Integrity and availability impacts could lead to system instability or downtime, affecting business continuity. Additionally, organizations using Linux in IoT devices or industrial control systems with Bluetooth may face increased risk due to limited patching capabilities and the critical nature of these environments. Although exploitation requires local access, insider threats or compromised user accounts could facilitate attacks. The absence of known exploits in the wild provides a window for proactive mitigation, but the high severity score underscores the urgency for European organizations to assess and remediate affected systems promptly.

Mitigation Recommendations

1. Immediate application of the official Linux kernel patches that reorder the bt_sock_alloc() and rfcomm_dlc_alloc() calls to prevent dangling pointers. Monitor Linux kernel mailing lists and vendor advisories for updated stable releases containing the fix. 2. For systems where patching is delayed, consider disabling Bluetooth RFCOMM support if not required, by unloading or blacklisting relevant kernel modules (e.g., rfcomm). 3. Implement strict local access controls and monitoring to limit the ability of unprivileged users to execute code or trigger Bluetooth socket operations. 4. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), and enable security modules like SELinux or AppArmor to reduce exploitation success. 5. Conduct thorough audits of Linux systems with Bluetooth enabled, focusing on devices in sensitive or critical environments. 6. For embedded or IoT devices, coordinate with vendors to obtain patched firmware or kernel updates. 7. Enhance endpoint detection and response (EDR) capabilities to identify anomalous Bluetooth socket activity or kernel exploitation attempts. 8. Educate system administrators about the vulnerability and ensure timely deployment of patches across all Linux assets, including virtual machines and containers that may expose Bluetooth functionality.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-27T14:03:06.012Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdf37a

Added to database: 5/21/2025, 9:08:51 AM

Last enriched: 7/2/2025, 11:24:57 PM

Last updated: 8/14/2025, 11:06:22 AM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats