syzbot


BUG: unable to handle kernel paging request in __folio_batch_add_and_move

Status: moderation: reported on 2025/01/10 13:42
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+1a77c61ab9c9abbf99bf@syzkaller.appspotmail.com
First crash: 8d19h, last: 8d19h

Sample crash report:
overlayfs: upper fs does not support tmpfile.
overlayfs: upper fs does not support RENAME_WHITEOUT.
BUG: unable to handle page fault for address: fffff52101a79b1b
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 5ffcc067 P4D 5ffcc067 PUD 0 
Oops: Oops: 0002 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5316 Comm: syz.0.0 Not tainted 6.13.0-rc6-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_add_and_move+0x84a/0xd70 mm/swap.c:202
Code: 9d 91 ff 65 8b 1d fe e0 27 7e 31 ff 89 de e8 4d 93 c3 ff 85 db 74 6c e8 04 8f c3 ff 48 8b 5c 24 18 48 c7 44 24 40 0e 36 e0 45 <49> c7 04 1c 00 00 00 00 66 41 c7 44 1c 09 00 00 41 c6 44 1c 0b 00
RSP: 0018:ffffc9000d3cd8a0 EFLAGS: 00010246
RAX: ffffffff81dbf588 RBX: 1ffff92001a79b1c RCX: 0000000000100000
RDX: ffffc9000f0b3000 RSI: 000000000000fc30 RDI: 000000000000fc31
RBP: ffffc9000d3cd990 R08: ffffffff81dbf513 R09: 1ffffffff203302e
R10: dffffc0000000000 R11: fffffbfff203302f R12: dffffc00ffffffff
R13: ffffea0001504940 R14: ffff88801fc37cf8 R15: 0000000000000000
FS:  00007fe4a52316c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff52101a79b1b CR3: 0000000042a16000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 filemap_add_folio+0x24e/0x380 mm/filemap.c:978
 __filemap_get_folio+0x4b2/0x940 mm/filemap.c:1950
 ntfs_get_frame_pages+0xbe/0x4b0 fs/ntfs3/file.c:945
 ntfs_compress_write+0x1154/0x2170 fs/ntfs3/file.c:1101
 ntfs_file_write_iter+0x4c4/0x7a0 fs/ntfs3/file.c:1266
 iter_file_splice_write+0xbfa/0x1510 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x11b/0x220 fs/splice.c:1164
 splice_direct_to_actor+0x586/0xc80 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0x289/0x3e0 fs/splice.c:1233
 ovl_copy_up_file+0x5ed/0x7e0 fs/overlayfs/copy_up.c:349
 ovl_copy_up_data+0x216/0x290 fs/overlayfs/copy_up.c:654
 ovl_copy_up_workdir fs/overlayfs/copy_up.c:796 [inline]
 ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline]
 ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline]
 ovl_copy_up_flags+0x1db8/0x46f0 fs/overlayfs/copy_up.c:1257
 ovl_open+0x139/0x310 fs/overlayfs/file.c:211
 do_dentry_open+0xbe1/0x1b70 fs/open.c:945
 vfs_open+0x3e/0x330 fs/open.c:1075
 dentry_open+0x61/0xa0 fs/open.c:1098
 ima_calc_file_hash+0x16b/0x1b30 security/integrity/ima/ima_crypto.c:553
 ima_collect_measurement+0x520/0xb10 security/integrity/ima/ima_api.c:293
 process_measurement+0x1351/0x1fb0 security/integrity/ima/ima_main.c:372
 ima_file_check+0xd9/0x120 security/integrity/ima/ima_main.c:572
 security_file_post_open+0xb9/0x280 security/security.c:3121
 do_open fs/namei.c:3830 [inline]
 path_openat+0x2ccd/0x3590 fs/namei.c:3987
 do_filp_open+0x27f/0x4e0 fs/namei.c:4014
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402
 do_sys_open fs/open.c:1417 [inline]
 __do_sys_openat fs/open.c:1433 [inline]
 __se_sys_openat fs/open.c:1428 [inline]
 __x64_sys_openat+0x247/0x2a0 fs/open.c:1428
 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:0x7fe4a4385d29
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4a5231038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4a4576080 RCX: 00007fe4a4385d29
RDX: 0000000000000083 RSI: 0000000020000000 RDI: ffffffffffffff9c
RBP: 00007fe4a4401b08 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe4a4576080 R15: 00007ffdcf7456e8
 </TASK>
Modules linked in:
CR2: fffff52101a79b1b
---[ end trace 0000000000000000 ]---
RIP: 0010:__folio_batch_add_and_move+0x84a/0xd70 mm/swap.c:202
Code: 9d 91 ff 65 8b 1d fe e0 27 7e 31 ff 89 de e8 4d 93 c3 ff 85 db 74 6c e8 04 8f c3 ff 48 8b 5c 24 18 48 c7 44 24 40 0e 36 e0 45 <49> c7 04 1c 00 00 00 00 66 41 c7 44 1c 09 00 00 41 c6 44 1c 0b 00
RSP: 0018:ffffc9000d3cd8a0 EFLAGS: 00010246
RAX: ffffffff81dbf588 RBX: 1ffff92001a79b1c RCX: 0000000000100000
RDX: ffffc9000f0b3000 RSI: 000000000000fc30 RDI: 000000000000fc31
RBP: ffffc9000d3cd990 R08: ffffffff81dbf513 R09: 1ffffffff203302e
R10: dffffc0000000000 R11: fffffbfff203302f R12: dffffc00ffffffff
R13: ffffea0001504940 R14: ffff88801fc37cf8 R15: 0000000000000000
FS:  00007fe4a52316c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff52101a79b1b CR3: 0000000042a16000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	9d                   	popf
   1:	91                   	xchg   %eax,%ecx
   2:	ff 65 8b             	jmp    *-0x75(%rbp)
   5:	1d fe e0 27 7e       	sbb    $0x7e27e0fe,%eax
   a:	31 ff                	xor    %edi,%edi
   c:	89 de                	mov    %ebx,%esi
   e:	e8 4d 93 c3 ff       	call   0xffc39360
  13:	85 db                	test   %ebx,%ebx
  15:	74 6c                	je     0x83
  17:	e8 04 8f c3 ff       	call   0xffc38f20
  1c:	48 8b 5c 24 18       	mov    0x18(%rsp),%rbx
  21:	48 c7 44 24 40 0e 36 	movq   $0x45e0360e,0x40(%rsp)
  28:	e0 45
* 2a:	49 c7 04 1c 00 00 00 	movq   $0x0,(%r12,%rbx,1) <-- trapping instruction
  31:	00
  32:	66 41 c7 44 1c 09 00 	movw   $0x0,0x9(%r12,%rbx,1)
  39:	00
  3a:	41 c6 44 1c 0b 00    	movb   $0x0,0xb(%r12,%rbx,1)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/06 13:35 upstream 9d89551994a4 f3558dbf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root BUG: unable to handle kernel paging request in __folio_batch_add_and_move
* Struck through repros no longer work on HEAD.