public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
@ 2025-09-22 20:24 syzbot
  2025-09-22 22:58 ` Hillf Danton
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: syzbot @ 2025-09-22 20:24 UTC (permalink / raw)
  To: axboe, linux-block, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    846bd2225ec3 Add linux-next specific files for 20250919
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=13c238e2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=155e427c580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17bb8142580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c53d48022f8a/disk-846bd222.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/483534e784c8/vmlinux-846bd222.xz
kernel image: https://storage.googleapis.com/syzbot-assets/721b36eec9b3/bzImage-846bd222.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+5c5d41e80248d610221f@syzkaller.appspotmail.com

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 UID: 0 PID: 5962 Comm: kworker/0:3 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Workqueue: rcu_gp srcu_invoke_callbacks
RIP: 0010:__list_del_entry_valid_or_report+0x25/0x190 lib/list_debug.c:49
Code: 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 55 41 54 53 48 89 fb 49 bd 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 05 e8 af 58 47 fd 4c 8b 7b 08 48 89 d8 48 c1 e8
RSP: 0018:ffffc90003d2f8e8 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff88802f573c80
RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000008
RBP: dffffc0000000000 R08: ffffffff8fe4db77 R09: 1ffffffff1fc9b6e
R10: dffffc0000000000 R11: ffffffff84b089f0 R12: 1ffff11004cb1e1f
R13: dffffc0000000000 R14: ffff88802658f0a0 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881257a2000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055946acdc950 CR3: 000000007a708000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:132 [inline]
 __list_del_entry include/linux/list.h:223 [inline]
 list_del_init include/linux/list.h:295 [inline]
 blk_mq_free_tags_callback+0x5a/0x180 block/blk-mq-tag.c:593
 srcu_invoke_callbacks+0x208/0x450 kernel/rcu/srcutree.c:1807
 process_one_work kernel/workqueue.c:3263 [inline]
 process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x25/0x190 lib/list_debug.c:49
Code: 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 55 41 54 53 48 89 fb 49 bd 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 05 e8 af 58 47 fd 4c 8b 7b 08 48 89 d8 48 c1 e8
RSP: 0018:ffffc90003d2f8e8 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff88802f573c80
RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000008
RBP: dffffc0000000000 R08: ffffffff8fe4db77 R09: 1ffffffff1fc9b6e
R10: dffffc0000000000 R11: ffffffff84b089f0 R12: 1ffff11004cb1e1f
R13: dffffc0000000000 R14: ffff88802658f0a0 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881257a2000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055946acdc950 CR3: 000000007a708000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
   0:	90                   	nop
   1:	90                   	nop
   2:	90                   	nop
   3:	90                   	nop
   4:	90                   	nop
   5:	f3 0f 1e fa          	endbr64
   9:	41 57                	push   %r15
   b:	41 56                	push   %r14
   d:	41 55                	push   %r13
   f:	41 54                	push   %r12
  11:	53                   	push   %rbx
  12:	48 89 fb             	mov    %rdi,%rbx
  15:	49 bd 00 00 00 00 00 	movabs $0xdffffc0000000000,%r13
  1c:	fc ff df
  1f:	48 83 c7 08          	add    $0x8,%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2f:	74 05                	je     0x36
  31:	e8 af 58 47 fd       	call   0xfd4758e5
  36:	4c 8b 7b 08          	mov    0x8(%rbx),%r15
  3a:	48 89 d8             	mov    %rbx,%rax
  3d:	48                   	rex.W
  3e:	c1                   	.byte 0xc1
  3f:	e8                   	.byte 0xe8


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-22 20:24 [syzbot] [block?] general protection fault in blk_mq_free_tags_callback syzbot
@ 2025-09-22 22:58 ` Hillf Danton
  2025-09-22 23:55   ` syzbot
  2025-09-23  3:28   ` Ming Lei
  2025-09-23  1:48 ` Hillf Danton
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Hillf Danton @ 2025-09-22 22:58 UTC (permalink / raw)
  To: syzbot; +Cc: linux-kernel, syzkaller-bugs

> Date: Mon, 22 Sep 2025 13:24:25 -0700	[thread overview]
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    846bd2225ec3 Add linux-next specific files for 20250919
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=13c238e2580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
> dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
> compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=155e427c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17bb8142580000

#syz test linux-next  master

--- x/block/blk-mq-tag.c
+++ y/block/blk-mq-tag.c
@@ -565,6 +565,7 @@ struct blk_mq_tags *blk_mq_init_tags(uns
 	if (!tags)
 		return NULL;
 
+	INIT_LIST_HEAD(&tags->page_list);
 	tags->nr_tags = total_tags;
 	tags->nr_reserved_tags = reserved_tags;
 	spin_lock_init(&tags->lock);
--

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-22 22:58 ` Hillf Danton
@ 2025-09-22 23:55   ` syzbot
  2025-09-23  3:28   ` Ming Lei
  1 sibling, 0 replies; 10+ messages in thread
