CVE-2025-40301 in Linuxinfo

Summary

by MITRE • 12/08/2025

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: hci_event: validate skb length for unknown CC opcode

In hci_cmd_complete_evt(), if the command complete event has an unknown opcode, we assume the first byte of the remaining skb->data contains the return status. However, parameter data has previously been pulled in hci_event_func(), which may leave the skb empty. If so, using skb->data[0]
for the return status uses un-init memory.

The fix is to check skb->len before using skb->data.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 02/23/2026

The vulnerability identified as CVE-2025-40301 represents a critical buffer over-read condition within the Linux kernel's Bluetooth subsystem, specifically affecting the HCI (Host Controller Interface) event handling mechanism. This flaw exists in the hci_cmd_complete_evt() function where the kernel attempts to process command complete events from Bluetooth controllers. The vulnerability stems from inadequate validation of socket buffer (skb) length before accessing memory locations that may contain uninitialized data, creating a potential vector for arbitrary code execution or system instability.

The technical implementation of this vulnerability occurs within the Bluetooth HCI subsystem where the kernel processes events from Bluetooth controllers through the hci_event_func() function. During event processing, parameter data is pulled from the socket buffer using skb_pull(), which may result in an empty skb when dealing with unknown command opcodes. When hci_cmd_complete_evt() encounters a command complete event with an unknown opcode, it assumes that the first byte of the remaining skb->data contains the return status information. However, if the previous skb_pull() operation left the buffer empty, accessing skb->data[0] results in reading from uninitialized memory, potentially exposing sensitive data or causing unpredictable behavior.

This vulnerability directly maps to CWE-125: Uninitialized Memory Read, which is classified under the broader category of memory safety issues in software development. The flaw demonstrates poor input validation and memory access control that violates fundamental security principles. From an operational perspective, this vulnerability could be exploited by malicious actors to gain unauthorized access to system memory, potentially leading to privilege escalation or complete system compromise. The attack surface is particularly concerning given that Bluetooth functionality is widely enabled across various Linux distributions and embedded systems.

The impact of this vulnerability extends beyond simple memory corruption, as it could enable attackers to extract sensitive information from uninitialized memory regions, potentially revealing kernel memory layout details, cryptographic keys, or other confidential data. The exploitability of this condition is enhanced by the fact that it occurs during normal Bluetooth operation, making it difficult to detect and prevent through conventional security monitoring. The vulnerability affects systems running Linux kernel versions that include the problematic HCI event handling code, particularly those with Bluetooth support enabled and active Bluetooth interfaces.

The recommended mitigation strategy involves applying the upstream kernel patch that implements proper length validation before accessing skb->data. This fix ensures that the kernel checks skb->len before attempting to read from the socket buffer, preventing access to uninitialized memory regions. System administrators should prioritize updating to kernel versions containing this fix, particularly on systems with Bluetooth capabilities. Additionally, implementing runtime monitoring and intrusion detection systems can help identify potential exploitation attempts. Organizations should also consider disabling Bluetooth functionality on systems where it is not required, reducing the attack surface. The fix aligns with ATT&CK technique T1059.007: Command and Scripting Interpreter: Python, as it addresses a memory corruption vulnerability that could be exploited through malicious Bluetooth communications to execute arbitrary code within the kernel context.

Responsible

Linux

Reservation

04/16/2025

Disclosure

12/08/2025

Moderation

accepted

CPE

ready

EPSS

0.00156

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!