syzbot


BUG: unable to handle kernel paging request in shmem_undo_range

Status: upstream: reported syz repro on 2025/02/17 12:25
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+fca99d11e65ca4c28b41@syzkaller.appspotmail.com
First crash: 102d, last: 65d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] [ntfs3?] BUG: unable to handle kernel paging request in shmem_undo_range 0 (1) 2025/02/17 12:25
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/05/17 08:38 19m retest repro upstream OK log
2025/03/03 12:23 24m retest repro upstream report log

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3(loop0): Failed to load $UpCase (-22).
BUG: unable to handle page fault for address: fffff52101a60eeb
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 5ffcc067 P4D 5ffcc067 PUD 0 
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5326 Comm: syz.0.0 Not tainted 6.14.0-rc3-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:folio_batch_count include/linux/pagevec.h:56 [inline]
RIP: 0010:shmem_undo_range+0x4a9/0x1820 mm/shmem.c:1096
Code: 89 f2 e8 4a 81 00 00 48 01 44 24 40 eb 17 e8 8e c6 bc ff 48 bb 00 00 00 00 00 fc ff df 4c 89 f7 e8 5c 84 f5 ff 48 8b 44 24 60 <0f> b6 04 18 84 c0 4c 8b 74 24 30 75 22 0f b6 84 24 e0 00 00 00 49
RSP: 0018:ffffc9000d307680 EFLAGS: 00010283
RAX: 1ffff92001a60eec RBX: dffffc00ffffffff RCX: 0000000000100000
RDX: ffffc9000e7da000 RSI: 000000000000bf4e RDI: 000000000000bf4f
RBP: ffffc9000d307a50 R08: ffffffff81fa770e R09: 1ffffd400026b560
R10: dffffc0000000000 R11: fffff9400026b561 R12: 000000000000000b
R13: 000000000000000c R14: ffffea000135ab00 R15: ffffc9000d3078f8
FS:  00007f30c48d56c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff52101a60eeb CR3: 000000004109e000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 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:0x7f30c398ba4a
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:00007f30c48d4e50 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: ffffffffffffffff RCX: 00007f30c398ba4a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000016
R13: 00007f30c48d4eb0 R14: 000000000001f768 R15: 0000400000000400
 </TASK>
Modules linked in:
CR2: fffff52101a60eeb
---[ end trace 0000000000000000 ]---
RIP: 0010:folio_batch_count include/linux/pagevec.h:56 [inline]
RIP: 0010:shmem_undo_range+0x4a9/0x1820 mm/shmem.c:1096
Code: 89 f2 e8 4a 81 00 00 48 01 44 24 40 eb 17 e8 8e c6 bc ff 48 bb 00 00 00 00 00 fc ff df 4c 89 f7 e8 5c 84 f5 ff 48 8b 44 24 60 <0f> b6 04 18 84 c0 4c 8b 74 24 30 75 22 0f b6 84 24 e0 00 00 00 49
RSP: 0018:ffffc9000d307680 EFLAGS: 00010283
RAX: 1ffff92001a60eec RBX: dffffc00ffffffff RCX: 0000000000100000
RDX: ffffc9000e7da000 RSI: 000000000000bf4e RDI: 000000000000bf4f
RBP: ffffc9000d307a50 R08: ffffffff81fa770e R09: 1ffffd400026b560
R10: dffffc0000000000 R11: fffff9400026b561 R12: 000000000000000b
R13: 000000000000000c R14: ffffea000135ab00 R15: ffffc9000d3078f8
FS:  00007f30c48d56c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff52101a60eeb CR3: 000000004109e000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	89 f2                	mov    %esi,%edx
   2:	e8 4a 81 00 00       	call   0x8151
   7:	48 01 44 24 40       	add    %rax,0x40(%rsp)
   c:	eb 17                	jmp    0x25
   e:	e8 8e c6 bc ff       	call   0xffbcc6a1
  13:	48 bb 00 00 00 00 00 	movabs $0xdffffc0000000000,%rbx
  1a:	fc ff df
  1d:	4c 89 f7             	mov    %r14,%rdi
  20:	e8 5c 84 f5 ff       	call   0xfff58481
  25:	48 8b 44 24 60       	mov    0x60(%rsp),%rax
* 2a:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	4c 8b 74 24 30       	mov    0x30(%rsp),%r14
  35:	75 22                	jne    0x59
  37:	0f b6 84 24 e0 00 00 	movzbl 0xe0(%rsp),%eax
  3e:	00
  3f:	49                   	rex.WB

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/17 09:02 upstream 0ad2507d5d93 4121cf9d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root BUG: unable to handle kernel paging request in shmem_undo_range
2025/03/26 19:26 upstream 1e26c5e28ca5 19e40f48 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: stack-out-of-bounds Read in shmem_undo_range
2025/02/17 12:13 upstream 0ad2507d5d93 4121cf9d .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root KASAN: stack-out-of-bounds Read in shmem_undo_range
* Struck through repros no longer work on HEAD.