// For flags

CVE-2025-38415

Squashfs: check return result of sb_min_blocksize

Severity Score

"-"
*CVSS v-

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

In the Linux kernel, the following vulnerability has been resolved: Squashfs: check return result of sb_min_blocksize Syzkaller reports an "UBSAN: shift-out-of-bounds in squashfs_bio_read" bug. Syzkaller forks multiple processes which after mounting the Squashfs
filesystem, issues an ioctl("/dev/loop0", LOOP_SET_BLOCK_SIZE, 0x8000). Now if this ioctl occurs at the same time another process is in the
process of mounting a Squashfs filesystem on /dev/loop0, the failure
occurs. When this happens the following code in squashfs_fill_super()
fails. ----
msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE);
msblk->devblksize_log2 = ffz(~msblk->devblksize);
---- sb_min_blocksize() returns 0, which means msblk->devblksize is set to 0. As a result, ffz(~msblk->devblksize) returns 64, and msblk->devblksize_log2
is set to 64. This subsequently causes the UBSAN: shift-out-of-bounds in fs/squashfs/block.c:195:36
shift exponent 64 is too large for 64-bit type 'u64' (aka
'unsigned long long') This commit adds a check for a 0 return by sb_min_blocksize().

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: Squashfs: comprobar el resultado devuelto de sb_min_blocksize. Syzkaller informa del error "UBSAN: desplazamiento fuera de los límites en squashfs_bio_read". Syzkaller bifurca varios procesos que, tras montar el sistema de archivos Squashfs, emiten una instrucción ioctl("/dev/loop0", LOOP_SET_BLOCK_SIZE, 0x8000). Si esta instrucción ioctl se produce al mismo tiempo que otro proceso está montando un sistema de archivos Squashfs en /dev/loop0, se produce el fallo. En este caso, el siguiente código en squashfs_fill_super() falla: ---- msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE); msblk->devblksize_log2 = ffz(~msblk->devblksize); ---- sb_min_blocksize() devuelve 0, lo que significa que msblk->devblksize está establecido en 0. Como resultado, ffz(~msblk->devblksize) devuelve 64 y msblk->devblksize_log2 está establecido en 64. Esto posteriormente provoca el UBSAN: shift-out-of-bounds en fs/squashfs/block.c:195:36 el exponente de desplazamiento 64 es demasiado grande para el tipo de 64 bits 'u64' (también conocido como 'unsigned long long') Esta confirmación agrega una comprobación para un retorno de 0 por sb_min_blocksize().

*Credits: N/A
CVSS Scores
Attack Vector
-
Attack Complexity
-
Privileges Required
-
User Interaction
-
Scope
-
Confidentiality
-
Integrity
-
Availability
-
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2025-04-16 CVE Reserved
  • 2025-07-25 CVE Published
  • 2025-07-28 CVE Updated
  • 2025-07-31 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 5.4.295
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 5.4.295"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 5.10.239
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 5.10.239"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 5.15.186
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 5.15.186"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 6.1.142
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 6.1.142"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 6.6.94
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 6.6.94"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 6.12.34
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 6.12.34"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 6.15.3
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 6.15.3"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 2.6.29 < 6.16
Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.29 < 6.16"
en
Affected