VYPR
Unrated severityNVD Advisory· Published Dec 8, 2025· Updated Apr 15, 2026

CVE-2025-40308

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

2
  • Linux/Kernelinferred2 versions
    (expand)+ 1 more
    • (no CPE)
    • (no CPE)

Patches

8

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.