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

CVE-2022-50478

Gravedad CVSS v3.1:
ALTA
Tipo:
CWE-125 Lectura fuera de límites
Fecha de publicación:
04/10/2025
Última modificación:
23/01/2026

Descripción

*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()<br /> <br /> Patch series "nilfs2: fix UBSAN shift-out-of-bounds warnings on mount<br /> time".<br /> <br /> The first patch fixes a bug reported by syzbot, and the second one fixes<br /> the remaining bug of the same kind. Although they are triggered by the<br /> same super block data anomaly, I divided it into the above two because the<br /> details of the issues and how to fix it are different.<br /> <br /> Both are required to eliminate the shift-out-of-bounds issues at mount<br /> time.<br /> <br /> <br /> This patch (of 2):<br /> <br /> If the block size exponent information written in an on-disk superblock is<br /> corrupted, nilfs_sb2_bad_offset helper function can trigger<br /> shift-out-of-bounds warning followed by a kernel panic (if panic_on_warn<br /> is set):<br /> <br /> shift exponent 38983 is too large for 64-bit type &amp;#39;unsigned long long&amp;#39;<br /> Call Trace:<br /> <br /> __dump_stack lib/dump_stack.c:88 [inline]<br /> dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106<br /> ubsan_epilogue lib/ubsan.c:151 [inline]<br /> __ubsan_handle_shift_out_of_bounds+0x33d/0x3b0 lib/ubsan.c:322<br /> nilfs_sb2_bad_offset fs/nilfs2/the_nilfs.c:449 [inline]<br /> nilfs_load_super_block+0xdf5/0xe00 fs/nilfs2/the_nilfs.c:523<br /> init_nilfs+0xb7/0x7d0 fs/nilfs2/the_nilfs.c:577<br /> nilfs_fill_super+0xb1/0x5d0 fs/nilfs2/super.c:1047<br /> nilfs_mount+0x613/0x9b0 fs/nilfs2/super.c:1317<br /> ...<br /> <br /> In addition, since nilfs_sb2_bad_offset() performs multiplication without<br /> considering the upper bound, the computation may overflow if the disk<br /> layout parameters are not normal.<br /> <br /> This fixes these issues by inserting preliminary sanity checks for those<br /> parameters and by converting the comparison from one involving<br /> multiplication and left bit-shifting to one using division and right<br /> bit-shifting.

Productos y versiones vulnerables

CPE Desde Hasta
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 2.6.30 (incluyendo) 4.9.337 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.10 (incluyendo) 4.14.303 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.15 (incluyendo) 4.19.270 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (incluyendo) 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)