syzbot


kernel panic: corrupted stack end in kernel_init (2)

Status: upstream: reported syz repro on 2024/09/15 05:50
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+ec17b78de14721dd3bdc@syzkaller.appspotmail.com
First crash: 30d, last: 7d10h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [block?] [virt?] kernel panic: corrupted stack end in kernel_init (2) 0 (2) 2024/09/24 10:00
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel panic: corrupted stack end in kernel_init integrity lsm 20 103d 128d 0/28 auto-obsoleted due to no activity on 2024/09/03 16:55

Sample crash report:
x8 : 8f1719b15e27f800 x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000008 x3 : 0000000000000000
x2 : ffff0000d7975ac0 x1 : 0000000000000000 x0 : ffff800080872848
Kernel panic - not syncing: kernel stack overflow
CPU: 1 UID: 0 PID: 16523 Comm: syz.3.4916 Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119
 dump_stack+0x1c/0x28 lib/dump_stack.c:128
 panic+0x300/0x884 kernel/panic.c:354
 nmi_panic+0x11c/0x23c kernel/panic.c:205
 panic_bad_stack+0x200/0x28c arch/arm64/kernel/traps.c:917
 enter_from_kernel_mode+0x0/0x74 arch/arm64/kernel/entry-common.c:928
 __bad_stack+0x78/0x7c arch/arm64/kernel/entry.S:566
 el1h_64_sync+0x0/0x68 arch/arm64/kernel/entry.S:591
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x10,00000207,00200128,42017203
Memory Limit: none

================================
WARNING: inconsistent lock state
6.11.0-rc7-syzkaller-g5f5673607153 #0 Not tainted
--------------------------------
inconsistent {INITIAL USE} -> {IN-NMI} usage.
syz.3.4916/16523 [HC1[1]:SC0[0]:HE0:SE1] takes:
ffff800091c892b8 ((efivars_lock).lock){....}-{2:2}, at: down_trylock+0x28/0xd8 kernel/locking/semaphore.c:139
{INITIAL USE} state was registered at:
  lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5759
  __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
  _raw_spin_lock_irqsave+0x5c/0x7c kernel/locking/spinlock.c:162
  down_interruptible+0x3c/0xfc kernel/locking/semaphore.c:83
  efivars_register+0x2c/0x10c drivers/firmware/efi/vars.c:68
  generic_ops_register drivers/firmware/efi/efi.c:229 [inline]
  efisubsys_init+0x414/0x5f8 drivers/firmware/efi/efi.c:433
  do_one_initcall+0x24c/0x9c0 init/main.c:1267
  do_initcall_level+0x154/0x214 init/main.c:1329
  do_initcalls+0x58/0xac init/main.c:1345
  do_basic_setup+0x8c/0xa0 init/main.c:1364
  kernel_init_freeable+0x324/0x478 init/main.c:1578
  kernel_init+0x24/0x2a0 init/main.c:1467
  ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
irq event stamp: 10106
hardirqs last  enabled at (10105): [<ffff80008b3388f8>] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:85 [inline]
hardirqs last  enabled at (10105): [<ffff80008b3388f8>] exit_to_kernel_mode+0xdc/0x10c arch/arm64/kernel/entry-common.c:95
hardirqs last disabled at (10106): [<ffff80008b42e1b4>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline]
hardirqs last disabled at (10106): [<ffff80008b42e1b4>] _raw_spin_lock_irq+0x28/0x70 kernel/locking/spinlock.c:170
softirqs last  enabled at (8930): [<ffff8000800307f8>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (8928): [<ffff8000800307c4>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock((efivars_lock).lock);
  <Interrupt>
    lock((efivars_lock).lock);

 *** DEADLOCK ***

1 lock held by syz.3.4916/16523:
 #0: ffff0000ef1b60e0 (&type->s_umount_key#52/1){+.+.}-{3:3}, at: alloc_super+0x1b0/0x83c fs/super.c:344

stack backtrace:
CPU: 1 UID: 0 PID: 16523 Comm: syz.3.4916 Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119
 dump_stack+0x1c/0x28 lib/dump_stack.c:128
 print_usage_bug+0x698/0x9ac kernel/locking/lockdep.c:4000
 verify_lock_unused+0xc0/0x114 kernel/locking/lockdep.c:5691
 lock_acquire+0x3b0/0x728 kernel/locking/lockdep.c:5750
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x5c/0x7c kernel/locking/spinlock.c:162
 down_trylock+0x28/0xd8 kernel/locking/semaphore.c:139
 efivar_trylock+0x20/0xa0 drivers/firmware/efi/vars.c:160
 efi_pstore_write+0x21c/0x63c drivers/firmware/efi/efi-pstore.c:223
 pstore_dump+0x764/0xad0 fs/pstore/platform.c:354
 kmsg_dump+0x17c/0x274 kernel/printk/printk.c:4214
 panic+0x34c/0x884 kernel/panic.c:385
 nmi_panic+0x11c/0x23c kernel/panic.c:205
 panic_bad_stack+0x200/0x28c arch/arm64/kernel/traps.c:917
 enter_from_kernel_mode+0x0/0x74 arch/arm64/kernel/entry-common.c:928
 __bad_stack+0x78/0x7c arch/arm64/kernel/entry.S:566
 el1h_64_sync+0x0/0x68 arch/arm64/kernel/entry.S:591

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/24 09:59 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 89298aad .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel stack overflow in kernel_init
2024/09/30 01:46 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 7c1e5b9690b0 ba29ff75 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/26 12:35 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 7c1e5b9690b0 9314348a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/24 21:17 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 7c1e5b9690b0 5643e0e9 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/16 05:32 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd 08d8a733 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/15 19:55 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd 08d8a733 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/15 19:48 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd 08d8a733 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/15 05:49 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd 08d8a733 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/13 14:37 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd b58f933c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/13 09:03 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd 60e1a995 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/09 04:34 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd 9750182a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
2024/09/06 21:54 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 1ff95eb2bebd ce70880a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 kernel panic: corrupted stack end in kernel_init
* Struck through repros no longer work on HEAD.