CVE-2022-48910

In the Linux kernel, the following vulnerability has been resolved: net: ipv6: ensure we call ipv6_mc_down() at most once There are two reasons for addrconf_notify() to be called with NETDEV_DOWN: either the network device is actually going down, or IPv6 was disabled on the interface. If either of them stays down while the other is toggled, we repeatedly call the code for NETDEV_DOWN, including ipv6_mc_down(), while never calling the corresponding ipv6_mc_up() in between. This will cause a new entry in idev->mc_tomb to be allocated for each multicast group the interface is subscribed to, which in turn leaks one struct ifmcaddr6 per nontrivial multicast group the interface is subscribed to. The following reproducer will leak at least $n objects: ip addr add ff2e::4242/32 dev eth0 autojoin sysctl -w net.ipv6.conf.eth0.disable_ipv6=1 for i in $(seq 1 $n); do ip link set up eth0; ip link set down eth0 done Joining groups with IPV6_ADD_MEMBERSHIP (unprivileged) or setting the sysctl net.ipv6.conf.eth0.forwarding to 1 (=> subscribing to ff02::2) can also be used to create a nontrivial idev->mc_list, which will the leak objects with the right up-down-sequence. Based on both sources for NETDEV_DOWN events the interface IPv6 state should be considered: - not ready if the network interface is not ready OR IPv6 is disabled for it - ready if the network interface is ready AND IPv6 is enabled for it The functions ipv6_mc_up() and ipv6_down() should only be run when this state changes. Implement this by remembering when the IPv6 state is ready, and only run ipv6_mc_down() if it actually changed from ready to not ready. The other direction (not ready -> ready) already works correctly, as: - the interface notification triggered codepath for NETDEV_UP / NETDEV_CHANGE returns early if ipv6 is disabled, and - the disable_ipv6=0 triggered codepath skips fully initializing the interface as long as addrconf_link_ready(dev) returns false - calling ipv6_mc_up() repeatedly does not leak anything
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc6:*:*:*:*:*:*

History

12 Sep 2024, 13:31

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CWE NVD-CWE-noinfo
CPE cpe:2.3:o:linux:linux_kernel:5.17:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
First Time Linux linux Kernel
Linux
References () https://git.kernel.org/stable/c/72124e65a70b84e6303a5cd21b0ac1f27d7d61a4 - () https://git.kernel.org/stable/c/72124e65a70b84e6303a5cd21b0ac1f27d7d61a4 - Patch
References () https://git.kernel.org/stable/c/9588ac2eddc2f223ebcebf6e9f5caed84d32922b - () https://git.kernel.org/stable/c/9588ac2eddc2f223ebcebf6e9f5caed84d32922b - Patch
References () https://git.kernel.org/stable/c/9995b408f17ff8c7f11bc725c8aa225ba3a63b1c - () https://git.kernel.org/stable/c/9995b408f17ff8c7f11bc725c8aa225ba3a63b1c - Patch
References () https://git.kernel.org/stable/c/9a8736b2da28b24f01707f592ff059b9f90a058c - () https://git.kernel.org/stable/c/9a8736b2da28b24f01707f592ff059b9f90a058c - Patch
References () https://git.kernel.org/stable/c/b11781515208dd31fbcd0b664078dce5dc44523f - () https://git.kernel.org/stable/c/b11781515208dd31fbcd0b664078dce5dc44523f - Patch
References () https://git.kernel.org/stable/c/c71bf3229f9e9dd60ba02f5a5be02066edf57012 - () https://git.kernel.org/stable/c/c71bf3229f9e9dd60ba02f5a5be02066edf57012 - Patch
References () https://git.kernel.org/stable/c/f4c63b24dea9cc2043ff845dcca9aaf8109ea38a - () https://git.kernel.org/stable/c/f4c63b24dea9cc2043ff845dcca9aaf8109ea38a - Patch

22 Aug 2024, 12:48

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: ipv6: asegúrese de llamar a ipv6_mc_down() como máximo una vez. Hay dos razones para llamar a addrconf_notify() con NETDEV_DOWN: o el dispositivo de red realmente está cayendo o IPv6 estaba deshabilitado en la interfaz. Si alguno de ellos permanece inactivo mientras el otro está activado, llamamos repetidamente al código para NETDEV_DOWN, incluido ipv6_mc_down(), pero nunca llamamos al ipv6_mc_up() correspondiente en el medio. Esto hará que se asigne una nueva entrada en idev->mc_tomb para cada grupo de multidifusión al que esté suscrita la interfaz, lo que a su vez filtrará una estructura ifmcaddr6 por cada grupo de multidifusión no trivial al que esté suscrita la interfaz. El siguiente reproductor filtrará al menos $n objetos: ip addr add ff2e::4242/32 dev eth0 autojoin sysctl -w net.ipv6.conf.eth0.disable_ipv6=1 for i in $(seq 1 $n); configurar el enlace ip eth0; ip link set down eth0 done Unirse a grupos con IPV6_ADD_MEMBERSHIP (sin privilegios) o configurar sysctl net.ipv6.conf.eth0.forwarding en 1 (=> suscribirse a ff02::2) también se puede usar para crear un idev->mc_list no trivial , que filtrará objetos con la secuencia correcta de arriba a abajo. Según ambas fuentes de eventos NETDEV_DOWN, se debe considerar el estado de la interfaz IPv6: - no lista si la interfaz de red no está lista O IPv6 está deshabilitado - lista si la interfaz de red está lista Y IPv6 está habilitada Las funciones ipv6_mc_up() e ipv6_down() solo debe ejecutarse cuando este estado cambie. Implemente esto recordando cuándo el estado de IPv6 está listo y solo ejecute ipv6_mc_down() si realmente cambió de listo a no listo. La otra dirección (no listo -> listo) ya funciona correctamente, ya que: - la ruta de código activada de notificación de interfaz para NETDEV_UP / NETDEV_CHANGE regresa antes si ipv6 está deshabilitado, y - la ruta de código activada enable_ipv6=0 omite la inicialización completa de la interfaz siempre que addrconf_link_ready (dev) devuelve falso: llamar a ipv6_mc_up() repetidamente no filtra nada

22 Aug 2024, 02:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-08-22 02:15

Updated : 2024-09-12 13:31


NVD link : CVE-2022-48910

Mitre link : CVE-2022-48910

CVE.ORG link : CVE-2022-48910


JSON object : View

Products Affected

linux

  • linux_kernel