syzbot


general protection fault in account_kernel_stack (3)

Status: upstream: reported C repro on 2024/12/17 17:47
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+ff4aab278fa7e27e0f9e@syzkaller.appspotmail.com
Fix commit: 4db3d750ac7e nvmet: Don't overflow subsysnqn
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-arm32]
First crash: 104d, last: 86d
Duplicate bugs (8)
duplicates (8):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
general protection fault in tomoyo_gc_thread tomoyo syz 52 85d 103d 0/28 closed as dup on 2025/01/04 13:15
BUG: corrupted list in tomoyo_try_to_gc tomoyo 14 89d 103d 0/28 closed as dup on 2025/01/04 13:17
KASAN: slab-out-of-bounds Read in nvmet_root_discovery_nqn_show nvme C 5 92d 101d 0/28 closed as dup on 2025/01/04 14:14
general protection fault in tomoyo_check_acl (4) tomoyo 14 85d 103d 0/28 closed as dup on 2025/01/04 13:18
general protection fault in tomoyo_init_request_info tomoyo C 3 90d 96d 0/28 closed as dup on 2025/01/04 13:14
BUG: unable to handle kernel NULL pointer dereference in percpu_ref_put_many nvme C 1 99d 95d 0/28 closed as dup on 2025/01/04 13:55
general protection fault in tomoyo_print_entry tomoyo 12 85d 91d 0/28 closed as dup on 2025/01/04 13:13
general protection fault in find_lock_task_mm mm syz 1 106d 102d 0/28 closed as dup on 2025/01/04 14:30
Discussions (4)
Title Replies (including bot) Last reply
[PATCH v3] nvmet: Don't overflow subsysnqn 4 (4) 2024/12/27 21:15
[PATCH v2] nvmet: Don't overflow subsysnqn 2 (2) 2024/12/18 17:16
[PATCH] nvmet: Don't overflow subsysnqn 2 (2) 2024/12/18 07:19
[syzbot] [kernel?] general protection fault in account_kernel_stack (3) 0 (1) 2024/12/17 17:47
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in account_kernel_stack kernel 1 2656d 2654d 0/28 closed as invalid on 2018/02/13 20:04
upstream general protection fault in account_kernel_stack (2) kernel 2 1669d 1668d 0/28 auto-closed as invalid on 2020/12/01 04:32
upstream BUG: unable to handle kernel paging request in account_kernel_stack kernel C 1 308d 304d 0/28 auto-obsoleted due to no activity on 2024/09/02 05:30

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 1 UID: 0 PID: 10518 Comm: syz-executor408 Not tainted 6.13.0-rc5-syzkaller-00004-gccb98ccef0e5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:_compound_head include/linux/page-flags.h:242 [inline]
RIP: 0010:mod_lruvec_page_state include/linux/vmstat.h:563 [inline]
RIP: 0010:account_kernel_stack+0x100/0x2e0 kernel/fork.c:546
Code: 00 49 8b 47 20 48 8d 2c d8 48 89 e8 48 c1 e8 03 42 80 3c 20 00 0f 85 be 01 00 00 48 8b 6d 00 48 8d 7d 08 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 9a 01 00 00 4c 8b 6d 08 31 ff 4d 89 ee 41 83
RSP: 0018:ffffc9000dde7d78 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888012501e00 RSI: ffffffff81590729 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffed10024a04f8
R10: ffff8880125027c3 R11: 0000000000000000 R12: dffffc0000000000
R13: dffffc0000000000 R14: 1ffff11005f52af4 R15: ffff88802fa95780
FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f36a74f7190 CR3: 000000000db7e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 exit_task_stack_account+0x23/0xf0 kernel/fork.c:559
 do_exit+0x1c85/0x2d70 kernel/exit.c:979
 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087
 __do_sys_exit_group kernel/exit.c:1098 [inline]
 __se_sys_exit_group kernel/exit.c:1096 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096
 x64_sys_call+0x151f/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f36a747c2a9
Code: Unable to access opcode bytes at 0x7f36a747c27f.
RSP: 002b:00007ffd55d77f18 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f36a747c2a9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f36a74f52b0 R08: ffffffffffffffb8 R09: 00000000000f4240
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f36a74f52b0
R13: 0000000000000000 R14: 00007f36a74f6d80 R15: 00007f36a7445600
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:_compound_head include/linux/page-flags.h:242 [inline]
RIP: 0010:mod_lruvec_page_state include/linux/vmstat.h:563 [inline]
RIP: 0010:account_kernel_stack+0x100/0x2e0 kernel/fork.c:546
Code: 00 49 8b 47 20 48 8d 2c d8 48 89 e8 48 c1 e8 03 42 80 3c 20 00 0f 85 be 01 00 00 48 8b 6d 00 48 8d 7d 08 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 9a 01 00 00 4c 8b 6d 08 31 ff 4d 89 ee 41 83
RSP: 0018:ffffc9000dde7d78 EFLAGS: 00010202

RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888012501e00 RSI: ffffffff81590729 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffed10024a04f8
R10: ffff8880125027c3 R11: 0000000000000000 R12: dffffc0000000000
R13: dffffc0000000000 R14: 1ffff11005f52af4 R15: ffff88802fa95780
FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f36a74f7190 CR3: 0000000074b12000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 49 8b             	add    %cl,-0x75(%rcx)
   3:	47 20 48 8d          	rex.RXB and %r9b,-0x73(%r8)
   7:	2c d8                	sub    $0xd8,%al
   9:	48 89 e8             	mov    %rbp,%rax
   c:	48 c1 e8 03          	shr    $0x3,%rax
  10:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1)
  15:	0f 85 be 01 00 00    	jne    0x1d9
  1b:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  1f:	48 8d 7d 08          	lea    0x8(%rbp),%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f:	0f 85 9a 01 00 00    	jne    0x1cf
  35:	4c 8b 6d 08          	mov    0x8(%rbp),%r13
  39:	31 ff                	xor    %edi,%edi
  3b:	4d 89 ee             	mov    %r13,%r14
  3e:	41                   	rex.B
  3f:	83                   	.byte 0x83

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/01 19:57 upstream ccb98ccef0e5 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in account_kernel_stack
2024/12/17 03:25 upstream f44d154d6e3d f93b2b55 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in account_kernel_stack
2024/12/30 02:00 upstream 4099a71718b0 d3ccff63 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in account_kernel_stack
2024/12/15 23:29 upstream 2d8308bf5b67 7cbfbb3a .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in account_kernel_stack
2024/12/26 08:43 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in account_kernel_stack
2024/12/18 16:35 upstream aef25be35d23 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in account_kernel_stack
2024/12/14 16:44 upstream a446e965a188 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in account_kernel_stack
* Struck through repros no longer work on HEAD.