В ядре Linux была устранена следующая уязвимость: netlink: избежать хеширования указателя пространства имен сети Ключ rhashtable netlink включает в себя необработанный указатель struct net и управляемый пользователем порт ID. Как /proc/net/netlink, так и диагностика сокетов выявляют порядок ковша стола. Привязывая и перевязывая выбранный NETLINK_USERSOCK порт IDs, непривилегированный читатель может различать равные ведра и восстанавливать низкие биты хэша Jenkins.
Его 32-разрядное семя и ограниченный набор слайдов образа ядра можно затем искать в автономном режиме, чтобы восстановить адрес init_net. Вместо этого используйте уникальный неадресный net_cookie пространства имен в ключе сравнения. Он назначается перед запуском инициализаторов для каждой сети и остается неизменным в течение всего времени существования пространства имен.
Ключ поиска и хеш объекта по-прежнему создаются netlink_compare_arg_init(), сохраняя поиск, вставку, удаление и повторный хеш, сохраняя при этом разделение пространства имен. Ни один из общественных столов не должен меняться. Чтение файла cookie пространства имен сокета в netlink_compare() безопасно в RCU, в том числе во время разбора пространства имен. netlink_release() удаляет сокет из хеш-таблицы и откладывает его окончательное размещение с помощью call_rcu(). cleanup_net() запускает методы выхода из сети и ждет выдающихся обратных звонков RCU с rcu_barrier() перед освобождением хранилища пространства имени.
В отличие от ns.ns_id, net_cookie также доступен и инициализируется во время setup_net() в более старых стабильных ядрах, что упрощает переход на v5.15 и более поздние версии.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: netlink: avoid hashing the network namespace pointer The netlink rhashtable key includes a raw struct net pointer and a user-controlled port ID. Both /proc/net/netlink and socket diagnostics expose the table's bucket order. By binding and rebinding chosen NETLINK_USERSOCK port IDs, an unprivileged reader can distinguish equal buckets and recover the low bits of the Jenkins hash. Its 32-bit seed and the limited set of kernel-image slides can then be searched offline to recover the address of init_net. Use the namespace's unique, non-address net_cookie in the comparison key instead. It is assigned before the per-net initializers run and remains unchanged for the namespace's lifetime. The lookup key and object hash are still built by netlink_compare_arg_init(), keeping lookup, insertion, removal and rehashing consistent while preserving namespace separation. Neither public table walker needs to change. Reading the socket's namespace cookie in netlink_compare() is safe under RCU, including during namespace teardown. netlink_release() removes the socket from the hash table and defers its final put with call_rcu(). cleanup_net() runs the per-net exit methods and waits for outstanding RCU callbacks with rcu_barrier() before freeing namespace storage. Unlike ns.ns_id, net_cookie is also available and initialized during setup_net() in older stable kernels, making the change straightforward to backport to v5.15 and later.
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
5.10.273
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
5.15.224
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
6.1.191
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
6.6.161
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
6.12.115
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
6.18.59
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
7.2.13
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
7.3
|