{"id":"CVE-2025-38415","summary":"Squashfs: check return result of sb_min_blocksize","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nSquashfs: check return result of sb_min_blocksize\n\nSyzkaller reports an \"UBSAN: shift-out-of-bounds in squashfs_bio_read\" bug.\n\nSyzkaller forks multiple processes which after mounting the Squashfs\nfilesystem, issues an ioctl(\"/dev/loop0\", LOOP_SET_BLOCK_SIZE, 0x8000). \nNow if this ioctl occurs at the same time another process is in the\nprocess of mounting a Squashfs filesystem on /dev/loop0, the failure\noccurs.  When this happens the following code in squashfs_fill_super()\nfails.\n\n----\nmsblk-\u003edevblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE);\nmsblk-\u003edevblksize_log2 = ffz(~msblk-\u003edevblksize);\n----\n\nsb_min_blocksize() returns 0, which means msblk-\u003edevblksize is set to 0.\n\nAs a result, ffz(~msblk-\u003edevblksize) returns 64, and msblk-\u003edevblksize_log2\nis set to 64.\n\nThis subsequently causes the\n\nUBSAN: shift-out-of-bounds in fs/squashfs/block.c:195:36\nshift exponent 64 is too large for 64-bit type 'u64' (aka\n'unsigned long long')\n\nThis commit adds a check for a 0 return by sb_min_blocksize().","modified":"2026-04-16T04:35:08.403665144Z","published":"2025-07-25T13:32:09.711Z","related":["ALSA-2026:1661","ALSA-2026:1662","ALSA-2026:2212","ALSA-2026:2282","SUSE-SU-2025:02846-1","SUSE-SU-2025:02853-1","SUSE-SU-2025:02923-1","SUSE-SU-2025:02969-1","SUSE-SU-2025:02996-1","SUSE-SU-2025:02997-1","SUSE-SU-2025:03011-1","SUSE-SU-2025:03023-1","SUSE-SU-2025:20577-1","SUSE-SU-2025:20586-1","SUSE-SU-2025:20601-1","SUSE-SU-2025:20602-1","SUSE-SU-2025:21074-1","SUSE-SU-2025:21139-1","SUSE-SU-2025:21179-1","openSUSE-SU-2025:20081-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38415.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0aff95d9bc7fb5400ca8af507429c4b067bdb425"},{"type":"WEB","url":"https://git.kernel.org/stable/c/295ab18c2dbce8d0ac6ecf7c5187e16e1ac8b282"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4f99357dadbf9c979ad737156ad4c37fadf7c56b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/549f9e3d7b60d53808c98b9fde49b4f46d0524a5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5c51aa862cbeed2f3887f0382a2708956710bd68"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6abf6b78c6fb112eee495f5636ffcc350dd2ce25"},{"type":"WEB","url":"https://git.kernel.org/stable/c/734aa85390ea693bb7eaf2240623d41b03705c84"},{"type":"WEB","url":"https://git.kernel.org/stable/c/db7096ea160e40d78c67fce52e7cc51bde049497"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38415.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38415"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0aa666190509ffab81c202c5095a166be23961ac"},{"fixed":"db7096ea160e40d78c67fce52e7cc51bde049497"},{"fixed":"549f9e3d7b60d53808c98b9fde49b4f46d0524a5"},{"fixed":"5c51aa862cbeed2f3887f0382a2708956710bd68"},{"fixed":"6abf6b78c6fb112eee495f5636ffcc350dd2ce25"},{"fixed":"4f99357dadbf9c979ad737156ad4c37fadf7c56b"},{"fixed":"0aff95d9bc7fb5400ca8af507429c4b067bdb425"},{"fixed":"295ab18c2dbce8d0ac6ecf7c5187e16e1ac8b282"},{"fixed":"734aa85390ea693bb7eaf2240623d41b03705c84"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38415.json"}}],"schema_version":"1.7.5"}