[v5.15] UBSAN: shift-out-of-bounds in extAlloc (2)

0 views
Skip to first unread message

syzbot

unread,
May 14, 2025, 6:45:30 AMMay 14
Hello,

syzbot found the following issue on:

HEAD commit: 3b8db0e4f263 Linux 5.15.182
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11661cd4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=dd5e00a2e31fafd7
dashboard link: https://syzkaller.appspot.com/bug?extid=fd9bfadbf8265184a6b7
compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=123beaf4580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12d6caf4580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ff1afedf7b4d/disk-3b8db0e4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/19cb045784cf/vmlinux-3b8db0e4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/43c663d2f6a5/Image-3b8db0e4.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/98b199a15c65/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=143beaf4580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

loop0: detected capacity change from 0 to 32768
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_extent.c:516:16
shift exponent 108 is too large for 64-bit type 's64' (aka 'long long')
CPU: 0 PID: 4022 Comm: syz-executor958 Not tainted 5.15.182-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Call trace:
dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
ubsan_epilogue+0x14/0x48 lib/ubsan.c:151
__ubsan_handle_shift_out_of_bounds+0x2b4/0x358 lib/ubsan.c:321
extBalloc fs/jfs/jfs_extent.c:516 [inline]
extAlloc+0xaa8/0xdc4 fs/jfs/jfs_extent.c:125
jfs_get_block+0x2bc/0x8ec fs/jfs/inode.c:258
nobh_write_begin+0x2d8/0x9d4 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x204/0x480 mm/filemap.c:3785
__generic_file_write_iter+0x23c/0x454 mm/filemap.c:3912
generic_file_write_iter+0xb0/0x1b4 mm/filemap.c:3944
call_write_iter include/linux/fs.h:2172 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x7c8/0xa2c fs/read_write.c:594
ksys_write+0x120/0x210 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:656
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
================================================================================
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:2716:11
shift exponent 94 is too large for 32-bit type 'int'
CPU: 0 PID: 4022 Comm: syz-executor958 Not tainted 5.15.182-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Call trace:
dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
ubsan_epilogue+0x14/0x48 lib/ubsan.c:151
__ubsan_handle_shift_out_of_bounds+0x2b4/0x358 lib/ubsan.c:321
dbSplit+0x1d4/0x1d8 fs/jfs/jfs_dmap.c:2716
dbAdjCtl+0x2bc/0x8c8 fs/jfs/jfs_dmap.c:2608
dbAllocDmap+0xb0/0x128 fs/jfs/jfs_dmap.c:2119
dbAllocNext+0x35c/0x3a0 fs/jfs/jfs_dmap.c:1254
dbAlloc+0x334/0x978 fs/jfs/jfs_dmap.c:820
extBalloc fs/jfs/jfs_extent.c:523 [inline]
extAlloc+0x3f4/0xdc4 fs/jfs/jfs_extent.c:125
jfs_get_block+0x2bc/0x8ec fs/jfs/inode.c:258
nobh_write_begin+0x2d8/0x9d4 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x204/0x480 mm/filemap.c:3785
__generic_file_write_iter+0x23c/0x454 mm/filemap.c:3912
generic_file_write_iter+0xb0/0x1b4 mm/filemap.c:3944
call_write_iter include/linux/fs.h:2172 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x7c8/0xa2c fs/read_write.c:594
ksys_write+0x120/0x210 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:656
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
================================================================================
------------[ cut here ]------------
WARNING: CPU: 0 PID: 4022 at fs/jfs/jfs_dmap.c:2950 dbAdjTree+0x3a8/0x414 fs/jfs/jfs_dmap.c:2950
Modules linked in:
CPU: 0 PID: 4022 Comm: syz-executor958 Not tainted 5.15.182-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : dbAdjTree+0x3a8/0x414 fs/jfs/jfs_dmap.c:2950
lr : dbAdjTree+0x3a8/0x414 fs/jfs/jfs_dmap.c:2950
sp : ffff80001cf971f0
x29: ffff80001cf97200 x28: dfff800000000000 x27: ffff0000d5754011
x26: 000000000000005e x25: ffff0000d5754000 x24: 0000000040000155
x23: ffff0000d5754008 x22: 0000000000000555 x21: 0000000040000000
x20: 000000000000006b x19: dfff800000000000 x18: 0000000000000001
x17: 0000000000000000 x16: ffff8000081844d8 x15: 00000000ffffffff
x14: 0000000000ff0100 x13: 0000000000000001 x12: 0000000000ff0100
x11: 0000000000000000 x10: 0000000000000000 x9 : ffff8000097a9dec
x8 : ffff0000c2718000 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001cf96a98 x4 : ffff80001422f280 x3 : 0000000000000001
x2 : 000000000000006b x1 : 0000000000000555 x0 : 0000000040000155
Call trace:
dbAdjTree+0x3a8/0x414 fs/jfs/jfs_dmap.c:2950
dbSplit+0x10c/0x1d8 fs/jfs/jfs_dmap.c:2723
dbAdjCtl+0x2bc/0x8c8 fs/jfs/jfs_dmap.c:2608
dbAllocDmap+0xb0/0x128 fs/jfs/jfs_dmap.c:2119
dbAllocNext+0x35c/0x3a0 fs/jfs/jfs_dmap.c:1254
dbAlloc+0x334/0x978 fs/jfs/jfs_dmap.c:820
extBalloc fs/jfs/jfs_extent.c:523 [inline]
extAlloc+0x3f4/0xdc4 fs/jfs/jfs_extent.c:125
jfs_get_block+0x2bc/0x8ec fs/jfs/inode.c:258
nobh_write_begin+0x2d8/0x9d4 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x204/0x480 mm/filemap.c:3785
__generic_file_write_iter+0x23c/0x454 mm/filemap.c:3912
generic_file_write_iter+0xb0/0x1b4 mm/filemap.c:3944
call_write_iter include/linux/fs.h:2172 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x7c8/0xa2c fs/read_write.c:594
ksys_write+0x120/0x210 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:656
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 106784
hardirqs last enabled at (106783): [<ffff8000082f7640>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257
hardirqs last disabled at (106784): [<ffff8000111a0cd0>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:396
softirqs last enabled at (106768): [<ffff80000819d0d8>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (106768): [<ffff80000819d0d8>] handle_softirqs+0xa4c/0xbf0 kernel/softirq.c:586
softirqs last disabled at (106751): [<ffff80000819d6dc>] __do_softirq kernel/softirq.c:592 [inline]
softirqs last disabled at (106751): [<ffff80000819d6dc>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (106751): [<ffff80000819d6dc>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (106751): [<ffff80000819d6dc>] __irq_exit_rcu+0x240/0x440 kernel/softirq.c:641
---[ end trace b9cf5642d8deefa6 ]---
JFS: block map error in dbBackSplit


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at [email protected].

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages