syzbot


general protection fault in folio_create_empty_buffers

Status: fixed on 2023/10/12 12:47
Subsystems: nilfs
[Documentation on labels]
Reported-by: syzbot+0ad741797f4565e7e2d2@syzkaller.appspotmail.com
Fix commit: f83913f8c5b8 nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
First crash: 386d, last: 280d
Cause bisection: failed (error log, bisect log)
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH] nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers() 1 (1) 2023/08/05 13:20
[syzbot] [nilfs?] general protection fault in folio_create_empty_buffers 0 (2) 2023/08/04 15:41
[syzbot] Monthly nilfs report (Jul 2023) 0 (1) 2023/07/30 13:15
[syzbot] Monthly nilfs report (Jun 2023) 0 (1) 2023/06/29 08:55
[syzbot] Monthly nilfs report (May 2023) 0 (1) 2023/05/29 08:50
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/06/24 18:15 36m bisect fix upstream job log (0) log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000003a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000001d0-0x00000000000001d7]
CPU: 0 PID: 5323 Comm: segctord Not tainted 6.5.0-rc4-next-20230804-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
RIP: 0010:debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
RIP: 0010:do_raw_spin_lock+0x6e/0x2b0 kernel/locking/spinlock_debug.c:114
Code: 81 48 8d 54 05 00 c7 02 f1 f1 f1 f1 c7 42 04 04 f3 f3 f3 65 48 8b 14 25 28 00 00 00 48 89 54 24 60 31 d2 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 e3
RSP: 0018:ffffc9000507f6e8 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: 00000000000001d0 RCX: 0000000000000000
RDX: 000000000000003a RSI: ffffffff8ac889a0 RDI: 00000000000001d4
RBP: 1ffff92000a0fede R08: 0000000000000000 R09: fffffbfff1d598ca
R10: ffffffff8eacc657 R11: 000000000000004e R12: 0000000000000000
R13: ffffea0001ca6bc0 R14: ffff888072088d98 R15: ffffea0001ca6bd8
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000480 CR3: 0000000027f80000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 spin_lock include/linux/spinlock.h:351 [inline]
 folio_create_empty_buffers+0xb0/0x470 fs/buffer.c:1657
 nilfs_lookup_dirty_data_buffers+0x5a1/0x720 fs/nilfs2/segment.c:730
 nilfs_segctor_scan_file+0x1b1/0x6f0 fs/nilfs2/segment.c:1080
 nilfs_segctor_collect_blocks fs/nilfs2/segment.c:1202 [inline]
 nilfs_segctor_collect fs/nilfs2/segment.c:1529 [inline]
 nilfs_segctor_do_construct+0x2f11/0x8bf0 fs/nilfs2/segment.c:2077
 nilfs_segctor_construct+0x924/0xb50 fs/nilfs2/segment.c:2411
 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2519 [inline]
 nilfs_segctor_thread+0x38f/0xe90 fs/nilfs2/segment.c:2602
 kthread+0x33a/0x430 kernel/kthread.c:389
 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
RIP: 0010:do_raw_spin_lock+0x6e/0x2b0 kernel/locking/spinlock_debug.c:114
Code: 81 48 8d 54 05 00 c7 02 f1 f1 f1 f1 c7 42 04 04 f3 f3 f3 65 48 8b 14 25 28 00 00 00 48 89 54 24 60 31 d2 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 e3
RSP: 0018:ffffc9000507f6e8 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: 00000000000001d0 RCX: 0000000000000000
RDX: 000000000000003a RSI: ffffffff8ac889a0 RDI: 00000000000001d4
RBP: 1ffff92000a0fede R08: 0000000000000000 R09: fffffbfff1d598ca
R10: ffffffff8eacc657 R11: 000000000000004e R12: 0000000000000000
R13: ffffea0001ca6bc0 R14: ffff888072088d98 R15: ffffea0001ca6bd8
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000480 CR3: 0000000027f80000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	81 48 8d 54 05 00 c7 	orl    $0xc7000554,-0x73(%rax)
   7:	02 f1                	add    %cl,%dh
   9:	f1                   	int1
   a:	f1                   	int1
   b:	f1                   	int1
   c:	c7 42 04 04 f3 f3 f3 	movl   $0xf3f3f304,0x4(%rdx)
  13:	65 48 8b 14 25 28 00 	mov    %gs:0x28,%rdx
  1a:	00 00
  1c:	48 89 54 24 60       	mov    %rdx,0x60(%rsp)
  21:	31 d2                	xor    %edx,%edx
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx <-- trapping instruction
  2e:	48 89 f8             	mov    %rdi,%rax
  31:	83 e0 07             	and    $0x7,%eax
  34:	83 c0 03             	add    $0x3,%eax
  37:	38 d0                	cmp    %dl,%al
  39:	7c 08                	jl     0x43
  3b:	84 d2                	test   %dl,%dl
  3d:	0f                   	.byte 0xf
  3e:	85 e3                	test   %esp,%ebx

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/04 15:40 linux-next bdffb18b5dd8 74621247 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root general protection fault in folio_create_empty_buffers
2023/07/28 14:26 upstream 57012c57536f 92476829 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs general protection fault in folio_create_empty_buffers
2023/05/21 11:44 upstream 0dd2a6fb1e34 4bce1a3e .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root general protection fault in folio_create_empty_buffers
2023/07/28 12:42 upstream 57012c57536f 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in folio_create_empty_buffers
2023/05/21 11:20 upstream 0dd2a6fb1e34 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in folio_create_empty_buffers
2023/04/20 08:15 linux-next 3cdbc01c40e3 a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in folio_create_empty_buffers
* Struck through repros no longer work on HEAD.