В ядре Linux устранена следующая уязвимость:
net: ip_gre: требуется CAP_NET_ADMIN в сети устройства для изменения ссылки
Туннель Changelink() работает не более чем с двумя сетями: dev_net(dev) и
туннельная связь netns t->net. Они различаются после создания устройства в
или перемещен в сеть, отличную от той, в которой выполняется запрос.
путь изменения ссылки проверяет CAP_NET_ADMIN только на соответствие dev_net(dev), поэтому
вызывающий абонент имеет привилегии там, но не в t->net, может переписать туннель, который
живет в t->net. Добавьте rtnl_dev_link_net_capable() рядом с rtnl_get_net_ns_capable() в
net/core/rtnetlink.c.
Для этого требуется CAP_NET_ADMIN в сети связи и
пропускается, если ссылка netns равна dev_net(dev), где уже указан путь rtnl.
проверил это. Другие патчи этой серии используют тот же помощник. Ворота ipgre_changelink() и erspan_changelink() с ним вверху
операция перед анализом любого атрибута, поскольку анализаторы обновляются в реальном времени
туннельные поля в первую очередь. ipgre_netlink_parms() устанавливает t->collect_md раньше
ip_tunnel_changelink() запускается.
Зафиксируйте 8b484efd5cb4 («ip6: vti: используйте ip6_tnl.net в
vti6_siocdevprivate().") добавлена такая же проверка на пути ioctl. Это
добавляет его в RTM_NEWLINK.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: ip_gre: require CAP_NET_ADMIN in the device netns for changelink A tunnel changelink() operates on at most two netns, dev_net(dev) and the tunnel link netns t->net. They differ once the device is created in or moved to a netns other than the one the request runs in. The rtnl changelink path checks CAP_NET_ADMIN only against dev_net(dev), so a caller privileged there but not in t->net can rewrite a tunnel that lives in t->net. Add rtnl_dev_link_net_capable() next to rtnl_get_net_ns_capable() in net/core/rtnetlink.c. It requires CAP_NET_ADMIN in the link netns and is skipped when the link netns is dev_net(dev), where the rtnl path already checked it. The other patches in this series use the same helper. Gate ipgre_changelink() and erspan_changelink() with it, at the top of the op before any attribute is parsed, because the parsers update live tunnel fields first. ipgre_netlink_parms() sets t->collect_md before ip_tunnel_changelink() runs. Commit 8b484efd5cb4 ("ip6: vti: Use ip6_tnl.net in vti6_siocdevprivate().") added the same check on the ioctl path. This adds it on RTM_NEWLINK.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 7
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.16
|
5.10.261
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.212
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.178
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.145
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.95
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.38
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.1.3
|