CVE-2024-53175
JSON

5.5medium

ipc: fix memleak if msg_init_ns failed in create_ipc_ns

Severity
5.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.24% (higher than 15% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ipc: fix memleak if msg_init_ns failed in create_ipc_ns Percpu memory allocation may failed during create_ipc_ns however this fail is not handled properly since ipc sysctls and mq sysctls is not released properly. Fix this by release these two resource when failure. Here is the kmemleak stack when percpu failed: unreferenced object 0xffff88819de2a600 (size 512): comm "shmem_2nstest", pid 120711, jiffies 4300542254 hex dump (first 32 bytes): 60 aa 9d 84 ff ff ff ff fc 18 48 b2 84 88 ff ff `.........H..... 04 00 00 00 a4 01 00 00 20 e4 56 81 ff ff ff ff ........ .V..... backtrace (crc be7cba35): [<ffffffff81b43f83>] __kmalloc_node_track_caller_noprof+0x333/0x420 [<ffffffff81a52e56>] kmemdup_noprof+0x26/0x50 [<ffffffff821b2f37>] setup_mq_sysctls+0x57/0x1d0 [<ffffffff821b29cc>] copy_ipcs+0x29c/0x3b0 [<ffffffff815d6a10>] create_new_namespaces+0x1d0/0x920 [<ffffffff815d7449>] copy_namespaces+0x2e9/0x3e0 [<ffffffff815458f3>] copy_process+0x29f3/0x7ff0 [<ffffffff8154b080>] kernel_clone+0xc0/0x650 [<ffffffff8154b6b1>] __do_sys_clone+0xa1/0xe0 [<ffffffff843df8ff>] do_syscall_64+0xbf/0x1c0 [<ffffffff846000b0>] entry_SYSCALL_64_after_hwframe+0x4b/0x53

Affected

Product or packageVersionsReported by
Linux Linuxfrom 72d1e611082eda18689106a0c192f2827072713c before 3d230cfd4b9b0558c7b2039ba1def2ce6b6cd158, from 72d1e611082eda18689106a0c192f2827072713c before 10209665b5bf199f8065b2e7d2b2dc6cdf227117, from 72d1e611082eda18689106a0c192f2827072713c before 8fed302872e26c7bf44d855c53a1cde747172d58, from 72d1e611082eda18689106a0c192f2827072713c before 928de5fcd462498b8334107035da8ab85e316d8a, from 72d1e611082eda18689106a0c192f2827072713c before bc8f5921cd69188627c08041276238de222ab466, 6.1
Not affected: before 6.1, from 6.1.120 up to 6.1.*, from 6.6.64 up to 6.6.*, from 6.11.11 up to 6.11.*, from 6.12.2 up to 6.12.*, from 6.13 up to *
CVE List
linux linux_kernelfrom 6.1 before 6.1.120, from 6.2 before 6.6.64, from 6.7 before 6.11.11, from 6.12 before 6.12.2NVD

All scores

CISA-ADP5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-401

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: ipc: fix memleak if msg_init_ns failed in create_ipc_ns Percpu memory allocation may failed during create_ipc_ns however this fail is not handled properly since ipc sysctls and mq sysctls is not released properly. Fix this by release these two resource when failure. Here is the kmemleak stack when percpu failed: unreferenced object 0xffff88819de2a600 (size 512): comm "shmem_2nstest", pid 120711, jiffies 4300542254 hex dump (first 32 bytes): 60 aa 9d 84 ff ff ff ff fc 18 48 b2 84 88 ff ff `.........H..... 04 00 00 00 a4 01 00 00 20 e4 56 81 ff ff ff ff ........ .V..... backtrace (crc be7cba35): [<ffffffff81b43f83>] __kmalloc_node_track_caller_noprof+0x333/0x420 [<ffffffff81a52e56>] kmemdup_noprof+0x26/0x50 [<ffffffff821b2f37>] setup_mq_sysctls+0x57/0x1d0 [<ffffffff821b29cc>] copy_ipcs+0x29c/0x3b0 [<ffffffff815d6a10>] create_new_namespaces+0x1d0/0x920 [<ffffffff815d7449>] copy_namespaces+0x2e9/0x3e0 [<ffffffff815458f3>] copy_process+0x29f3/0x7ff0 [<ffffffff8154b080>] kernel_clone+0xc0/0x650 [<ffffffff8154b6b1>] __do_sys_clone+0xa1/0xe0 [<ffffffff843df8ff>] do_syscall_64+0xbf/0x1c0 [<ffffffff846000b0>] entry_SYSCALL_64_after_hwframe+0x4b/0x53

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ipc: se corrige la fuga de memoria si msg_init_ns falla en create_ipc_ns. La asignación de memoria por CPU puede fallar durante create_ipc_ns; sin embargo, este error no se gestiona correctamente, ya que ipc sysctls y mq sysctls no se liberan correctamente. Solucione esto liberando estos dos recursos cuando falle. Aquí está la pila kmemleak cuando percpu falló: objeto sin referencia 0xffff88819de2a600 (tamaño 512): comm "shmem_2nstest", pid 120711, jiffies 4300542254 volcado hexadecimal (primeros 32 bytes): 60 aa 9d 84 ff ff ff ff ff fc 18 48 b2 84 88 ff ff `.........H..... 04 00 00 00 a4 01 00 00 20 e4 56 81 ff ff ff ff ........ .V..... backtrace (crc be7cba35): [] __kmalloc_node_track_caller_noprof+0x333/0x420 [] kmemdup_noprof+0x26/0x50 [] configuración_mq_sysctls+0x57/0x1d0 [] copia_ipcs+0x29c/0x3b0 [] creación_nuevos_espacios_de_nombres+0x1d0/0x920 [] copia_espacios_de_nombres+0x2e9/0x3e0 [] proceso_de_copia+0x29f3/0x7ff0 [] clon_de_kernel+0xc0/0x650 [] __do_sys_clone+0xa1/0xe0 [] hacer_llamada_al_sistema_64+0xbf/0x1c0 [] entrada_LLAMADA_AL_SISTEMA_64_después_de_hwframe+0x4b/0x53

References

Sources

SourceRecordLicence
CVE ListCVE-2024-53175 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-53175 changed 2026-06-17Public domain