CVE-2026-99672 in Linuxinfo

Summary

by MITRE • 11/20/2026

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

can: protect the receive lists with a per-device lock

The receive lists of a CAN device are located in the device's can_ml_priv and travel with the device when it is moved to another network namespace. But they are protected by the per-netns rcvlists_lock. So can_rx_unregister() needs dev_net(dev) to pick the right lock and silently returns when the passed namespace does not match dev_net(dev) anymore.

isotp_release() and bcm_release() leave their notifier list before they take any lock that serializes against the netdev notifier, which runs under RTNL. When the bound device is moved to another namespace in this window, the notifier skips the socket and the release path has to remove the filters itself. isotp_release() passes the socket's namespace, which does not match dev_net(dev) anymore. bcm_rx_unreg() passes dev_net(dev), which can_rx_unregister() reads again for its check, so a namespace change between both reads makes the check fail as well. In both cases can_rx_unregister() silently returns. As can_rx_register() stores rcv->sk without a reference, the remaining receivers point to the freed socket (isotp) or the freed op (bcm):

BUG: KASAN: use-after-free in isotp_rcv+0x1570/0x24d0 Read of size 1 at addr ffff888118130552 by task isotp_ns_uaf/578 can_rcv_filter+0x4af/0x8c0 can_receive+0x28d/0x3c0 can_rcv+0x2a9/0x310 __netif_receive_skb_one_core+0x21a/0x260 process_backlog+0x210/0x760

Besides this, the lists of a device are protected by the rcvlists_lock of the namespace that is passed in. Callers which pass dev_net(dev) read it at different times, so the same lists may be modified under the locks of different namespaces while the device is moved.

Taking RTNL in these release paths is no option: raw_bind(), raw_setsockopt() and raw_release() already hold RTNL while adding and removing up to CAN_RAW_FILTER_MAX filters per socket, which unprivileged users can trigger repeatedly and which makes RTNL a global bottleneck.

Instead fix the root cause and add a spinlock to struct can_dev_rcv_lists, which protects the receive lists of a CAN device or the 'any' CAN device lists of a namespace. It is initialized in can_set_ml_priv(), which is used by all CAN network devices. With this, can_rx_unregister() finds the subscription independently of the current namespace of the device. The protocols keep the device valid with their tracked references. The per-netns rcvlists_lock only protects the receive list statistics anymore, and CAN_RAW, CAN_BCM and CAN_ISOTP pass the namespace that has been used for can_rx_register().

So isotp_release() and bcm_release() now remove their filters correctly without RTNL, and raw_release(), raw_setsockopt(), raw_bind() and isotp_bind() do not need RTNL anymore and add and remove their filters under lock_sock(). To serialize bind() with NETDEV_UNREGISTER, bind() publishes the device inside the RCU section of its lookup, and raw_notify() and isotp_notify() recheck the bound device under lock_sock(). As RTNL does not keep NETDEV_DOWN out of bind() anymore, bind() checks IFF_UP after publishing the bound device, with a barrier pair against raw_notify() and isotp_notify(), so a down transition during bind() is still reported with ENETDOWN.

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

Analysis

by VulDB Data Team • 11/20/2026

The Linux kernel Controller Area Network subsystem contained a critical concurrency vulnerability related to namespace migration and lock granularity that resulted in use-after-free conditions and potential data corruption. The core issue stemmed from the misalignment between the lifecycle of CAN device receive lists and the locking mechanisms protecting them. Specifically, while the receive lists are physically located within the device's private structure and migrate with the network device across namespaces, they were historically protected by a per-network-namespace lock known as rcvlists_lock. This design created a race condition during namespace transitions where the lock associated with the original namespace no longer matched the current context of the device, leading to silent failures in cleanup routines.

The vulnerability manifests primarily through improper synchronization in release paths for CAN protocols such as ISO-TP and Broadcast Manager. When these sockets are released via isotp_release or bcm_release, they attempt to unregister their receive filters without holding a lock that serializes against network device notifications running under the RTNL semaphore. If a bound device is moved to another network namespace during this window, the notifier skips the socket because it no longer matches the expected context. Consequently, the release path must manually remove the filters but fails to do so correctly due to mismatched namespace checks within can_rx_unregister. This function silently returns when the passed namespace does not match dev_net(dev), leaving dangling pointers in the receive list structures.

This race condition leads directly to a use-after-free vulnerability where remaining receivers point to freed socket or operation objects. As demonstrated by kernel address sanitizer reports, this results in invalid memory reads within isotp_rcv and can_receive functions when processing incoming packets. The root cause is that can_rx_register stores the socket pointer without taking an additional reference count relative to the device's namespace state, meaning that once the socket is freed during a failed cleanup attempt, subsequent packet reception attempts access deallocated memory. This represents a significant security risk as it allows for potential information disclosure or denial of service through kernel crashes.

To resolve this issue, the fix introduces a dedicated spinlock directly within the struct can_dev_rcv_lists structure, which protects the receive lists of a specific CAN device or the global any-CAN device lists independently of network namespaces. This lock is initialized during the setup of all CAN network devices via can_set_ml_priv. By decoupling the protection of the actual list structures from the per-network-namespace rcvlists_lock, the kernel ensures that can_rx_unregister correctly identifies and removes subscriptions regardless of current namespace changes. The per-netns lock is now reserved solely for protecting receive list statistics, eliminating the previous ambiguity in locking scope during device migration events.

The remediation also involves a significant refactoring of synchronization primitives used by CAN protocol implementations to remove dependencies on the RTNL semaphore for filter management operations such as raw_bind, raw_setsockopt, and raw_release. Holding RTNL globally creates a performance bottleneck that unprivileged users can exploit through repeated calls with up to CAN_RAW_FILTER_MAX filters per socket. Instead, these operations now utilize lock_sock or specific device-level spinlocks to serialize access safely. This change improves scalability while maintaining strict consistency guarantees for filter additions and removals without blocking other network subsystem activities.

Further synchronization improvements ensure that binding operations remain safe during device state transitions. The bind functions now publish the bound device within an RCU section of their lookup process, allowing notification handlers like raw_notify and isotp_notify to recheck the validity of the bound device under lock_sock protection. Additionally, a barrier pair synchronizes with these notify handlers to ensure that if a network interface goes down during a bind operation, it is correctly reported as ENETDOWN rather than causing undefined behavior. This comprehensive approach addresses both the immediate use-after-free flaw and the broader architectural issues regarding locking granularity in the CAN subsystem.

From a vulnerability classification perspective, this issue aligns with CWE-416 Use After Free, where memory previously allocated for an object is accessed after it has been freed due to improper lifecycle management. The underlying cause relates to CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization, as the race condition arises from multiple execution paths accessing shared data structures without adequate mutual exclusion relative to state changes like namespace migration. In terms of attack vectors and techniques, this vulnerability can be leveraged for Denial of Service attacks by triggering kernel panics through crafted network namespace manipulations combined with socket release sequences. It also poses risks associated with CWE-787 Out-of-bounds Read if the use-after-free leads to reading sensitive memory contents before corruption occurs. Security practitioners should ensure systems are updated with patches that implement these locking refinements and verify proper handling of CAN device lifecycle events in network namespace contexts.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!