LinuxカーネルのSquashfsにおけるsb_min_blocksizeの戻り値未検証によりシフト制限を逸脱する可能性がある脆弱性
タイトル LinuxカーネルのSquashfsにおけるsb_min_blocksizeの戻り値未検証によりシフト制限を逸脱する可能性がある脆弱性
概要

Linuxカーネルには、Squashfsファイルシステムにおいてsb_min_blocksizeの戻り値が正しく確認されていない問題がありました。Syzkallerにより、「UBSAN: shift-out-of-bounds in squashfs_bio_read」というバグが報告されています。複数のプロセスによる同時操作やマウント時のブロックサイズ指定により、sb_min_blocksizeが0を返す場合があり、その結果、異常なシフト演算が発生することが判明しました。この問題を防ぐため、sb_min_blocksizeの戻り値が0の場合に適切なチェック処理が追加されました。

想定される影響 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2025年7月25日0:00
登録日 2025年12月25日16:58
最終更新日 2025年12月25日16:58
CVSS3.0 : 重要
スコア 7.8
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
Debian
Debian GNU/Linux 11.0
Linux
Linux Kernel 2.6.29 から 5.4.295 未満
Linux Kernel 5.11 から 5.15.186 未満
Linux Kernel 5.16 から 6.1.142 未満
Linux Kernel 5.5 から 5.10.239 未満
Linux Kernel 6.13 から 6.15.3 未満
Linux Kernel 6.2 から 6.6.94 未満
Linux Kernel 6.7 から 6.12.34 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2025年12月25日]
  掲載
2025年12月25日16:58

NVD脆弱性情報
CVE-2025-38415
概要

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().

公表日 2025年7月25日23:15
登録日 2025年7月26日4:00
最終更新日 2025年7月25日23:15
関連情報、対策とツール
共通脆弱性一覧