AZL-115483: CVE-2026-99671 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
can: raw, isotp: copy socket options outside of locksock()
The CANRAW and CANISOTP specific socket options are copied from and to user space while holding locksock(). A copy that faults or stalls, e.g. on a userfaultfd or FUSE backed mapping, holds locksock() for its whole duration.
rawnotify() and isotpnotify() take locksock() of a socket that is bound to the vanishing device while holding RTNL. As the CANRAW 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", rawsetsockopt() even held RTNL itself during the copy. CANISOTP only copies its options for unbound sockets, which isotpnotify() skips without taking locksock().
Keep the user space copies out of the locked sections: Check the option name and length and copy the option values, including the CANRAWFILTER filters, to kernel memory before locksock(). rawsetsockoptlocked() and isotpsetsockoptlocked() 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 rawgetsockopt() duplicate the filters under locksock() and copy them to user space after releasesock().
As the option name and length are now checked before locksock(), the order of the checks in isotpsetsockopt() 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 SOLSOCKET options in sksetsockopt() are not affected by this patch.