Squashfs: check return result of sb_min_blocksize

Summary

CVECVE-2025-38415
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2025-07-25 14:15:33 UTC
Updated2026-06-18 21:16:28 UTC
DescriptionIn 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().

Risk And Classification

Primary CVSS: v3.1 7.8 HIGH from [email protected]

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Problem Types: CWE-787

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Linux Linux Kernel All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac db7096ea160e40d78c67fce52e7cc51bde049497 git Not specified
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac 549f9e3d7b60d53808c98b9fde49b4f46d0524a5 git Not specified
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac 5c51aa862cbeed2f3887f0382a2708956710bd68 git Not specified
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac 6abf6b78c6fb112eee495f5636ffcc350dd2ce25 git Not specified
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac 4f99357dadbf9c979ad737156ad4c37fadf7c56b git Not specified
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac 0aff95d9bc7fb5400ca8af507429c4b067bdb425 git Not specified
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac 295ab18c2dbce8d0ac6ecf7c5187e16e1ac8b282 git Not specified
CNA Linux Linux affected 0aa666190509ffab81c202c5095a166be23961ac 734aa85390ea693bb7eaf2240623d41b03705c84 git Not specified
CNA Linux Linux affected 2.6.29 Not specified
CNA Linux Linux unaffected 2.6.29 semver Not specified
CNA Linux Linux unaffected 5.4.295 5.4.* semver Not specified
CNA Linux Linux unaffected 5.10.239 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.186 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.142 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.94 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.34 6.12.* semver Not specified
CNA Linux Linux unaffected 6.15.3 6.15.* semver Not specified
CNA Linux Linux unaffected 6.16 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/295ab18c2dbce8d0ac6ecf7c5187e16e1ac8b282 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
git.kernel.org/stable/c/db7096ea160e40d78c67fce52e7cc51bde049497 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
lists.debian.org/debian-lts-announce/2025/10/msg00008.html af854a3a-2127-422b-91ae-364da2661108 lists.debian.org Mailing List, Third Party Advisory
git.kernel.org/stable/c/4f99357dadbf9c979ad737156ad4c37fadf7c56b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
git.kernel.org/stable/c/5c51aa862cbeed2f3887f0382a2708956710bd68 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
git.kernel.org/stable/c/6abf6b78c6fb112eee495f5636ffcc350dd2ce25 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
git.kernel.org/stable/c/734aa85390ea693bb7eaf2240623d41b03705c84 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
git.kernel.org/stable/c/549f9e3d7b60d53808c98b9fde49b4f46d0524a5 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
git.kernel.org/stable/c/0aff95d9bc7fb5400ca8af507429c4b067bdb425 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org Patch
lists.debian.org/debian-lts-announce/2025/10/msg00007.html af854a3a-2127-422b-91ae-364da2661108 lists.debian.org Mailing List, Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report