syzbot


general protection fault in ext4_finish_bio

Status: fixed on 2023/10/12 12:48
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+689ec3afb1ef07b766b2@syzkaller.appspotmail.com
Fix commit: 0b7ec177b589 crypto: algif_hash - Fix race between MORE and non-MORE sends
First crash: 302d, last: 302d
Cause bisection: introduced by (bisect log) :
commit b6d972f6898308fbe7e693bf8d44ebfdb1cd2dc4
Author: David Howells <dhowells@redhat.com>
Date: Fri Jun 16 11:10:32 2023 +0000

  crypto: af_alg/hash: Fix recvmsg() after sendmsg(MSG_MORE)

Crash: BUG: unable to handle kernel paging request in corrupted (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH] crypto: algif/hash: Fix race between MORE and non-MORE sends 2 (2) 2023/07/10 04:08
[syzbot] [ext4?] general protection fault in ext4_finish_bio 2 (6) 2023/07/07 08:55
[syzbot] [crypto?] KASAN: slab-out-of-bounds Write in crypto_sha3_final (2) 2 (4) 2023/07/07 08:13
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/07/07 08:13 34m dhowells@redhat.com patch upstream OK log
2023/07/07 08:07 12m dhowells@redhat.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git main error OK

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 1 PID: 2858 Comm: kworker/u4:5 Not tainted 6.4.0-rc7-syzkaller-01948-gae230642190a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work
RIP: 0010:_compound_head include/linux/page-flags.h:245 [inline]
RIP: 0010:bio_first_folio include/linux/bio.h:284 [inline]
RIP: 0010:ext4_finish_bio+0xdc/0x1090 fs/ext4/page-io.c:104
Code: c1 ea 03 80 3c 02 00 0f 85 43 0f 00 00 48 8b 45 00 48 8d 78 08 48 89 04 24 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 4c 0f 00 00 48 8b 04 24 31 ff 4c 8b 60 08 4c 89
RSP: 0018:ffffc9000d047b60 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff8234c972 RDI: 0000000000000008
RBP: ffff88807d609100 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000094001 R12: ffff888074f111e0
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff888074c416b0
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020241040 CR3: 0000000024e17000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ext4_release_io_end+0x118/0x3b0 fs/ext4/page-io.c:160
 ext4_end_io_end fs/ext4/page-io.c:194 [inline]
 ext4_do_flush_completed_IO fs/ext4/page-io.c:259 [inline]
 ext4_end_io_rsv_work+0x156/0x670 fs/ext4/page-io.c:273
 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405
 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552
 kthread+0x344/0x440 kernel/kthread.c:379
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:_compound_head include/linux/page-flags.h:245 [inline]
RIP: 0010:bio_first_folio include/linux/bio.h:284 [inline]
RIP: 0010:ext4_finish_bio+0xdc/0x1090 fs/ext4/page-io.c:104
Code: c1 ea 03 80 3c 02 00 0f 85 43 0f 00 00 48 8b 45 00 48 8d 78 08 48 89 04 24 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 4c 0f 00 00 48 8b 04 24 31 ff 4c 8b 60 08 4c 89
RSP: 0018:ffffc9000d047b60 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff8234c972 RDI: 0000000000000008
RBP: ffff88807d609100 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000094001 R12: ffff888074f111e0
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff888074c416b0
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020241040 CR3: 000000007a4d9000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	c1 ea 03             	shr    $0x3,%edx
   3:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   7:	0f 85 43 0f 00 00    	jne    0xf50
   d:	48 8b 45 00          	mov    0x0(%rbp),%rax
  11:	48 8d 78 08          	lea    0x8(%rax),%rdi
  15:	48 89 04 24          	mov    %rax,(%rsp)
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 4c 0f 00 00    	jne    0xf80
  34:	48 8b 04 24          	mov    (%rsp),%rax
  38:	31 ff                	xor    %edi,%edi
  3a:	4c 8b 60 08          	mov    0x8(%rax),%r12
  3e:	4c                   	rex.WR
  3f:	89                   	.byte 0x89

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/30 00:49 net-next ae230642190a 7b33cf8f .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in ext4_finish_bio
* Struck through repros no longer work on HEAD.