Ad

CVE-2026-99671

NONE EPSS 0.21%
Обновлено 23 ноября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux была устранена следующая уязвимость: can: raw, isotp: опции копирования сокетов за пределами lock_sock() The CAN_RAW и CAN_ISOTP специфические опции сокетов копируются из и в пространство пользователя при удержании lock_sock(). Копия, которая не работает или останавливается, например, на userfaultfd или FUSE, поддерживает lock_sock() в течение всего времени. raw_notify() и isotp_notify() берут lock_sock() сокета, который привязан к исчезающему устройству, удерживая RTNL. Поскольку опции CAN_RAW также могут быть изменены на связанном сокете, заблокированная копия может блокировать RTNL при отказе от регистрации или изменении пространства имен связанного устройства.

Before "can: protect the receive lists with a per-device lock", raw_setsockopt() even held RTNL itself during the copy. CAN_ISOTP копирует только свои опции для несвязанных сокетов, которые isotp_notify() пропускает, не принимая lock_sock(). Сохраните копии пользовательского пространства из заблокированных разделов: Check имя и длину опции и скопируйте значения опции, включая фильтры CAN_RAW_FILTER, в память ядра перед lock_sock(). raw_setsockopt_locked() и isotp_setsockopt_locked() получают скопированные значения напрямую и сбрасывают свои теперь избыточные проверки длины и копии. Как побочный эффект, неудачная копия больше не может оставлять частично перезаписанные параметры.

В raw_getsockopt() дублируют фильтры под lock_sock() и копируют их в пользовательское пространство после release_sock(). Поскольку имя опции и длина теперь проверяются перед lock_sock(), порядок проверок в isotp_setsockopt() и, соответственно, порядок возвращаемых значений ошибок изменяется. Это соответствует POSIX, который не определяет порядок, в котором обнаруживаются и сообщаются множественные условия ошибки.

Общие опции SOL_SOCKET в sk_setsockopt () не затронуты этим патчем.

Показать оригинальное описание (EN)

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.