syzbot


general protection fault in errseq_set

Status: moderation: reported on 2024/05/24 17:48
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+43fe607f28c0f0bcbb14@syzkaller.appspotmail.com
First crash: 25d, last: 25d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 BUG: unable to handle kernel paging request in errseq_set origin:lts-only C error 169 1d21h 432d 0/3 upstream: reported C repro on 2023/04/09 06:13
linux-4.14 general protection fault in errseq_set xfs C 2 467d 538d 0/1 upstream: reported C repro on 2022/12/24 15:39
linux-4.19 general protection fault in errseq_set xfs C error 6 512d 547d 0/1 upstream: reported C repro on 2022/12/16 00:36

Sample crash report:
BTRFS error (device loop3 state A): Transaction aborted (error -5)
BTRFS: error (device loop3 state A) in __cow_file_range_inline:701: errno=-5 IO failure
BTRFS info (device loop3 state EA): forced readonly
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000026: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000130-0x0000000000000137]
CPU: 1 PID: 45 Comm: kworker/u32:2 Not tainted 6.9.0-syzkaller-09868-g6e51b4b5bbc0 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: writeback wb_workfn (flush-btrfs-4)
RIP: 0010:errseq_set+0x28/0x150 lib/errseq.c:72
Code: 90 90 f3 0f 1e fa 41 56 41 89 f6 41 55 41 54 55 53 48 89 fb e8 c9 8f 0c fd 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 01
RSP: 0018:ffffc900009d71b0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000130 RCX: 0000000000000000
RDX: 0000000000000026 RSI: ffffffff848158b7 RDI: 0000000000000130
RBP: 00000000fffffffb R08: 0000000000000001 R09: fffffbfff284be69
R10: ffffffff9425f34f R11: ffffffff93946908 R12: 0000000000000000
R13: ffffea0001239140 R14: 00000000fffffffb R15: ffffea0001239158
FS:  0000000000000000(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b40fc284f8 CR3: 000000004466c000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __filemap_set_wb_err+0x22/0x200 mm/filemap.c:705
 mapping_set_error include/linux/pagemap.h:234 [inline]
 __extent_writepage fs/btrfs/extent_io.c:1517 [inline]
 extent_write_cache_pages+0x105e/0x1ce0 fs/btrfs/extent_io.c:2173
 btrfs_writepages+0x21b/0x4a0 fs/btrfs/extent_io.c:2294
 do_writepages+0x1a3/0x7f0 mm/page-writeback.c:2634
 __writeback_single_inode+0x163/0xf90 fs/fs-writeback.c:1651
 writeback_sb_inodes+0x611/0x1150 fs/fs-writeback.c:1947
 wb_writeback+0x199/0xb50 fs/fs-writeback.c:2127
 wb_do_writeback fs/fs-writeback.c:2274 [inline]
 wb_workfn+0x28d/0xf40 fs/fs-writeback.c:2314
 process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
 process_scheduled_works kernel/workqueue.c:3312 [inline]
 worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
 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:errseq_set+0x28/0x150 lib/errseq.c:72
Code: 90 90 f3 0f 1e fa 41 56 41 89 f6 41 55 41 54 55 53 48 89 fb e8 c9 8f 0c fd 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 01
RSP: 0018:ffffc900009d71b0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000130 RCX: 0000000000000000
RDX: 0000000000000026 RSI: ffffffff848158b7 RDI: 0000000000000130
RBP: 00000000fffffffb R08: 0000000000000001 R09: fffffbfff284be69
R10: ffffffff9425f34f R11: ffffffff93946908 R12: 0000000000000000
R13: ffffea0001239140 R14: 00000000fffffffb R15: ffffea0001239158
FS:  0000000000000000(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b40fc284f8 CR3: 000000002c1d8000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	90                   	nop
   1:	90                   	nop
   2:	f3 0f 1e fa          	endbr64
   6:	41 56                	push   %r14
   8:	41 89 f6             	mov    %esi,%r14d
   b:	41 55                	push   %r13
   d:	41 54                	push   %r12
   f:	55                   	push   %rbp
  10:	53                   	push   %rbx
  11:	48 89 fb             	mov    %rdi,%rbx
  14:	e8 c9 8f 0c fd       	call   0xfd0c8fe2
  19:	48 89 da             	mov    %rbx,%rdx
  1c:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  23:	fc ff df
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx <-- trapping instruction
  2e:	48 89 d8             	mov    %rbx,%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 01                	test   %eax,(%rcx)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/20 17:37 upstream 6e51b4b5bbc0 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in errseq_set
* Struck through repros no longer work on HEAD.