syzbot


UBSAN: shift-out-of-bounds in befs_check_sb

Status: upstream: reported C repro on 2025/12/19 17:02
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+f3b996ee2b7d1ffea6bc@syzkaller.appspotmail.com
First crash: 3d14h, last: 3d13h
Bug presence (1)
Date Name Commit Repro Result
2025/12/20 upstream (ToT) dd9b004b7ff3 C [report] UBSAN: shift-out-of-bounds in befs_check_sb
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 UBSAN: shift-out-of-bounds in befs_check_sb origin:upstream -1 C error 19 3d14h 871d 0/3 upstream: reported C repro on 2023/08/05 00:55
linux-5.15 UBSAN: shift-out-of-bounds in befs_check_sb origin:upstream -1 C error 16 3d14h 879d 0/3 upstream: reported C repro on 2023/07/28 00:42
upstream UBSAN: shift-out-of-bounds in befs_check_sb fs -1 C error done 79 3d08h 894d 0/29 upstream: reported C repro on 2023/07/12 13:47

Sample crash report:
syz.0.17[5926]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
loop0: detected capacity change from 0 to 128
================================================================================
UBSAN: shift-out-of-bounds in fs/befs/super.c:96:9
shift exponent 2066842816 is too large for 32-bit type 'int'
CPU: 0 PID: 5926 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
 ubsan_epilogue+0xa/0x30 lib/ubsan.c:217
 __ubsan_handle_shift_out_of_bounds+0x380/0x400 lib/ubsan.c:387
 befs_check_sb+0x419/0x4c0 fs/befs/super.c:96
 befs_fill_super+0x8b2/0xe50 fs/befs/linuxvfs.c:873
 mount_bdev+0x22b/0x2d0 fs/super.c:1643
 legacy_get_tree+0xea/0x180 fs/fs_context.c:662
 vfs_get_tree+0x8c/0x280 fs/super.c:1764
 do_new_mount+0x24b/0xa40 fs/namespace.c:3386
 do_mount fs/namespace.c:3726 [inline]
 __do_sys_mount fs/namespace.c:3935 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3912
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f81beb90eea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff98e98d18 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff98e98da0 RCX: 00007f81beb90eea
RDX: 0000200000000040 RSI: 0000200000000000 RDI: 00007fff98e98d60
RBP: 0000200000000040 R08: 00007fff98e98da0 R09: 0000000000800001
R10: 0000000000800001 R11: 0000000000000246 R12: 0000200000000000
R13: 00007fff98e98d60 R14: 0000000000009e17 R15: 0000200000000080
 </TASK>
================================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/19 17:35 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-6-kasan UBSAN: shift-out-of-bounds in befs_check_sb
2025/12/19 17:03 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan UBSAN: shift-out-of-bounds in befs_check_sb
2025/12/19 17:02 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan UBSAN: shift-out-of-bounds in befs_check_sb
* Struck through repros no longer work on HEAD.