[syzbot] [mm?] [bcachefs?] UBSAN: shift-out-of-bounds in xas_reload

5 views
Skip to first unread message

syzbot

unread,
Feb 6, 2025, 8:01:26 PMFeb 6
Hello,

syzbot found the following issue on:

HEAD commit: 92514ef226f5 Merge tag 'for-6.14-rc1-tag' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14761318580000
kernel config: https://syzkaller.appspot.com/x/.config?x=1909f2f0d8e641ce
dashboard link: https://syzkaller.appspot.com/bug?extid=8ae0902c29b15a27a4ee
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17df01b0580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-92514ef2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c4d8b91f8769/vmlinux-92514ef2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c24ec4365966/bzImage-92514ef2.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/2f20c9ca14a0/mount_2.gz

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

------------[ cut here ]------------
UBSAN: shift-out-of-bounds in ./include/linux/xarray.h:1604:27
shift exponent 192 is too large for 64-bit type 'unsigned long'
CPU: 0 UID: 0 PID: 5696 Comm: syz.4.33 Not tainted 6.14.0-rc1-syzkaller-00034-g92514ef226f5 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:231 [inline]
__ubsan_handle_shift_out_of_bounds+0x3c8/0x420 lib/ubsan.c:468
xas_reload+0x434/0x470 include/linux/xarray.h:1604
find_get_entry mm/filemap.c:2032 [inline]
find_lock_entries+0x2d4/0xbb0 mm/filemap.c:2119
shmem_undo_range+0x2d4/0x1820 mm/shmem.c:1094
shmem_truncate_range mm/shmem.c:1224 [inline]
shmem_evict_inode+0x29b/0xa80 mm/shmem.c:1352
evict+0x4e8/0x9a0 fs/inode.c:796
__dentry_kill+0x20d/0x630 fs/dcache.c:643
dput+0x19f/0x2b0 fs/dcache.c:885
__fput+0x60b/0x9f0 fs/file_table.c:456
__do_sys_close fs/open.c:1579 [inline]
__se_sys_close fs/open.c:1564 [inline]
__x64_sys_close+0x7f/0x110 fs/open.c:1564
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4dd9f8ba4a
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 43 91 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 a3 91 02 00 8b 44 24
RSP: 002b:00007f4ddae87e00 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007f4dd9f8ba4a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000005939
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000004
R13: 00007f4ddae87ef0 R14: 00007f4ddae87eb0 R15: 00007f4dd0c00000
</TASK>
---[ end trace ]---


---
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

syzbot

unread,
Feb 15, 2025, 2:59:22 PMFeb 15
syzbot has found a reproducer for the following issue on:

HEAD commit: 04f41cbf03ec Merge tag 'sched_ext-for-6.14-rc2-fixes' of g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16c799a4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c776e555cfbdb82d
dashboard link: https://syzkaller.appspot.com/bug?extid=8ae0902c29b15a27a4ee
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15b8e098580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ece7df980000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-04f41cbf.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/04aaec67f85e/vmlinux-04f41cbf.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b8db5fac3a6/bzImage-04f41cbf.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/84576e830d0a/mount_0.gz

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

UBSAN: shift-out-of-bounds in ./include/linux/xarray.h:1604:27
shift exponent 128 is too large for 64-bit type 'unsigned long'
CPU: 0 UID: 0 PID: 5383 Comm: syz-executor156 Not tainted 6.14.0-rc2-syzkaller-00228-g04f41cbf03ec #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:231 [inline]
__ubsan_handle_shift_out_of_bounds+0x3c8/0x420 lib/ubsan.c:468
xas_reload+0x434/0x470 include/linux/xarray.h:1604
find_get_entry mm/filemap.c:2032 [inline]
find_lock_entries+0x2d4/0xbb0 mm/filemap.c:2119
shmem_undo_range+0x2d4/0x1820 mm/shmem.c:1094
shmem_truncate_range mm/shmem.c:1224 [inline]
shmem_evict_inode+0x29b/0xa80 mm/shmem.c:1352
evict+0x4e8/0x9a0 fs/inode.c:796
__dentry_kill+0x20d/0x630 fs/dcache.c:643
dput+0x19f/0x2b0 fs/dcache.c:885
__fput+0x60b/0x9f0 fs/file_table.c:472
__do_sys_close fs/open.c:1580 [inline]
__se_sys_close fs/open.c:1565 [inline]
__x64_sys_close+0x7f/0x110 fs/open.c:1565
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f519f1cefca
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 83 83 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 e3 83 02 00 8b 44 24
RSP: 002b:00007f519e977fc0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f519e977ff0 RCX: 00007f519f1cefca
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007f519f25c480 R08: 0000000000000000 R09: 0000000000005931
R10: 0000000000000000 R11: 0000000000000293 R12: 00007f519f25c48c
R13: 00007f519e978030 R14: 0000000000000003 R15: 00007ffe2518a5c8
</TASK>
---[ end trace ]---


---
Reply all
Reply to author
Forward
0 new messages