[v5.15] UBSAN: shift-out-of-bounds in befs_check_sb

0 views
Skip to first unread message

syzbot

unread,
Jul 27, 2023, 8:42:13 PM7/27/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 09996673e313 Linux 5.15.123
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10f50336a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=b234d12d7c90a2e8
dashboard link: https://syzkaller.appspot.com/bug?extid=affd78fff833c2695d02
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17bff365a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=136a9c7ea80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/20ccf0af5ae0/disk-09996673.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3f784a67f3fb/vmlinux-09996673.xz
kernel image: https://storage.googleapis.com/syzbot-assets/27ac27fd1514/Image-09996673.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/37df7e25ec3f/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+affd78...@syzkaller.appspotmail.com

loop0: detected capacity change from 0 to 128
================================================================================
UBSAN: shift-out-of-bounds in fs/befs/super.c:96:9
shift exponent 3229888891 is too large for 32-bit type 'int'
CPU: 1 PID: 3973 Comm: syz-executor100 Not tainted 5.15.123-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_shift_out_of_bounds+0x2f8/0x378 lib/ubsan.c:321
befs_check_sb+0x480/0x4a0 fs/befs/super.c:96
befs_fill_super+0x8a0/0xdb0 fs/befs/linuxvfs.c:874
mount_bdev+0x274/0x370 fs/super.c:1378
befs_mount+0x44/0x58 fs/befs/linuxvfs.c:978
legacy_get_tree+0xd4/0x16c fs/fs_context.c:611
vfs_get_tree+0x90/0x274 fs/super.c:1508
do_new_mount+0x25c/0x8c4 fs/namespace.c:2994
path_mount+0x590/0x104c fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount fs/namespace.c:3522 [inline]
__arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
__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+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
================================================================================
befs: (loop0): block_shift disagrees with block_size. Corruption likely.


---
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 syzk...@googlegroups.com.

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

If the bug is already fixed, 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 change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

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

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Aug 4, 2023, 8:55:04 PM8/4/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 52a953d0934b Linux 6.1.43
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=177774f9a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=dbf2a0c189909afc
dashboard link: https://syzkaller.appspot.com/bug?extid=eff469f255ca9e0c47f5
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1119f2eda80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1006bf39a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/175d4c49360c/disk-52a953d0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/06e8901f8922/vmlinux-52a953d0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1a4e0f41505a/Image-52a953d0.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/1f7c6a130923/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+eff469...@syzkaller.appspotmail.com

loop0: detected capacity change from 0 to 128
================================================================================
UBSAN: shift-out-of-bounds in fs/befs/super.c:96:9
shift exponent 3229888891 is too large for 32-bit type 'int'
CPU: 0 PID: 4217 Comm: syz-executor212 Not tainted 6.1.43-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:321
befs_check_sb+0x480/0x4a0 fs/befs/super.c:96
befs_fill_super+0x8a0/0xdb0 fs/befs/linuxvfs.c:873
mount_bdev+0x274/0x370 fs/super.c:1423
befs_mount+0x44/0x58 fs/befs/linuxvfs.c:977
legacy_get_tree+0xd4/0x16c fs/fs_context.c:611
vfs_get_tree+0x90/0x274 fs/super.c:1553
do_new_mount+0x25c/0x8c4 fs/namespace.c:3040
path_mount+0x590/0xe58 fs/namespace.c:3370
do_mount fs/namespace.c:3383 [inline]
__do_sys_mount fs/namespace.c:3591 [inline]
__se_sys_mount fs/namespace.c:3568 [inline]
__arm64_sys_mount+0x45c/0x594 fs/namespace.c:3568
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Reply all
Reply to author
Forward
0 new messages