panic: vop_genpanic: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_fork.c", line 679 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *273280 92924 32767 0x10 0 1 syz-executor.0 343000 71866 32767 0x10 0x4000000 0 syz-executor.6 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827a2af5) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82820418,ffffffff827dec6e,2a7,ffffffff827d705d) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: 11 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu0: vop_generic_badop cpu1: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_fork.c", line 679 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827a2af5) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82820418,ffffffff827dec6e,2a7,ffffffff827d705d) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: -4 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002b9e1570 rbx 0xffff800020d59ba7 rdx 0 rcx 0xffff80002afc62b0 rax 0xffff800020d58ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x2a0c8894503f13b1 r11 0xcc84a4e19ead6896 r12 0xffff800020d599a8 r13 0 r14 0xffffffff82ba69a8 cpu_info_full_primary+0x29a8 r15 0x1 rip 0xffffffff81521d0c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002b9e1560 ss 0 db_enter+0x1c: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) tid=273280 pid=92924 tcnt=1 stat=onproc flags process=10 proc=0 runpri=76, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002afc6d50,0xffff80002afc7aa8 process=0xffff800027738018 user=0xffff80002b9dc000, vmspace=0xfffffd806bbbb018 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *92924 273280 57493 32767 7 0x10 syz-executor.0 75665 110611 64304 32767 2 0x10 syz-executor.7 98320 467545 10525 32767 2 0x10 syz-executor.3 98320 56337 10525 32767 2 0x4000010 syz-executor.3 98320 160554 10525 32767 2 0x4000010 syz-executor.3 20375 193137 2134 32767 2 0x10 syz-executor.5 20375 47018 2134 32767 3 0x4000090 fsleep syz-executor.5 44759 394774 99622 32767 2 0x10 syz-executor.2 44759 296813 99622 32767 3 0x4000090 fsleep syz-executor.2 71866 72270 88331 32767 2 0x10 syz-executor.6 71866 343000 88331 32767 7 0x4000010 syz-executor.6 4990 502428 79384 32767 2 0x10 syz-executor.4 4990 244535 79384 32767 3 0x4000090 fsleep syz-executor.4 72341 125118 0 0 3 0x14200 bored sosplice 88331 394024 85956 32767 3 0x90 nanoslp syz-executor.6 64304 503967 49727 32767 3 0x90 nanoslp syz-executor.7 2134 391898 28691 32767 3 0x90 nanoslp syz-executor.5 85956 362033 68075 0 3 0x82 wait syz-executor.6 49727 476398 68075 0 3 0x82 wait syz-executor.7 99622 437303 72379 32767 3 0x90 nanoslp syz-executor.2 79384 459557 53561 32767 3 0x90 nanoslp syz-executor.4 72379 286497 68075 0 3 0x82 wait syz-executor.2 28691 105224 68075 0 3 0x82 wait syz-executor.5 31130 244523 81223 32767 2 0x10 syz-executor.1 53561 65523 68075 0 3 0x82 wait syz-executor.4 10525 304369 28131 32767 3 0x90 nanoslp syz-executor.3 28131 41100 68075 0 3 0x82 wait syz-executor.3 57493 224603 1860 32767 3 0x90 nanoslp syz-executor.0 81223 318021 68075 0 3 0x82 wait syz-executor.1 1860 374988 68075 0 3 0x82 wait syz-executor.0 68075 514612 72233 0 3 0x2000082 wait syz-fuzzer 68075 197721 72233 0 3 0x6000082 nanoslp syz-fuzzer 68075 130199 72233 0 3 0x6000082 wait syz-fuzzer 68075 55447 72233 0 3 0x6000082 wait syz-fuzzer 68075 13955 72233 0 3 0x6000082 thrsleep syz-fuzzer 68075 230253 72233 0 3 0x6000082 wait syz-fuzzer 68075 254290 72233 0 3 0x6000082 thrsleep syz-fuzzer 68075 40237 72233 0 3 0x6000082 thrsleep syz-fuzzer 68075 519010 72233 0 3 0x6000082 wait syz-fuzzer 68075 107025 72233 0 3 0x6000082 wait syz-fuzzer 68075 260015 72233 0 3 0x6000082 thrsleep syz-fuzzer 68075 64243 72233 0 3 0x6000082 thrsleep syz-fuzzer 68075 434310 72233 0 3 0x6000082 wait syz-fuzzer 68075 189239 72233 0 3 0x6000082 wait syz-fuzzer 68075 427025 72233 0 3 0x6000082 kqread syz-fuzzer 72233 499573 32267 0 3 0x10008a sigsusp ksh 32267 152063 75122 0 3 0x9a kqread sshd 54172 397557 1 0 3 0x100083 ttyin getty 75122 244886 1 0 3 0x88 kqread sshd 72428 23972 65293 73 3 0x1100090 kqread syslogd 65293 127678 1 0 3 0x100082 netio syslogd 31868 275566 1 0 3 0x100080 kqread resolvd 20487 360686 1463 77 3 0x100092 kqread dhcpleased 75307 293775 1463 77 3 0x100092 kqread dhcpleased 1463 136490 1 0 3 0x80 kqread dhcpleased 41326 507284 0 0 3 0x14200 bored smr 70276 24926 0 0 2 0x14200 zerothread 5287 195704 0 0 3 0x14200 aiodoned aiodoned 37885 440921 0 0 3 0x14200 syncer update 97069 263832 0 0 3 0x14200 cleaner cleaner 99515 116327 0 0 3 0x14200 reaper reaper 61258 254307 0 0 3 0x14200 pgdaemon pagedaemon 3018 356775 0 0 3 0x14200 bored viomb 38230 232127 0 0 3 0x40014200 acpi0 acpi0 64908 280466 0 0 3 0x40014200 idle1 32504 152799 0 0 3 0x14200 bored softnet3 14922 138101 0 0 3 0x14200 bored softnet2 75399 260431 0 0 3 0x14200 bored softnet1 73060 443750 0 0 2 0x14200 softnet0 56275 492771 0 0 3 0x14200 bored systqmp 85181 330186 0 0 3 0x14200 bored systq 54313 118715 0 0 3 0x40014200 bored softclock 28638 494991 0 0 3 0x40014200 idle0 1 283000 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 71866 (syz-executor.6) thread 0xffff80002afc6558 (343000) exclusive rrwlock inode r = 0 (0xfffffd8068901c48) #0 witness_lock+0x447 #1 rw_enter+0x3c8 sys/kern/kern_rwlock.c:309 #2 rrw_enter+0x8c sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0x8b sys/kern/vfs_vops.c:518 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:564 #5 vget+0x200 sys/kern/vfs_subr.c:676 #6 ufs_ihashget+0x121 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x7c sys/ufs/ffs/ffs_vfsops.c:1314 #8 ufs_lookup+0x122c sys/ufs/ufs/ufs_lookup.c:582 #9 VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 #10 vfs_lookup+0x6e2 sys/kern/vfs_lookup.c:566 #11 namei+0x55a sys/kern/vfs_lookup.c:250 #12 vn_open+0xf8 sys/kern/vfs_vnops.c:140 #13 doopenat+0x26e sys/kern/vfs_syscalls.c:1126 #14 syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] #14 syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 #15 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82c88068) #0 witness_lock+0x447 #1 syscall+0x5cd mi_syscall sys/sys/syscall_mi.h:110 [inline] #1 syscall+0x5cd sys/arch/amd64/amd64/trap.c:623 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10188 6409K 6420K 78643K 11266 0 pcb 13 8K 8K 78643K 13 0 rtable 234 6K 6K 78643K 374 0 pf 29 8K 8K 78643K 29 0 ifaddr 44 15K 15K 78643K 46 0 ifgroup 50 2K 2K 78643K 50 0 counters 60 35K 35K 78643K 60 0 ioctlops 0 0K 2K 78643K 29 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1279 80K 80K 78643K 1299 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 12 0 VM map 2 1K 1K 78643K 2 0 sem 8 0K 1K 78643K 14 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 25 93K 125K 78643K 461 0 proc 56 78K 103K 78643K 528 0 subproc 104 6K 6K 78643K 104 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 13 0 in_multi 99 7K 7K 78643K 99 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 67 307K 307K 78643K 67 0 exec 0 0K 1K 78643K 371 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 305 80K 81K 78643K 6100 0 UVM aobj 13 2K 2K 78643K 13 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 4 0 NDP 11 0K 2K 78643K 27 0 temp 34 5910K 5974K 78643K 4737 0 kqueue 13 20K 22K 78643K 69 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 60 0 57 1 0 1 1 0 8 0 rtentry 112 111 0 1 4 0 4 4 0 8 0 unpcb 144 45 0 30 1 0 1 1 0 8 0 syncache 304 25 0 25 1 0 1 1 0 8 1 tcpqe 32 124 0 124 2 1 1 1 0 8 1 tcpcb 808 88 0 76 3 0 3 3 0 8 0 arp 120 18 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 4 0 0 1 0 1 1 0 8 0 inpcb 368 200 0 185 3 0 3 3 0 8 0 nd6 136 24 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 453 0 0 29 0 29 29 0 8 0 art_table 32 454 0 0 4 0 4 4 0 8 0 art_node 16 110 0 10 1 0 1 1 0 8 0 semupl 112 6 0 6 1 0 1 1 0 8 1 semapl 112 6 0 0 1 0 1 1 0 8 0 shmpl 112 10 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1853 0 412 91 0 91 91 0 8 0 ffsino 272 1853 0 412 97 0 97 97 0 8 0 nchpl 144 2572 0 888 63 0 63 63 0 8 0 uvmvnodes 80 1966 0 0 41 0 41 41 0 8 0 vnodes 216 1966 0 0 110 0 110 110 0 8 0 namei 1024 7893 0 7891 2 0 2 2 0 8 1 percpumem 16 43 0 0 1 0 1 1 0 8 0 kstatmem 264 22 0 0 2 0 2 2 0 8 0 scxspl 216 8623 0 8623 10 2 8 8 1 8 8 plimitpl 152 118 0 95 2 0 2 2 0 8 1 sigapl 424 758 0 704 7 0 7 7 0 8 0 futexpl 64 3330 0 3327 1 0 1 1 0 8 0 knotepl 120 104 0 0 4 0 4 4 0 8 0 kqueuepl 216 62 0 53 1 0 1 1 0 8 0 pipepl 320 145 0 117 3 0 3 3 0 8 0 fdescpl 496 740 0 704 7 1 6 6 0 8 1 filepl 152 2475 0 2238 10 0 10 10 0 8 0 lockfpl 104 17 0 15 1 0 1 1 0 8 0 lockfspl 48 9 0 7 1 0 1 1 0 8 0 sessionpl 144 23 0 7 1 0 1 1 0 8 0 pgrppl 48 23 0 7 1 0 1 1 0 8 0 ucredpl 104 273 0 255 1 0 1 1 0 8 0 zombiepl 144 704 0 704 1 0 1 1 0 8 1 processpl 1072 758 0 704 5 0 5 5 0 8 1 procpl 680 1136 0 1062 8 0 8 8 0 8 1 sosppl 168 29 0 21 1 0 1 1 0 8 0 sockpl 488 305 0 272 6 0 6 6 0 8 1 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k 2048 338 0 0 43 0 43 43 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 343 0 0 22 0 22 22 0 8 0 bufpl 288 4431 0 140 307 0 307 307 0 8 0 anonpl 24 239781 0 233708 56 2 54 55 0 186 16 amapchunkpl 152 20416 0 19657 34 0 34 34 0 158 2 amappl16 200 6687 0 6583 6 0 6 6 0 8 0 amappl15 192 10 0 10 1 1 0 1 0 8 0 amappl14 184 148 0 137 2 1 1 2 0 8 0 amappl13 176 10 0 9 1 0 1 1 0 8 0 amappl12 168 1389 0 1354 3 0 3 3 0 8 1 amappl11 160 54 0 44 1 0 1 1 0 8 0 amappl10 152 42 0 31 1 0 1 1 0 8 0 amappl9 144 191 0 191 1 0 1 1 0 8 1 amappl8 136 163 0 122 2 0 2 2 0 8 0 amappl7 128 70 0 58 2 0 2 2 0 8 0 amappl6 120 240 0 222 2 1 1 2 0 8 0 amappl5 112 160 0 150 1 0 1 1 0 8 0 amappl4 104 541 0 507 2 0 2 2 0 8 0 amappl3 96 4351 0 4256 4 0 4 4 0 8 1 amappl2 88 989 0 918 3 1 2 3 0 8 0 amappl1 80 10894 0 10365 22 4 18 22 0 8 5 amappl 88 5612 0 5394 6 0 6 6 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 12 0 0 1 0 1 1 0 8 0 uaddrrnd 24 740 0 704 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 740 0 704 1 0 1 1 0 8 0 vmmpekpl 168 10674 0 10619 3 0 3 3 0 8 0 vmmpepl 168 64211 0 62083 112 1 111 112 0 357 15 vmsppl 464 739 0 704 7 1 6 6 0 8 1 rwobjpl 56 25609 0 22564 45 2 43 45 0 8 0 pdppl 4096 1488 0 1408 118 36 82 96 0 8 2 pvpl 32 521589 0 509590 361 18 343 360 0 265 243 pmappl 248 739 0 704 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 736 0 38 20 0 20 20 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffffffff82ba5ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82c87e60) at __mp_lock+0x129 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82c87e60) at __mp_lock+0x129 sys/kern/kern_lock.c:147 intr_handler(ffff800027b68800,ffff80000027b700) at intr_handler+0x62 sys/arch/amd64/amd64/intr.c:532 Xintr_ioapic_edge26_untramp() at Xintr_ioapic_edge26_untramp+0x18f Xspllower() at Xspllower+0x1d cnputc(6e) at cnputc+0x4f sys/dev/cons.c:218 db_putchar(6e) at db_putchar+0x3fc sys/ddb/db_output.c:155 kprintf() at kprintf+0x20fc sys/kern/subr_prf.c:1064 db_printf(ffffffff82825426) at db_printf+0x89 sys/kern/subr_prf.c:498 panic(ffffffff82794ff4) at panic+0xdb sys/kern/subr_prf.c:216 vop_generic_badop(ffff800027b68c20) at vop_generic_badop+0x1f sys/kern/vfs_default.c:133 VOP_READLINK(fffffd80704dca40,ffff800027b68c90,fffffd807f7d64e0) at VOP_READLINK+0xba sys/kern/vfs_vops.c:460 end trace frame: 0xffff800027b68d20, count: 0 ddb{0}> trace x86_ipi_db(ffffffff82ba5ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82c87e60) at __mp_lock+0x129 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82c87e60) at __mp_lock+0x129 sys/kern/kern_lock.c:147 intr_handler(ffff800027b68800,ffff80000027b700) at intr_handler+0x62 sys/arch/amd64/amd64/intr.c:532 Xintr_ioapic_edge26_untramp() at Xintr_ioapic_edge26_untramp+0x18f Xspllower() at Xspllower+0x1d cnputc(6e) at cnputc+0x4f sys/dev/cons.c:218 db_putchar(6e) at db_putchar+0x3fc sys/ddb/db_output.c:155 kprintf() at kprintf+0x20fc sys/kern/subr_prf.c:1064 db_printf(ffffffff82825426) at db_printf+0x89 sys/kern/subr_prf.c:498 panic(ffffffff82794ff4) at panic+0xdb sys/kern/subr_prf.c:216 vop_generic_badop(ffff800027b68c20) at vop_generic_badop+0x1f sys/kern/vfs_default.c:133 VOP_READLINK(fffffd80704dca40,ffff800027b68c90,fffffd807f7d64e0) at VOP_READLINK+0xba sys/kern/vfs_vops.c:460 namei(ffff800027b68f08) at namei+0x67a sys/kern/vfs_lookup.c:295 vn_open(ffff800027b68f08,1,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002afc6558,ffffff9c,20000080,0,0,ffff800027b690e0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800027b69160) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff800027b69160) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x497b7e866a0, count: -19 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x1c: addq $0x8,%rsp db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827a2af5) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82820418,ffffffff827dec6e,2a7,ffffffff827d705d) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: 11 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827a2af5) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82820418,ffffffff827dec6e,2a7,ffffffff827d705d) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: -4