Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

Vulnerabilidad en kernel de Linux (CVE-2024-38608)

Gravedad CVSS v3.1:
MEDIA
Tipo:
CWE-476 Desreferencia a puntero nulo (NULL)
Fecha de publicación:
19/06/2024
Última modificación:
27/08/2024

Descripción

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: net/mlx5e: corrige el manejo del estado de netif. mlx5e_suspend limpia los recursos solo si netif_device_present() devuelve verdadero. Sin embargo, mlx5e_resume cambia el estado de netif, a través de mlx5e_nic_enable, solo si reg_state == NETREG_REGISTERED. En el siguiente caso, lo anterior conduce a NULL-ptr Ups[1] y pérdidas de memoria: mlx5e_probe _mlx5e_resume mlx5e_attach_netdev mlx5e_nic_enable <-- netdev no se registra, no llama a netif_device_attach() Register_netdev <-- falló por algún motivo. ERROR_FLOW: _mlx5e_suspend <-- netif_device_present devuelve falso, los recursos no se liberan :( Por lo tanto, limpie los recursos en este caso también. [1] ERROR: desreferencia del puntero NULL del kernel, dirección: 00000000000000000 PGD 0 P4D 0 Ups: 0010 [#1 ] SMP CPU: 2 PID: 9345 Comm: test-ovs-ct-gen Not tainted 6.5.0_for_upstream_min_debug_2023_09_05_16_01 #1 Nombre del hardware: PC estándar QEMU (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuild .qemu.org 01/04/2014 RIP: 0010:0x0 Código: No se puede acceder a los bytes del código de operación at0xffffffffffffffd6 RSP: 0018:ffff888178aaf758 EFLAGS: 00010246 Seguimiento de llamadas: __die+0x20/0x60 +0x14c/0x3c0? exc_page_fault+0x75/0x140 ? _replay+0x3e/0x60 [mlx5_core] mlx5_mdev_netdev_track+0x53/0x60 [mlx5_ib] mlx5_ib_roce_init+0xc3/0x340 [mlx5_ib] __mlx5_ib_add+0x34/0xd0 [mlx5_ib] mlx5r_probe+0xe1/0x210 [mlx5_ib] ? auxiliar_match_id+0x6a/0x90 sonda_bus_auxiliar+0x38/0x80 ? driver_sysfs_add+0x51/0x80 realmente_probe+0xc9/0x3e0? driver_probe_device+0x90/0x90 __driver_probe_device+0x80/0x160 driver_probe_device+0x1e/0x90 __device_attach_driver+0x7d/0x100 bus_for_each_drv+0x80/0xd0 __device_attach+0xbc/0x1f0 bus_probe_device+0x8 6/0xa0 dispositivo_add+0x637/0x840 __auxiliary_device_add+0x3b/0xa0 add_adev+0xc9/0x140 [mlx5_core] mlx5_rescan_drivers_locked+0x22a/0x310 [mlx5_core] mlx5_register_device+0x53/0xa0 [mlx5_core] mlx5_init_one_devl_locked+0x5c4/0x9c0 [mlx5_core] mlx5_init_one+0x3b/0x60 [mlx5_core] _uno+0x44c/0x730 [mlx5_core] local_pci_probe+0x3e/0x90 pci_device_probe+ 0xbf/0x210 ? kernfs_create_link+0x5d/0xa0? sysfs_do_create_link_sd+0x60/0xc0 realmente_probe+0xc9/0x3e0? driver_probe_device+0x90/0x90 __driver_probe_device+0x80/0x160 driver_probe_device+0x1e/0x90 __device_attach_driver+0x7d/0x100 bus_for_each_drv+0x80/0xd0 __device_attach+0xbc/0x1f0 pci_bus_add_device+ 0x54/0x80 pci_iov_add_virtfn+0x2e6/0x320 sriov_enable+0x208/0x420 mlx5_core_sriov_configure+0x9e/0x200 [mlx5_core] sriov_numvfs_store+0xae/0x1a0 kernfs_fop_write_iter+0x10c/0x1a0 vfs_write+0x291/0x3c0 ksys_write+0x5f/0xe0 do_syscall_64+0x3d/0x90 Entry_SYSCALL_64_after_hwframe+0x4 6/0xb0 CR2: 0000000000000000 ---[ final de seguimiento 0000000000000000 ]---

Productos y versiones vulnerables

CPE Desde Hasta
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.12 (incluyendo) 6.9.3 (excluyendo)