CVE-2025-40301
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel's Bluetooth HCI event handler, missing length validation for unknown command complete opcodes can cause an out-of-bounds read.
Vulnerability
In hci_cmd_complete_evt(), when a command complete event has an unknown opcode, the code assumes the first byte of the remaining skb->data contains the return status. However, parameter data has already been pulled by hci_event_func(), which may leave the skb empty [1]. Reading skb->data[0] in this case accesses uninitialized memory.
Exploitation
The vulnerability is triggered when a Bluetooth controller sends a command complete event with an opcode not recognized by the kernel. No authentication is required, but an attacker would need to be able to inject such events, typically requiring local access or proximity to the device (Bluetooth range). The issue exists in the HCI event processing code path.
Impact
An attacker could cause the kernel to read uninitialized memory, potentially leading to information disclosure or system instability. The out-of-bounds read occurs before the command status is properly handled.
Mitigation
The fix, included in commit 5c5f1f64681c (stable backport fea895de78d3 in a different context [2]), adds a length check on skb->len before using skb->data. This ensures the skb has at least one byte of data, returning an error if not. Users should update to a kernel version containing this patch.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
5fea895de78d3779f83a91d4fcf2c2acec1cf1a0ddaaf97405c5f1f64681cVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/1a0ddaaf97405dbd11d4cb5a961a3f82400e8a50nvd
- git.kernel.org/stable/c/5c5f1f64681cc889d9b13e4a61285e9e029d6ab5nvd
- git.kernel.org/stable/c/779f83a91d4f1bf5ddfeaf528420cbb6dbf03fa8nvd
- git.kernel.org/stable/c/cf2c2acec1cf456c3d11c11a7589e886a0f963a9nvd
- git.kernel.org/stable/c/fea895de78d3bb2f0c09db9f10b18f8121b15759nvd
News mentions
0No linked articles in our index yet.