CVE-2025-40308
Description
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: bcsp: receive data only if registered
Currently, bcsp_recv() can be called even when the BCSP protocol has not been registered. This leads to a NULL pointer dereference, as shown in the following stack trace:
KASAN: null-ptr-deref in range [0x0000000000000108-0x000000000000010f] RIP: 0010:bcsp_recv+0x13d/0x1740 drivers/bluetooth/hci_bcsp.c:590 Call Trace:
hci_uart_tty_receive+0x194/0x220 drivers/bluetooth/hci_ldisc.c:627 tiocsti+0x23c/0x2c0 drivers/tty/tty_io.c:2290 tty_ioctl+0x626/0xde0 drivers/tty/tty_io.c:2706 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f
To prevent this, ensure that the HCI_UART_REGISTERED flag is set before processing received data. If the protocol is not registered, return -EUNATCH.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A null-pointer dereference in the Linux kernel's BCSP Bluetooth driver allows a local attacker to crash the system by sending data before the protocol is registered.
Vulnerability
Description
CVE-2025-40308 is a NULL pointer dereference vulnerability in the Bluetooth BCSP (BlueCore Serial Protocol) driver of the Linux kernel. The root cause is that the bcsp_recv() function can be invoked before the BCSP protocol has been fully registered, leading to a null pointer dereference when it attempts to access protocol-specific data structures. The issue was discovered via KASAN (Kernel Address Sanitizer) reports showing a null-ptr-deref in the range starting at offset 0x108, specifically at the line bcsp_recv+0x13d/0x1740 in drivers/bluetooth/hci_bcsp.c[1][2].
Exploitation
Vector
The vulnerability is triggered through the serial TTY subsystem. An attacker with local access can use the TIOCSTI ioctl, which injects characters into the input queue of the terminal, to send crafted data to the Bluetooth line discipline (hci_ldisc). This eventually calls hci_uart_tty_receive() followed by bcsp_recv()[1]. No authentication is required beyond the ability to execute ioctl on a TTY file descriptor – a capability a local user or process can have. The attack surface is limited to systems where the BCSP line discipline is loaded, though the unpatched code path is reachable from a standard local user context.
Impact
Successful exploitation results in a kernel NULL pointer dereference, causing a system crash (denial of service). The crash occurs in kernel context, so a local unprivileged attacker can reliably trigger a panic. There is no indication of privilege escalation or data corruption; the impact is primarily availability. The vulnerability is not listed on CISA's Known Exploited Vulnerabilities catalog, and no public exploit code has been reported.
Mitigation
The fix, merged into the Linux kernel stable tree, ensures that bcsp_recv() checks the HCI_UART_REGISTERED flag before processing received data; if the protocol is not registered, the function returns -EUNATCH instead of proceeding to dereference uninitialized pointers[3][4]. Users should apply the corresponding kernel patches for their distribution. As a workaround, unloading the hci_uart and hci_bcsp kernel modules, if not needed, can eliminate the attack vector.
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
839a7d40314b6164586725b47b65ca9708bfb8b892dbef388799cd62cbcc3b420a4c7f91555c1519fca83ca94b2b036c2Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/164586725b47f9d61912e6bf17dbaffeff11710bnvd
- git.kernel.org/stable/c/39a7d40314b6288cfa2d13269275e9247a7a055anvd
- git.kernel.org/stable/c/55c1519fca830f59a10bbf9aa8209c87b06cf7bcnvd
- git.kernel.org/stable/c/799cd62cbcc3f12ee04b33ef390ff7d41c37d671nvd
- git.kernel.org/stable/c/8b892dbef3887dbe9afdc7176d1a5fd90e1636aanvd
- git.kernel.org/stable/c/b420a4c7f915fc1c94ad1f6ca740acc046d94334nvd
- git.kernel.org/stable/c/b65ca9708bfbf47d8b7bd44b7c574bd16798e9c9nvd
- git.kernel.org/stable/c/ca94b2b036c22556c3a66f1b80f490882deef7a6nvd
News mentions
0No linked articles in our index yet.