syzbot


stack segment fault in folio_wait_writeback

Status: upstream: reported syz repro on 2024/10/13 11:01
Subsystems: mm fs
[Documentation on labels]
Reported-by: syzbot+8cb2efaaad483f65f56c@syzkaller.appspotmail.com
First crash: 74d, last: 67d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] [mm?] stack segment fault in folio_wait_writeback 2 (3) 2024/10/15 15:12
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/28 15:33 18m retest repro upstream OK log

Sample crash report:
Oops: stack segment: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5111 Comm: syz.0.0 Not tainted 6.12.0-rc3-syzkaller-00007-g6485cf5ea253 #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:PageTail include/linux/page-flags.h:281 [inline]
RIP: 0010:const_folio_flags include/linux/page-flags.h:309 [inline]
RIP: 0010:folio_test_writeback include/linux/page-flags.h:555 [inline]
RIP: 0010:folio_wait_writeback+0x2f/0x1e0 mm/page-writeback.c:3187
Code: 41 57 41 56 41 55 41 54 53 48 83 ec 18 48 89 fb 49 bd 00 00 00 00 00 fc ff df e8 ac 7e c4 ff 4c 8d 73 08 4c 89 f5 48 c1 ed 03 <42> 80 7c 2d 00 00 74 08 4c 89 f7 e8 11 2f 2e 00 4d 8b 3e 4c 89 fe
RSP: 0018:ffffc90002dbf190 EFLAGS: 00010202
RAX: ffffffff81d068a4 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc9000bbaa000 RSI: 0000000000000949 RDI: 000000000000094a
RBP: 0000000000000001 R08: ffffffff81cc460e R09: 1ffffd40002636a8
R10: dffffc0000000000 R11: fffff940002636a9 R12: dffffc0000000000
R13: dffffc0000000000 R14: 0000000000000008 R15: 0000000000000001
FS:  00007f044700d6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f044700cf98 CR3: 000000003d4ea000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __filemap_fdatawait_range+0x17c/0x2b0 mm/filemap.c:533
 file_write_and_wait_range+0x1e3/0x280 mm/filemap.c:792
 __generic_file_fsync+0x6f/0x1a0 fs/libfs.c:1528
 exfat_file_fsync+0xf9/0x1d0 fs/exfat/file.c:524
 exfat_file_write_iter+0x312/0x3f0 fs/exfat/file.c:608
 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
 do_sendfile+0x561/0xe10 fs/read_write.c:1388
 __do_sys_sendfile64 fs/read_write.c:1455 [inline]
 __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1441
 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:0x7f044617dff9
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:00007f044700d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f0446336130 RCX: 00007f044617dff9
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000005
RBP: 00007f04461f0296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000100001 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f0446336130 R15: 00007ffc1d605a98
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:PageTail include/linux/page-flags.h:281 [inline]
RIP: 0010:const_folio_flags include/linux/page-flags.h:309 [inline]
RIP: 0010:folio_test_writeback include/linux/page-flags.h:555 [inline]
RIP: 0010:folio_wait_writeback+0x2f/0x1e0 mm/page-writeback.c:3187
Code: 41 57 41 56 41 55 41 54 53 48 83 ec 18 48 89 fb 49 bd 00 00 00 00 00 fc ff df e8 ac 7e c4 ff 4c 8d 73 08 4c 89 f5 48 c1 ed 03 <42> 80 7c 2d 00 00 74 08 4c 89 f7 e8 11 2f 2e 00 4d 8b 3e 4c 89 fe
RSP: 0018:ffffc90002dbf190 EFLAGS: 00010202
RAX: ffffffff81d068a4 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc9000bbaa000 RSI: 0000000000000949 RDI: 000000000000094a
RBP: 0000000000000001 R08: ffffffff81cc460e R09: 1ffffd40002636a8
R10: dffffc0000000000 R11: fffff940002636a9 R12: dffffc0000000000
R13: dffffc0000000000 R14: 0000000000000008 R15: 0000000000000001
FS:  00007f044700d6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f044700cf98 CR3: 000000003d4ea000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	41 57                	push   %r15
   2:	41 56                	push   %r14
   4:	41 55                	push   %r13
   6:	41 54                	push   %r12
   8:	53                   	push   %rbx
   9:	48 83 ec 18          	sub    $0x18,%rsp
   d:	48 89 fb             	mov    %rdi,%rbx
  10:	49 bd 00 00 00 00 00 	movabs $0xdffffc0000000000,%r13
  17:	fc ff df
  1a:	e8 ac 7e c4 ff       	call   0xffc47ecb
  1f:	4c 8d 73 08          	lea    0x8(%rbx),%r14
  23:	4c 89 f5             	mov    %r14,%rbp
  26:	48 c1 ed 03          	shr    $0x3,%rbp
* 2a:	42 80 7c 2d 00 00    	cmpb   $0x0,0x0(%rbp,%r13,1) <-- trapping instruction
  30:	74 08                	je     0x3a
  32:	4c 89 f7             	mov    %r14,%rdi
  35:	e8 11 2f 2e 00       	call   0x2e2f4b
  3a:	4d 8b 3e             	mov    (%r14),%r15
  3d:	4c 89 fe             	mov    %r15,%rsi

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/14 15:22 upstream 6485cf5ea253 084d8178 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root stack segment fault in folio_wait_writeback
2024/10/13 11:00 upstream 7234e2ea0edd 084d8178 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci-snapshot-upstream-root stack segment fault in folio_wait_writeback
2024/10/13 06:48 upstream 7234e2ea0edd 084d8178 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root stack segment fault in folio_wait_writeback
2024/10/07 15:42 upstream 8cf0b93919e1 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root stack segment fault in folio_wait_writeback
* Struck through repros no longer work on HEAD.