syzbot


general protection fault in netfs_write_collection_worker

Status: upstream: reported on 2024/10/14 06:10
Subsystems: netfs
[Documentation on labels]
Reported-by: syzbot+af5c06208fa71bf31b16@syzkaller.appspotmail.com
Fix commit: netfs: Report on NULL folioq in netfs_writeback_unlock_folios()
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 79d, last: 1d10h
Discussions (6)
Title Replies (including bot) Last reply
[PATCH v5 32/32] netfs: Report on NULL folioq in netfs_writeback_unlock_folios() 1 (1) 2024/12/16 20:41
[PATCH v4 33/33] netfs: Report on NULL folioq in netfs_writeback_unlock_folios() 1 (1) 2024/11/08 17:32
[PATCH v3 33/33] netfs: Report on NULL folioq in netfs_writeback_unlock_folios() 1 (1) 2024/11/06 12:35
[PATCH] netfs: Add a check for NULL folioq in netfs_writeback_unlock_folios 4 (4) 2024/10/31 14:06
[PATCH v2 31/31] netfs: Report on NULL folioq in netfs_writeback_unlock_folios() 1 (1) 2024/10/25 20:39
[syzbot] [netfs?] general protection fault in netfs_write_collection_worker 0 (1) 2024/10/14 06:10

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 UID: 0 PID: 7200 Comm: kworker/u32:24 Not tainted 6.13.0-rc1-syzkaller-00002-gcdd30ebb1b9f #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: events_unbound netfs_write_collection_worker
RIP: 0010:folioq_folio include/linux/folio_queue.h:277 [inline]
RIP: 0010:netfs_writeback_unlock_folios fs/netfs/write_collect.c:107 [inline]
RIP: 0010:netfs_collect_write_results fs/netfs/write_collect.c:493 [inline]
RIP: 0010:netfs_write_collection_worker+0x1cd1/0x47d0 fs/netfs/write_collect.c:551
Code: 39 f3 0f 83 37 04 00 00 e8 4c d5 52 ff 44 8b 6c 24 08 41 83 fd 1e 0f 87 79 23 00 00 4a 8d 44 ed 08 48 89 44 24 30 48 c1 e8 03 <42> 80 3c 38 00 0f 85 e4 23 00 00 4a 8b 5c ed 08 48 89 df e8 b7 d1
RSP: 0018:ffffc900042e7ae0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000005 RCX: ffffffff82472e1a
RDX: ffff8880501ec880 RSI: ffffffff824730c4 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000005 R09: ffff888029cd5b00
R10: 0000000000000000 R11: 0000000000000002 R12: ffff888029cd5a00
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff88806a600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f30b5a11d58 CR3: 000000004e374000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229
 process_scheduled_works kernel/workqueue.c:3310 [inline]
 worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
 kthread+0x2c1/0x3a0 kernel/kthread.c:389
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:folioq_folio include/linux/folio_queue.h:277 [inline]
RIP: 0010:netfs_writeback_unlock_folios fs/netfs/write_collect.c:107 [inline]
RIP: 0010:netfs_collect_write_results fs/netfs/write_collect.c:493 [inline]
RIP: 0010:netfs_write_collection_worker+0x1cd1/0x47d0 fs/netfs/write_collect.c:551
Code: 39 f3 0f 83 37 04 00 00 e8 4c d5 52 ff 44 8b 6c 24 08 41 83 fd 1e 0f 87 79 23 00 00 4a 8d 44 ed 08 48 89 44 24 30 48 c1 e8 03 <42> 80 3c 38 00 0f 85 e4 23 00 00 4a 8b 5c ed 08 48 89 df e8 b7 d1
RSP: 0018:ffffc900042e7ae0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000005 RCX: ffffffff82472e1a
RDX: ffff8880501ec880 RSI: ffffffff824730c4 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000005 R09: ffff888029cd5b00
R10: 0000000000000000 R11: 0000000000000002 R12: ffff888029cd5a00
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff88806a600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f30b5a11d58 CR3: 000000004e374000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	39 f3                	cmp    %esi,%ebx
   2:	0f 83 37 04 00 00    	jae    0x43f
   8:	e8 4c d5 52 ff       	call   0xff52d559
   d:	44 8b 6c 24 08       	mov    0x8(%rsp),%r13d
  12:	41 83 fd 1e          	cmp    $0x1e,%r13d
  16:	0f 87 79 23 00 00    	ja     0x2395
  1c:	4a 8d 44 ed 08       	lea    0x8(%rbp,%r13,8),%rax
  21:	48 89 44 24 30       	mov    %rax,0x30(%rsp)
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2f:	0f 85 e4 23 00 00    	jne    0x2419
  35:	4a 8b 5c ed 08       	mov    0x8(%rbp,%r13,8),%rbx
  3a:	48 89 df             	mov    %rbx,%rdi
  3d:	e8                   	.byte 0xe8
  3e:	b7 d1                	mov    $0xd1,%bh

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/03 12:58 upstream cdd30ebb1b9f 330db277 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in netfs_write_collection_worker
2024/10/24 14:46 upstream c2ee9f594da8 c08e46d6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in netfs_write_collection_worker
2024/10/02 20:20 upstream e32cde8d2bd7 83a2f15f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in netfs_write_collection_worker
2024/12/20 01:18 upstream 8faabc041a00 c87fa8a3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in netfs_write_collection_worker
2024/11/15 09:44 upstream cfaaa7d010d1 f6ede3a3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in netfs_write_collection_worker
2024/10/21 02:44 upstream db87114dcf13 cd6fc0a3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in netfs_write_collection_worker
2024/10/09 05:00 upstream 5b7c893ed5ed 402f1df0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in netfs_write_collection_worker
* Struck through repros no longer work on HEAD.