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

CVE-2022-50334

Gravedad CVSS v3.1:
MEDIA
Tipo:
CWE-476 Desreferencia a puntero nulo (NULL)
Fecha de publicación:
15/09/2025
Última modificación:
04/12/2025

Descripción

*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param()<br /> <br /> Syzkaller reports a null-ptr-deref bug as follows:<br /> ======================================================<br /> KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]<br /> RIP: 0010:hugetlbfs_parse_param+0x1dd/0x8e0 fs/hugetlbfs/inode.c:1380<br /> [...]<br /> Call Trace:<br /> <br /> vfs_parse_fs_param fs/fs_context.c:148 [inline]<br /> vfs_parse_fs_param+0x1f9/0x3c0 fs/fs_context.c:129<br /> vfs_parse_fs_string+0xdb/0x170 fs/fs_context.c:191<br /> generic_parse_monolithic+0x16f/0x1f0 fs/fs_context.c:231<br /> do_new_mount fs/namespace.c:3036 [inline]<br /> path_mount+0x12de/0x1e20 fs/namespace.c:3370<br /> do_mount fs/namespace.c:3383 [inline]<br /> __do_sys_mount fs/namespace.c:3591 [inline]<br /> __se_sys_mount fs/namespace.c:3568 [inline]<br /> __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568<br /> do_syscall_x64 arch/x86/entry/common.c:50 [inline]<br /> do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80<br /> entry_SYSCALL_64_after_hwframe+0x63/0xcd<br /> [...]<br /> <br /> ======================================================<br /> <br /> According to commit "vfs: parse: deal with zero length string value",<br /> kernel will set the param-&gt;string to null pointer in vfs_parse_fs_string()<br /> if fs string has zero length.<br /> <br /> Yet the problem is that, hugetlbfs_parse_param() will dereference the<br /> param-&gt;string, without checking whether it is a null pointer. To be more<br /> specific, if hugetlbfs_parse_param() parses an illegal mount parameter,<br /> such as "size=,", kernel will constructs struct fs_parameter with null<br /> pointer in vfs_parse_fs_string(), then passes this struct fs_parameter to<br /> hugetlbfs_parse_param(), which triggers the above null-ptr-deref bug.<br /> <br /> This patch solves it by adding sanity check on param-&gt;string<br /> in hugetlbfs_parse_param().

Productos y versiones vulnerables

CPE Desde Hasta
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.4.229 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (incluyendo) 5.10.163 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (incluyendo) 5.15.86 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (incluyendo) 6.0.16 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.1 (incluyendo) 6.1.2 (excluyendo)