CVE-2026-64408 in Linuxinfo

Summary

by MITRE • 07/25/2026

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

Bluetooth: bnep: pin L2CAP connection during netdev registration

bnep_add_connection() reads the L2CAP connection without holding the channel lock, then passes its HCI device to register_netdev(). Controller teardown can clear and release that connection concurrently, leaving the network device registration path to dereference a freed parent device.

Take a reference to the L2CAP connection while holding the channel lock. Retain it until register_netdev() has taken the parent device reference.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 07/25/2026

This vulnerability exists within the Linux kernel's Bluetooth Network Encapsulation Protocol (BNEP) implementation where improper synchronization during network device registration creates a race condition leading to potential use-after-free scenarios. The flaw occurs in the bnep_add_connection() function which accesses an L2CAP connection structure without acquiring the necessary channel lock protection before passing the HCI device to register_netdev(). This asynchronous access pattern allows for concurrent execution paths where the Bluetooth controller may initiate teardown operations that free the L2CAP connection while the network registration process is still attempting to reference it. The vulnerability represents a classic race condition scenario commonly classified under CWE-362, which deals with concurrent execution using lock objects, and specifically manifests as a use-after-free condition when the network device registration path attempts to dereference a parent device that has already been released by the controller teardown process.

The technical implementation of this flaw demonstrates how insufficient locking mechanisms in kernel space can create dangerous execution flows where memory management operations occur out of sequence. When bnep_add_connection() reads the L2CAP connection structure without proper synchronization, it creates a window where another thread executing controller teardown operations can simultaneously free the connection data structure. The register_netdev() function then attempts to take a reference to this parent device but encounters a freed memory location, resulting in potential system crashes or privilege escalation opportunities. This race condition exploits the fundamental principle that shared resources in concurrent systems must be properly protected through synchronization primitives before access, and it aligns with ATT&CK technique T1068 which covers local privilege escalation through kernel vulnerabilities.

The operational impact of this vulnerability extends beyond simple system instability to potentially enable attackers with local access to achieve privilege escalation within the kernel space. An attacker could exploit this race condition by carefully timing their operations to trigger the controller teardown while the network registration is in progress, creating a scenario where they can manipulate memory contents or force system crashes that might be leveraged for more sophisticated attacks. The vulnerability affects systems running Linux kernels with Bluetooth support and particularly impacts devices using BNEP protocol for network connectivity over Bluetooth connections. Mitigation strategies should focus on implementing proper locking mechanisms around the L2CAP connection access, ensuring that references are maintained until after register_netdev() has completed its parent device reference acquisition. This approach aligns with the principle of maintaining resource validity throughout the entire operation lifecycle and prevents the race condition by guaranteeing that the connection structure remains valid during the critical registration phase.

Security researchers have identified this vulnerability as part of broader Bluetooth protocol stack concerns in Linux kernel implementations, where similar issues have been documented in other network encapsulation protocols. The fix implemented requires taking a reference to the L2CAP connection while holding the channel lock and retaining that reference until after register_netdev() has successfully taken its parent device reference, effectively eliminating the race window. This solution demonstrates proper concurrent programming practices where shared resources are protected through appropriate synchronization mechanisms and where resource lifetimes are carefully managed across multiple execution contexts. The vulnerability serves as a reminder of the critical importance of proper locking in kernel space operations and illustrates how seemingly simple access patterns can create complex security issues when concurrent execution paths are not properly coordinated.

Responsible

Linux

Reservation

07/19/2026

Disclosure

07/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00220

KEV

no

Activities

low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!