syzbot


general protection fault in hctx_lock

Status: upstream: reported C repro on 2021/10/17 21:40
Reported-by: syzbot+005b78d4c45263d656dd@syzkaller.appspotmail.com
First crash: 349d, last: 343d

Cause bisection: introduced by (bisect log) :
commit f328476e373a7ce4b4d16c48fe85571044e025f5
Author: Christoph Hellwig <hch@lst.de>
Date: Tue Oct 12 10:40:45 2021 +0000

  blk-mq: cleanup blk_mq_submit_bio

Crash: general protection fault in hctx_lock (log)
Repro: C syz .config
Patch testing requests:
Created Duration User Patch Repo Result
2021/11/22 14:16 13m phind.uet@gmail.com linux-next report log
2021/10/25 10:39 10m phind.uet@gmail.com linux-next report log

Sample crash report:
loop7: detected capacity change from 0 to 1036
general protection fault, probably for non-canonical address 0xdffffc0000000027: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000138-0x000000000000013f]
CPU: 0 PID: 7029 Comm: syz-executor121 Not tainted 5.15.0-rc5-next-20211015-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:hctx_lock+0x29/0x1d0 block/blk-mq.c:780
Code: 00 41 55 41 54 49 89 f4 55 53 48 89 fb e8 1f 16 b3 fd 48 8d bb 38 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 8a 01 00 00 48 8b ab 38 01 00 00 31 ff 83 e5 20
RSP: 0018:ffffc9000319f0c8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000027 RSI: ffffffff83c44e71 RDI: 0000000000000138
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc9000319f110
R13: 0000000000000001 R14: 0000000000000148 R15: ffffc9000319f570
FS:  00007fca2d18e700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fca2d232e88 CR3: 00000000705ed000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 blk_mq_run_hw_queue+0x79/0x2f0 block/blk-mq.c:1697
 blk_mq_submit_bio+0x136b/0x1920 block/blk-mq.c:2316
 __submit_bio_noacct_mq block/blk-core.c:997 [inline]
 submit_bio_noacct block/blk-core.c:1026 [inline]
 submit_bio_noacct+0xa26/0xee0 block/blk-core.c:1012
 submit_bio block/blk-core.c:1087 [inline]
 submit_bio+0x1ea/0x470 block/blk-core.c:1045
 submit_bio_wait+0x106/0x230 block/bio.c:1266
 blkdev_issue_flush+0xd6/0x130 block/blk-flush.c:458
 blkdev_fsync+0x68/0xa0 block/fops.c:401
 vfs_fsync_range+0x13a/0x220 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2951 [inline]
 blkdev_write_iter+0x3d8/0x540 block/fops.c:486
 call_write_iter include/linux/fs.h:2159 [inline]
 do_iter_readv_writev+0x472/0x750 fs/read_write.c:729
 do_iter_write+0x188/0x710 fs/read_write.c:855
 vfs_iter_write+0x70/0xa0 fs/read_write.c:896
 iter_file_splice_write+0x723/0xc70 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x110/0x180 fs/splice.c:936
 splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
 do_splice_direct+0x1b3/0x280 fs/splice.c:979
 do_sendfile+0xaf2/0x1250 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1314 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fca2d1e96d9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 18 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fca2d18e2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fca2d2664a0 RCX: 00007fca2d1e96d9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004
RBP: 00007fca2d2664ac R08: 0000000000000000 R09: 0000000000000000
R10: 0000000024002da8 R11: 0000000000000246 R12: 00007fca2d2332c4
R13: 6f6f6c2f7665642f R14: 0000002a1a885446 R15: 00007fca2d2664a8
 </TASK>
Modules linked in:
---[ end trace 20f37bd14883795d ]---
RIP: 0010:hctx_lock+0x29/0x1d0 block/blk-mq.c:780
Code: 00 41 55 41 54 49 89 f4 55 53 48 89 fb e8 1f 16 b3 fd 48 8d bb 38 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 8a 01 00 00 48 8b ab 38 01 00 00 31 ff 83 e5 20
RSP: 0018:ffffc9000319f0c8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000027 RSI: ffffffff83c44e71 RDI: 0000000000000138
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc9000319f110
R13: 0000000000000001 R14: 0000000000000148 R15: ffffc9000319f570
FS:  00007fca2d18e700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fca2d232e88 CR3: 00000000705ed000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 41 55             	add    %al,0x55(%rcx)
   3:	41 54                	push   %r12
   5:	49 89 f4             	mov    %rsi,%r12
   8:	55                   	push   %rbp
   9:	53                   	push   %rbx
   a:	48 89 fb             	mov    %rdi,%rbx
   d:	e8 1f 16 b3 fd       	callq  0xfdb31631
  12:	48 8d bb 38 01 00 00 	lea    0x138(%rbx),%rdi
  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 8a 01 00 00    	jne    0x1be
  34:	48 8b ab 38 01 00 00 	mov    0x138(%rbx),%rbp
  3b:	31 ff                	xor    %edi,%edi
  3d:	83 e5 20             	and    $0x20,%ebp

Crashes (75):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2021/10/16 21:21 linux-next 7c832d2f9b95 0c5d9412 .config log report syz C general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/20 06:15 linux-next 60e8840126bd 466b7db1 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/20 01:29 linux-next 60e8840126bd 466b7db1 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/19 22:06 linux-next 60e8840126bd 466b7db1 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/19 20:36 linux-next 60e8840126bd 466b7db1 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/19 18:59 linux-next 60e8840126bd 466b7db1 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/19 00:47 linux-next 60e8840126bd 24dc29db .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/18 23:17 linux-next 60e8840126bd 24dc29db .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/18 19:47 linux-next 60e8840126bd 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/18 11:20 linux-next 60e8840126bd 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/18 10:40 linux-next 60e8840126bd 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/18 06:52 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/18 05:20 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/18 04:09 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/17 16:02 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/17 14:26 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/17 12:36 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/17 08:55 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/17 07:44 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/17 06:42 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/16 19:42 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/16 17:04 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/16 11:33 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/16 04:06 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 14:59 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 14:48 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 12:00 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 11:52 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 10:43 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 10:39 linux-next 7c832d2f9b95 0c5d9412 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 09:14 linux-next 8006b911c90a aab7690b .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 08:21 linux-next 8006b911c90a aab7690b .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 08:05 linux-next 8006b911c90a aab7690b .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 07:26 linux-next 8006b911c90a aab7690b .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 06:51 linux-next 8006b911c90a aab7690b .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 05:15 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/15 01:58 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 21:51 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 21:22 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 21:03 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 20:58 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 20:13 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 19:43 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 19:42 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 19:33 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 19:31 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 19:27 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 19:07 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 18:47 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 18:46 linux-next 8006b911c90a 7aa5fe41 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 18:23 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 13:54 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 12:45 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 12:35 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 05:46 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 04:39 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 01:34 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/14 01:34 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/13 23:43 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/13 23:16 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/13 22:19 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/13 22:07 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
ci-upstream-linux-next-kasan-gce-root 2021/10/13 21:30 linux-next 8006b911c90a 5462d470 .config log report info general protection fault in hctx_lock
* Struck through repros no longer work on HEAD.