CVE-2025-38415: Squashfs: check return result of sb_min_blocksize

Published Jul 25, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

Squashfs: check return result of sbminblocksize

Syzkaller reports an "UBSAN: shift-out-of-bounds in squashfsbioread" bug.

Syzkaller forks multiple processes which after mounting the Squashfs filesystem, issues an ioctl("/dev/loop0", LOOPSETBLOCKSIZE, 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 squashfsfillsuper() fails.

---- msblk->devblksize = sbminblocksize(sb, SQUASHFSDEVBLKSIZE); msblk->devblksizelog2 = ffz(~msblk->devblksize); ----

sbminblocksize() returns 0, which means msblk->devblksize is set to 0.

As a result, ffz(~msblk->devblksize) returns 64, and msblk->devblksizelog2 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 sbminblocksize().

Other sources

In the Linux kernel, the following vulnerability has been resolved:

Squashfs: check return result of sbminblocksize

Syzkaller reports an "UBSAN: shift-out-of-bounds in squashfsbioread" bug.

Syzkaller forks multiple processes which after mounting the Squashfs filesystem, issues an ioctl("/dev/loop0", LOOPSETBLOCKSIZE, 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 squashfsfillsuper() fails.

---- msblk-devblksize = sbminblocksize(sb, SQUASHFSDEVBLKSIZE); msblk-devblksizelog2 = ffz(~msblk-devblksize); ----

sbminblocksize() returns 0, which means msblk-devblksize is set to 0.

As a result, ffz(~msblk-devblksize) returns 64, and msblk-devblksizelog2 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 sbminblocksize().

IBM

Affected Software

15 affected componentsFixes available
Linux Linux kernel
Microsoft azl3 kernel 6.6.96.1-1
Microsoft azl3 kernel 6.6.92.2-2
Linux Linux kernel>=2.6.29<5.4.295
Linux Linux kernel>=5.5<5.10.239
Linux Linux kernel>=5.11<5.15.186
Linux Linux kernel>=5.16<6.1.142
Linux Linux kernel>=6.2<6.6.94
Linux Linux kernel>=6.7<6.12.34
Linux Linux kernel>=6.13<6.15.3
Debian Debian Linux=11.0
IBM Verify Identity Access<=11.0 - 11.0.2
IBM Security Verify Access<=10.0 - 10.0.9.1
IBM Verify Identity Access Container<=11.0 - 11.0.2
IBM Security Verify Access Container<=10.0 - 10.0.9.1

Event History

Jul 25, 2025
CVE Published
via MITRE·01:32 PM
Data Sourced
via MITRE·01:32 PM
Description
Data Sourced
via Red Hat·02:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Aug 7, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
SeverityAffected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Jul 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-38415?

CVE-2025-38415 has been rated as medium severity due to potential memory corruption risks.

2

How do I fix CVE-2025-38415?

To fix CVE-2025-38415, update your Linux kernel to the latest version that addresses this vulnerability.

3

What systems are affected by CVE-2025-38415?

CVE-2025-38415 affects all versions of the Linux kernel that include the Squashfs filesystem functionality.

4

What are the potential consequences of CVE-2025-38415?

Exploitation of CVE-2025-38415 may lead to system crashes or arbitrary code execution.

5

Is there a workaround for CVE-2025-38415?

Currently, the best approach is to apply the kernel update as there are no known effective workarounds.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203