From: syzbot @ 2025-09-22 23:55 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

arch/x86/kvm/emulate.c:4091:2: error: call to undeclared function 'F'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
arch/x86/kvm/emulate.c:4093:2: error: field designator cannot initialize a non-struct, non-union type 'u8[7]' (aka 'unsigned char[7]')
arch/x86/kvm/emulate.c:4094:2: error: field designator 'flags' does not refer to any field in type 'union (unnamed union at arch/x86/kvm/emulate.c:198:2)'
arch/x86/kvm/emulate.c:4094:2: error: field designator 'u' does not refer to any field in type 'union (unnamed union at arch/x86/kvm/emulate.c:198:2)'
arch/x86/kvm/emulate.c:4095:2: error: initialization of non-aggregate type 'int (*)(struct x86_emulate_ctxt *)' with a designated initializer list


Tested on:

commit:         bf2602a3 Add linux-next specific files for 20250922
git tree:       linux-next
kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
patch:          https://syzkaller.appspot.com/x/patch.diff?x=166138e2580000


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-22 20:24 [syzbot] [block?] general protection fault in blk_mq_free_tags_callback syzbot
  2025-09-22 22:58 ` Hillf Danton
@ 2025-09-23  1:48 ` Hillf Danton
  2025-09-23  2:25   ` syzbot
  2025-09-23  6:20 ` Jens Axboe
  2025-09-23  7:21 ` Hillf Danton
  3 siblings, 1 reply; 10+ messages in thread
From: Hillf Danton @ 2025-09-23  1:48 UTC (permalink / raw)
  To: syzbot; +Cc: linux-kernel, syzkaller-bugs

> Date: Mon, 22 Sep 2025 13:24:25 -0700	[thread overview]
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    846bd2225ec3 Add linux-next specific files for 20250919
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=13c238e2580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
> dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
> compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=155e427c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17bb8142580000

#syz test linux-next  master

--- x/block/blk-mq-tag.c
+++ y/block/blk-mq-tag.c
@@ -565,6 +565,7 @@ struct blk_mq_tags *blk_mq_init_tags(uns
 	if (!tags)
 		return NULL;
 
+	INIT_LIST_HEAD(&tags->page_list);
 	tags->nr_tags = total_tags;
 	tags->nr_reserved_tags = reserved_tags;
 	spin_lock_init(&tags->lock);
--- x/arch/x86/kvm/emulate.c
+++ y/arch/x86/kvm/emulate.c
@@ -3991,6 +3991,7 @@ static int check_perm_out(struct x86_emu
 #define MD(_f, _m) { .flags = ((_f) | ModeDual), .u.mdual = (_m) }
 #define E(_f, _e) { .flags = ((_f) | Escape | ModRM), .u.esc = (_e) }
 #define I(_f, _e) { .flags = (_f), .u.execute = (_e) }
+#define F(_f, _e) { .flags = (_f) | Fastop, .u.fastop = (_e) }
 #define II(_f, _e, _i) \
 	{ .flags = (_f)|Intercept, .u.execute = (_e), .intercept = x86_intercept_##_i }
 #define IIP(_f, _e, _i, _p) \
--

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-23  1:48 ` Hillf Danton
@ 2025-09-23  2:25   ` syzbot
  0 siblings, 0 replies; 10+ messages in thread
From: syzbot @ 2025-09-23  2:25 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

arch/x86/kvm/emulate.c:4092:2: error: use of undeclared identifier 'Fastop'
arch/x86/kvm/emulate.c:4093:2: error: use of undeclared identifier 'Fastop'


Tested on:

commit:         bf2602a3 Add linux-next specific files for 20250922
git tree:       linux-next
kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
patch:          https://syzkaller.appspot.com/x/patch.diff?x=14143534580000


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-22 22:58 ` Hillf Danton
  2025-09-22 23:55   ` syzbot
@ 2025-09-23  3:28   ` Ming Lei
  1 sibling, 0 replies; 10+ messages in thread
