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->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->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->string<br />
in hugetlbfs_parse_param().
Impacto
Puntuación base 3.x
5.50
Gravedad 3.x
MEDIA
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) |
Para consultar la lista completa de nombres de CPE con productos y versiones, ver esta página
Referencias a soluciones, herramientas e información
- https://git.kernel.org/stable/c/26215b7ee923b9251f7bb12c4e5f09dc465d35f2
- https://git.kernel.org/stable/c/965e8f8ae0f642b5528f5a82b7bcaf15a659d5bd
- https://git.kernel.org/stable/c/9a8862820cbf1f18dca4f3b4c289d88561b3a384
- https://git.kernel.org/stable/c/dcd28191be9bbf307ba51a5b485773a55b0037c4
- https://git.kernel.org/stable/c/f2207145693ae5697a7b59e2add4b92f9e5b0e3c
- https://git.kernel.org/stable/c/fa71639873518e3587632ae58e25e4a96b57fa90



