syzbot


UBSAN: shift-out-of-bounds in xas_reload

Status: auto-obsoleted due to no activity on 2025/08/03 04:05
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+8ae0902c29b15a27a4ee@syzkaller.appspotmail.com
First crash: 179d, last: 165d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [mm?] [bcachefs?] UBSAN: shift-out-of-bounds in xas_reload 0 (3) 2025/07/20 04:05
[syzbot] [mm?] [bcachefs?] KASAN: slab-out-of-bounds Read in folio_try_get 2 (4) 2025/07/20 04:04
Last patch testing requests (9)
Created Duration User Patch Repo Result
2025/07/26 06:34 20m retest repro upstream OK log
2025/05/17 05:40 20m retest repro upstream OK log
2025/05/17 05:40 20m retest repro upstream OK log
2025/05/17 05:40 28m retest repro upstream report log
2025/05/17 05:40 19m retest repro upstream OK log
2025/03/06 13:31 0m retest repro upstream error
2025/03/06 13:31 0m retest repro upstream error
2025/03/06 13:31 18m retest repro upstream report log
2025/03/06 13:31 21m retest repro upstream report log

Sample crash report:
bcachefs (loop0): shutdown complete
bcachefs: bch2_fs_get_tree() error: ENOENT_bkey_type_mismatch
------------[ 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: 5483 Comm: syz.0.19 Not tainted 6.14.0-rc3-syzkaller-00079-g87a132e73910 #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
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x13f/0x340 kernel/entry/common.c:218
 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fddaa38ba4a
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:00007fddab2cbe50 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: ffffffffffffffff RCX: 00007fddaa38ba4a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000010000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000002
R13: 00007fddab2cbeb0 R14: 0000000000005912 R15: 0000400000000000
 </TASK>
---[ end trace ]---

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/20 13:30 upstream 87a132e73910 50668798 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root UBSAN: shift-out-of-bounds in xas_reload
2025/02/16 08:58 upstream ad1b832bf1cf 40a34ec9 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root UBSAN: shift-out-of-bounds in xas_reload
2025/02/15 11:58 upstream 04f41cbf03ec 40a34ec9 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root UBSAN: shift-out-of-bounds in xas_reload
2025/02/06 00:29 upstream 92514ef226f5 577d049b .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root UBSAN: shift-out-of-bounds in xas_reload
* Struck through repros no longer work on HEAD.