From: Ming Lei @ 2025-09-23  3:28 UTC (permalink / raw)
  To: Hillf Danton; +Cc: syzbot, linux-kernel, syzkaller-bugs

On Tue, Sep 23, 2025 at 6:59 AM Hillf Danton <hdanton@sina.com> wrote:
>
> > Date: Mon, 22 Sep 2025 13:24:25 -0700 [thread overview]
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit:    846bd2225ec3 Add linux-next specific files for 20250919
> > git tree:       linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=13c238e2580000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
> > dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
> > compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=155e427c580000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17bb8142580000
>
> #syz test linux-next  master
>
> --- x/block/blk-mq-tag.c
> +++ y/block/blk-mq-tag.c
> @@ -565,6 +565,7 @@ struct blk_mq_tags *blk_mq_init_tags(uns
>         if (!tags)
>                 return NULL;
>
> +       INIT_LIST_HEAD(&tags->page_list);
>         tags->nr_tags = total_tags;
>         tags->nr_reserved_tags = reserved_tags;
>         spin_lock_init(&tags->lock);

The initialization is needed, otherwise the unitialized tags->page_list
may be accessed in the error code path of blk_mq_alloc_rq_map().

Thanks,


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-22 20:24 [syzbot] [block?] general protection fault in blk_mq_free_tags_callback syzbot
  2025-09-22 22:58 ` Hillf Danton
  2025-09-23  1:48 ` Hillf Danton
@ 2025-09-23  6:20 ` Jens Axboe
  2025-09-23  6:35   ` Yu Kuai
  2025-09-23  7:21 ` Hillf Danton
  3 siblings, 1 reply; 10+ messages in thread
From: Jens Axboe @ 2025-09-23  6:20 UTC (permalink / raw)
  To: syzbot, linux-block, linux-kernel, syzkaller-bugs, Ming Lei

On 9/22/25 2:24 PM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    846bd2225ec3 Add linux-next specific files for 20250919
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=13c238e2580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
> dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
> compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=155e427c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17bb8142580000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/c53d48022f8a/disk-846bd222.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/483534e784c8/vmlinux-846bd222.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/721b36eec9b3/bzImage-846bd222.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+5c5d41e80248d610221f@syzkaller.appspotmail.com
> 
> Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN PTI
> KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
> CPU: 0 UID: 0 PID: 5962 Comm: kworker/0:3 Not tainted syzkaller #0 PREEMPT(full) 
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
> Workqueue: rcu_gp srcu_invoke_callbacks
> RIP: 0010:__list_del_entry_valid_or_report+0x25/0x190 lib/list_debug.c:49
> Code: 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 55 41 54 53 48 89 fb 49 bd 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 05 e8 af 58 47 fd 4c 8b 7b 08 48 89 d8 48 c1 e8
> RSP: 0018:ffffc90003d2f8e8 EFLAGS: 00010202
> RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff88802f573c80
> RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000008
> RBP: dffffc0000000000 R08: ffffffff8fe4db77 R09: 1ffffffff1fc9b6e
> R10: dffffc0000000000 R11: ffffffff84b089f0 R12: 1ffff11004cb1e1f
> R13: dffffc0000000000 R14: ffff88802658f0a0 R15: 0000000000000000
> FS:  0000000000000000(0000) GS:ffff8881257a2000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000055946acdc950 CR3: 000000007a708000 CR4: 00000000003526f0
> Call Trace:
>  <TASK>
>  __list_del_entry_valid include/linux/list.h:132 [inline]
>  __list_del_entry include/linux/list.h:223 [inline]
>  list_del_init include/linux/list.h:295 [inline]
>  blk_mq_free_tags_callback+0x5a/0x180 block/blk-mq-tag.c:593
>  srcu_invoke_callbacks+0x208/0x450 kernel/rcu/srcutree.c:1807
>  process_one_work kernel/workqueue.c:3263 [inline]
>  process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
>  worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
>  kthread+0x711/0x8a0 kernel/kthread.c:463
>  ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
>  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
>  </TASK>
> Modules linked in:
> ---[ end trace 0000000000000000 ]---
> RIP: 0010:__list_del_entry_valid_or_report+0x25/0x190 lib/list_debug.c:49
> Code: 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 55 41 54 53 48 89 fb 49 bd 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 05 e8 af 58 47 fd 4c 8b 7b 08 48 89 d8 48 c1 e8
> RSP: 0018:ffffc90003d2f8e8 EFLAGS: 00010202
> RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff88802f573c80
> RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000008
> RBP: dffffc0000000000 R08: ffffffff8fe4db77 R09: 1ffffffff1fc9b6e
> R10: dffffc0000000000 R11: ffffffff84b089f0 R12: 1ffff11004cb1e1f
> R13: dffffc0000000000 R14: ffff88802658f0a0 R15: 0000000000000000
> FS:  0000000000000000(0000) GS:ffff8881257a2000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000055946acdc950 CR3: 000000007a708000 CR4: 00000000003526f0
> ----------------
> Code disassembly (best guess):
>    0:	90                   	nop
>    1:	90                   	nop
>    2:	90                   	nop
>    3:	90                   	nop
>    4:	90                   	nop
>    5:	f3 0f 1e fa          	endbr64
>    9:	41 57                	push   %r15
>    b:	41 56                	push   %r14
>    d:	41 55                	push   %r13
>    f:	41 54                	push   %r12
>   11:	53                   	push   %rbx
>   12:	48 89 fb             	mov    %rdi,%rbx
>   15:	49 bd 00 00 00 00 00 	movabs $0xdffffc0000000000,%r13
>   1c:	fc ff df
>   1f:	48 83 c7 08          	add    $0x8,%rdi
>   23:	48 89 f8             	mov    %rdi,%rax
>   26:	48 c1 e8 03          	shr    $0x3,%rax
> * 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
>   2f:	74 05                	je     0x36
>   31:	e8 af 58 47 fd       	call   0xfd4758e5
>   36:	4c 8b 7b 08          	mov    0x8(%rbx),%r15
>   3a:	48 89 d8             	mov    %rbx,%rax
>   3d:	48                   	rex.W
>   3e:	c1                   	.byte 0xc1
>   3f:	e8                   	.byte 0xe8
> 
> 
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
> 
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> 
> If the report is already addressed, let syzbot know by replying with:
> #syz fix: exact-commit-title
> 
> If you want syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.
> 
> If you want to overwrite report's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
> 
> If the report is a duplicate of another one, reply with:
> #syz dup: exact-subject-of-another-report
> 
> If you want to undo deduplication, reply with:
> #syz undup

Adding Ming, looks related to the SRCU changes perhaps?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-23  6:20 ` Jens Axboe
@ 2025-09-23  6:35   ` Yu Kuai
  0 siblings, 0 replies; 10+ messages in thread
From: Yu Kuai @ 2025-09-23  6:35 UTC (permalink / raw)
  To: Jens Axboe, syzbot, linux-block, linux-kernel, syzkaller-bugs,
	Ming Lei, yukuai (C)

Hi,

在 2025/09/23 14:20, Jens Axboe 写道:
> On 9/22/25 2:24 PM, syzbot wrote:
>> Hello,
>>
>> syzbot found the following issue on:
>>
>> HEAD commit:    846bd2225ec3 Add linux-next specific files for 20250919
>> git tree:       linux-next
>> console output: https://syzkaller.appspot.com/x/log.txt?x=13c238e2580000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
>> dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
>> compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
>> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=155e427c580000
>> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17bb8142580000
>>
>> Downloadable assets:
>> disk image: https://storage.googleapis.com/syzbot-assets/c53d48022f8a/disk-846bd222.raw.xz
>> vmlinux: https://storage.googleapis.com/syzbot-assets/483534e784c8/vmlinux-846bd222.xz
>> kernel image: https://storage.googleapis.com/syzbot-assets/721b36eec9b3/bzImage-846bd222.xz
>>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: syzbot+5c5d41e80248d610221f@syzkaller.appspotmail.com
>>
>> Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN PTI
>> KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
>> CPU: 0 UID: 0 PID: 5962 Comm: kworker/0:3 Not tainted syzkaller #0 PREEMPT(full)
>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
>> Workqueue: rcu_gp srcu_invoke_callbacks
>> RIP: 0010:__list_del_entry_valid_or_report+0x25/0x190 lib/list_debug.c:49
>> Code: 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 55 41 54 53 48 89 fb 49 bd 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 05 e8 af 58 47 fd 4c 8b 7b 08 48 89 d8 48 c1 e8
>> RSP: 0018:ffffc90003d2f8e8 EFLAGS: 00010202
>> RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff88802f573c80
>> RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000008
>> RBP: dffffc0000000000 R08: ffffffff8fe4db77 R09: 1ffffffff1fc9b6e
>> R10: dffffc0000000000 R11: ffffffff84b089f0 R12: 1ffff11004cb1e1f
>> R13: dffffc0000000000 R14: ffff88802658f0a0 R15: 0000000000000000
>> FS:  0000000000000000(0000) GS:ffff8881257a2000(0000) knlGS:0000000000000000
>> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> CR2: 000055946acdc950 CR3: 000000007a708000 CR4: 00000000003526f0
>> Call Trace:
>>   <TASK>
>>   __list_del_entry_valid include/linux/list.h:132 [inline]
>>   __list_del_entry include/linux/list.h:223 [inline]
>>   list_del_init include/linux/list.h:295 [inline]
>>   blk_mq_free_tags_callback+0x5a/0x180 block/blk-mq-tag.c:593
>>   srcu_invoke_callbacks+0x208/0x450 kernel/rcu/srcutree.c:1807
>>   process_one_work kernel/workqueue.c:3263 [inline]
>>   process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
>>   worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
>>   kthread+0x711/0x8a0 kernel/kthread.c:463
>>   ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
>>   ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
>>   </TASK>
>> Modules linked in:
>> ---[ end trace 0000000000000000 ]---
>> RIP: 0010:__list_del_entry_valid_or_report+0x25/0x190 lib/list_debug.c:49
>> Code: 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 55 41 54 53 48 89 fb 49 bd 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 05 e8 af 58 47 fd 4c 8b 7b 08 48 89 d8 48 c1 e8
>> RSP: 0018:ffffc90003d2f8e8 EFLAGS: 00010202
>> RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff88802f573c80
>> RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000008
>> RBP: dffffc0000000000 R08: ffffffff8fe4db77 R09: 1ffffffff1fc9b6e
>> R10: dffffc0000000000 R11: ffffffff84b089f0 R12: 1ffff11004cb1e1f
>> R13: dffffc0000000000 R14: ffff88802658f0a0 R15: 0000000000000000
>> FS:  0000000000000000(0000) GS:ffff8881257a2000(0000) knlGS:0000000000000000
>> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> CR2: 000055946acdc950 CR3: 000000007a708000 CR4: 00000000003526f0
>> ----------------
>> Code disassembly (best guess):
>>     0:	90                   	nop
>>     1:	90                   	nop
>>     2:	90                   	nop
>>     3:	90                   	nop
>>     4:	90                   	nop
>>     5:	f3 0f 1e fa          	endbr64
>>     9:	41 57                	push   %r15
>>     b:	41 56                	push   %r14
>>     d:	41 55                	push   %r13
>>     f:	41 54                	push   %r12
>>    11:	53                   	push   %rbx
>>    12:	48 89 fb             	mov    %rdi,%rbx
>>    15:	49 bd 00 00 00 00 00 	movabs $0xdffffc0000000000,%r13
>>    1c:	fc ff df
>>    1f:	48 83 c7 08          	add    $0x8,%rdi
>>    23:	48 89 f8             	mov    %rdi,%rax
>>    26:	48 c1 e8 03          	shr    $0x3,%rax
>> * 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
>>    2f:	74 05                	je     0x36
>>    31:	e8 af 58 47 fd       	call   0xfd4758e5
>>    36:	4c 8b 7b 08          	mov    0x8(%rbx),%r15
>>    3a:	48 89 d8             	mov    %rbx,%rax
>>    3d:	48                   	rex.W
>>    3e:	c1                   	.byte 0xc1
>>    3f:	e8                   	.byte 0xe8
>>
>>
>> ---
>> This report is generated by a bot. It may contain errors.
>> See https://goo.gl/tpsmEJ for more information about syzbot.
>> syzbot engineers can be reached at syzkaller@googlegroups.com.
>>
>> syzbot will keep track of this issue. See:
>> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
>>
>> If the report is already addressed, let syzbot know by replying with:
>> #syz fix: exact-commit-title
>>
>> If you want syzbot to run the reproducer, reply with:
>> #syz test: git://repo/address.git branch-or-commit-hash
>> If you attach or paste a git patch, syzbot will apply it before testing.
>>
>> If you want to overwrite report's subsystems, reply with:
>> #syz set subsystems: new-subsystem
>> (See the list of subsystem names on the web dashboard)
>>
>> If the report is a duplicate of another one, reply with:
>> #syz dup: exact-subject-of-another-report
>>
>> If you want to undo deduplication, reply with:
>> #syz undup
> 
> Adding Ming, looks related to the SRCU changes perhaps?
> 

A quick look, yes it's related. Root cause is that blk_mq_free_tags()
can be called after blk_mq_init_tags(), while tags->page_list is still
not initialized by blk_mq_alloc_rqs().

Thanks,
Kuai


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-22 20:24 [syzbot] [block?] general protection fault in blk_mq_free_tags_callback syzbot
                   ` (2 preceding siblings ...)
  2025-09-23  6:20 ` Jens Axboe
@ 2025-09-23  7:21 ` Hillf Danton
  2025-09-23  8:51   ` syzbot
  3 siblings, 1 reply; 10+ messages in thread
From: Hillf Danton @ 2025-09-23  7:21 UTC (permalink / raw)
  To: syzbot; +Cc: linux-kernel, syzkaller-bugs

> Date: Mon, 22 Sep 2025 13:24:25 -0700	[thread overview]
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    846bd2225ec3 Add linux-next specific files for 20250919
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=13c238e2580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=135377594f35b576
> dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
> compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=155e427c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17bb8142580000

#syz test linux-next  master

--- x/block/blk-mq-tag.c
+++ y/block/blk-mq-tag.c
@@ -565,6 +565,7 @@ struct blk_mq_tags *blk_mq_init_tags(uns
 	if (!tags)
 		return NULL;
 
+	INIT_LIST_HEAD(&tags->page_list);
 	tags->nr_tags = total_tags;
 	tags->nr_reserved_tags = reserved_tags;
 	spin_lock_init(&tags->lock);
--- x/arch/x86/kvm/emulate.c
+++ y/arch/x86/kvm/emulate.c
@@ -4001,7 +4001,6 @@ static int check_perm_out(struct x86_emu
 #define D2bv(_f)      D((_f) | ByteOp), D(_f)
 #define D2bvIP(_f, _i, _p) DIP((_f) | ByteOp, _i, _p), DIP(_f, _i, _p)
 #define I2bv(_f, _e)  I((_f) | ByteOp, _e), I(_f, _e)
-#define F2bv(_f, _e)  F((_f) | ByteOp, _e), F(_f, _e)
 #define I2bvIP(_f, _e, _i, _p) \
 	IIP((_f) | ByteOp, _e, _i, _p), IIP(_f, _e, _i, _p)
 
@@ -4088,8 +4087,8 @@ static const struct opcode group4[] = {
 };
 
 static const struct opcode group5[] = {
-	F(DstMem | SrcNone | Lock,		em_inc),
-	F(DstMem | SrcNone | Lock,		em_dec),
+	I(DstMem | SrcNone | Lock,		em_inc),
+	I(DstMem | SrcNone | Lock,		em_dec),
 	I(SrcMem | NearBranch | IsBranch | ShadowStack, em_call_near_abs),
 	I(SrcMemFAddr | ImplicitOps | IsBranch | ShadowStack, em_call_far),
 	I(SrcMem | NearBranch | IsBranch,       em_jmp_abs),
--

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [syzbot] [block?] general protection fault in blk_mq_free_tags_callback
  2025-09-23  7:21 ` Hillf Danton
@ 2025-09-23  8:51   ` syzbot
  0 siblings, 0 replies; 10+ messages in thread
From: syzbot @ 2025-09-23  8:51 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+5c5d41e80248d610221f@syzkaller.appspotmail.com
Tested-by: syzbot+5c5d41e80248d610221f@syzkaller.appspotmail.com

Tested on:

commit:         bf2602a3 Add linux-next specific files for 20250922
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14b8627c580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=6707f92bf75f45f3
dashboard link: https://syzkaller.appspot.com/bug?extid=5c5d41e80248d610221f
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
patch:          https://syzkaller.appspot.com/x/patch.diff?x=12534142580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-23  8:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 20:24 [syzbot] [block?] general protection fault in blk_mq_free_tags_callback syzbot
2025-09-22 22:58 ` Hillf Danton
2025-09-22 23:55   ` syzbot
2025-09-23  3:28   ` Ming Lei
2025-09-23  1:48 ` Hillf Danton
2025-09-23  2:25   ` syzbot
2025-09-23  6:20 ` Jens Axboe
2025-09-23  6:35   ` Yu Kuai
2025-09-23  7:21 ` Hillf Danton
2025-09-23  8:51   ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox