В ядре Linux устранена следующая уязвимость:
espintcp: удалить кэширование сокетов encap, чтобы избежать утечки ссылок
Текущая схема кэширования сокета энкапа может привести к ссылке
утечки, когда мы пытаемся удалить netns. Цепочка ссылок: xfrm_state -> enacp_sk -> netns. Поскольку сокет encap является сокетом пользовательского пространства, он содержит ссылку на
сети.
Если мы удалим состояние espintcp (с помощью флеша или индивидуальное удаление) перед удалением netns, ссылка на сокет удаляется, и netns удаляется правильно. В противном случае netns может быть больше недоступен (если все процессы внутри ns завершились), поэтому мы не можем удалить состояние xfrm, чтобы удалить его. ссылка на сокет. Этот патч приводит к небольшому (~2% в моих тестах) снижению производительности. регресс.
Для кэша сокетов можно добавить механизм типа GC, чтобы очистить ссылки, если состояние не использовалось «недавно», но это много сложнее, чем просто не кэшировать сокет.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: espintcp: remove encap socket caching to avoid reference leak The current scheme for caching the encap socket can lead to reference leaks when we try to delete the netns. The reference chain is: xfrm_state -> enacp_sk -> netns Since the encap socket is a userspace socket, it holds a reference on the netns. If we delete the espintcp state (through flush or individual delete) before removing the netns, the reference on the socket is dropped and the netns is correctly deleted. Otherwise, the netns may not be reachable anymore (if all processes within the ns have terminated), so we cannot delete the xfrm state to drop its reference on the socket. This patch results in a small (~2% in my tests) performance regression. A GC-type mechanism could be added for the socket cache, to clear references if the state hasn't been used "recently", but it's a lot more complex than just not caching the socket.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 12
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.6
|
6.1.141
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.93
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.31
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.14.9
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:rc7:*:*:*:*:*:*
|
— | — |
|
Debian Debian_Linux
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
|
— | — |