CVE-2026-99671 in Linuxinfo

Summary

by MITRE • 11/20/2026

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

can: raw, isotp: copy socket options outside of lock_sock()

The CAN_RAW and CAN_ISOTP specific socket options are copied from and to user space while holding lock_sock(). A copy that faults or stalls, e.g. on a userfaultfd or FUSE backed mapping, holds lock_sock() for its whole duration.

raw_notify() and isotp_notify() take lock_sock() of a socket that is bound to the vanishing device while holding RTNL. As the CAN_RAW options can also be changed on a bound socket, a stalled copy can block RTNL on an unregistration or namespace change of the bound device. Before "can: protect the receive lists with a per-device lock", raw_setsockopt() even held RTNL itself during the copy. CAN_ISOTP only copies its options for unbound sockets, which isotp_notify() skips without taking lock_sock().

Keep the user space copies out of the locked sections: Check the option name and length and copy the option values, including the CAN_RAW_FILTER filters, to kernel memory before lock_sock(). raw_setsockopt_locked() and isotp_setsockopt_locked() get the copied values directly and drop their now redundant length checks and copies. As a side effect, a failing copy can not leave partially overwritten options behind anymore. In raw_getsockopt() duplicate the filters under lock_sock() and copy them to user space after release_sock().

As the option name and length are now checked before lock_sock(), the order of the checks in isotp_setsockopt() and accordingly the order of the returned error values changes. This is in line with POSIX, which does not define an order in which multiple error conditions are detected and reported.

The generic SOL_SOCKET options in sk_setsockopt() are not affected by this patch.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/20/2026

This vulnerability addresses a significant concurrency and availability issue within the Controller Area Network (CAN) subsystem of the Linux kernel, specifically affecting the CAN_RAW and CAN_ISOTP socket implementations. The core technical flaw lies in the execution context of user-space data copying operations for socket options. Previously, functions responsible for setting or getting socket options would acquire lock_sock() before initiating memory copies from or to user space. This design choice creates a critical dependency where the kernel holds an exclusive spinlock on the socket structure while waiting for potentially slow or blocking user-space memory access mechanisms. If the target memory region is backed by technologies such as userfaultfd or FUSE, which can trigger page faults that require process suspension and resumption, the lock_sock() remains held indefinitely during this wait period. This behavior violates fundamental principles of kernel concurrency control, where long-blocking operations should never be performed while holding fine-grained locks intended to protect short-critical sections of code.

The operational impact of this flaw extends beyond simple performance degradation for individual sockets. Because CAN_RAW options can be modified on bound sockets, and because notification functions like raw_notify() and isotp_notify() acquire lock_sock() on a socket that may be associated with a device undergoing unregistration or namespace changes while holding the global RTNL (Routing Netlink) semaphore, the situation escalates into a system-wide deadlock risk. If a user-space application triggers a stall during option copying, it effectively blocks the RTNL for an extended duration. This prevents other kernel threads from performing network configuration tasks, device unregistrations, or namespace manipulations, leading to severe service degradation or complete lockup of networking subsystems dependent on CAN interfaces. The issue is particularly acute in environments where dynamic interface management is frequent or when user-space applications utilize advanced memory mapping features that are prone to faults under load.

The resolution involves restructuring the socket option handling logic to strictly separate validation and data copying from critical locking sections. In the updated implementation, the kernel first validates the option name and length outside of any locks. Subsequently, it performs all necessary copies between user space and kernel memory before acquiring lock_sock(). For set operations, functions like raw_setsockopt_locked() and isotp_setsockopt_locked() now receive pre-copied values directly from their callers, eliminating redundant checks and copy operations within the locked context. This approach ensures that if a page fault occurs or the process stalls due to userfaultfd mechanisms, it happens while no kernel locks are held, allowing other threads to proceed normally. For get operations in raw_getsockopt(), filters are duplicated under lock_sock() but copied back to user space only after release_sock() is called, further minimizing the time spent holding the socket lock during potentially slow memory transfers.

This architectural change also yields a secondary benefit regarding data integrity and error handling consistency. By performing copies outside of locked sections, the vulnerability prevents scenarios where a failed copy operation could leave partially overwritten option values in kernel memory, which might lead to undefined behavior or security inconsistencies upon subsequent access. Additionally, because validation occurs before locking, the order in which multiple error conditions are detected and reported changes slightly for isotp_setsockopt(). This shift aligns better with POSIX standards, which do not mandate a specific order for detecting multiple errors, thereby improving compliance and predictability for applications relying on standard socket API behaviors. It is important to note that generic SOL_SOCKET options handled by sk_setsockopt() remain unaffected by these modifications, as they operate under different locking paradigms or are already structured to avoid such blocking issues within critical sections.

From a security taxonomy perspective, this vulnerability maps closely to CWE-834, Excessive Locking, where the scope of a lock is unnecessarily broad, encompassing operations that do not require mutual exclusion protection and can block for extended periods. It also relates to CWE-675, Operations on Data with Unintended Minimization of Search Space or Scope, as the locking strategy inadvertently restricted system responsiveness based on user-space memory behavior rather than actual data race conditions. In terms of MITRE ATT&CK techniques, this flaw could be exploited in a Denial of Service (DoS) context via T1499, Endpoint Denial of Service, specifically through resource exhaustion or blocking mechanisms that leverage the kernel's locking primitives to stall system operations. Mitigation primarily involves applying the provided kernel patch which restructures the socket option handling logic. System administrators should ensure their kernels are updated to versions containing this fix and monitor for any applications using CAN sockets with complex memory mappings that might trigger such stalls, ensuring those applications are resilient or configured to minimize fault-induced delays during system-critical operations.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!