panic: malloc: allocatiopanic: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_fork.c", line 689 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 511580 323 0 0 0x4000000 0 syz-executor.1 *265960 323 0 0 0x4000000 1 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 __assert(ffffffff81f475ae,ffffffff81f3792c,2b1,ffffffff81f1a512) at __assert+0x28 sys/kern/subr_prf.c:155 proc_trampoline_mp() at proc_trampoline_mp+0x13b 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 malloc: allocation too large, type = 2, size = 3462255744 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 __assert(ffffffff81f475ae,ffffffff81f3792c,2b1,ffffffff81f1a512) at __assert+0x28 sys/kern/subr_prf.c:155 proc_trampoline_mp() at proc_trampoline_mp+0x13b end trace frame: 0x0, count: -4 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c53e10 rbx 0xffff800020c53ec0 rdx 0xffffffff81f52f17 apollo_pio_rec+0xa34b rcx 0 rax 0 r8 0xffffffff81316553 kprintf+0x183 r9 0x1 r10 0x25 r11 0x6e5ad2f000dadcee r12 0x3000000008 r13 0xffff800020c53e20 r14 0x104 r15 0x1 rip 0xffffffff81264218 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c53e00 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=265960 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b42978,0xffff800020b43090 process=0xffff800020b45078 user=0xffff800020c4e000, vmspace=0xfffffd807f00d168 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 323 266989 23301 0 2 0 syz-executor.1 323 511580 23301 0 7 0x4000000 syz-executor.1 * 323 265960 23301 0 7 0x4000000 syz-executor.1 323 349567 23301 0 2 0x4000000 syz-executor.1 68902 282732 70118 0 2 0 syz-executor.0 68902 291964 70118 0 2 0x4000000 syz-executor.0 43613 227432 1 0 3 0x100083 ttyin getty 15617 484732 0 0 3 0x14200 bored sosplice 23301 501490 62793 0 3 0x82 nanosleep syz-executor.1 70118 321404 62793 0 3 0x82 nanosleep syz-executor.0 62793 371018 59652 0 3 0x82 thrsleep syz-fuzzer 62793 370760 59652 0 3 0x4000082 thrsleep syz-fuzzer 62793 264936 59652 0 3 0x4000082 thrsleep syz-fuzzer 62793 322517 59652 0 3 0x4000082 thrsleep syz-fuzzer 62793 140522 59652 0 3 0x4000082 kqread syz-fuzzer 62793 25364 59652 0 3 0x4000082 thrsleep syz-fuzzer 62793 490510 59652 0 3 0x4000082 thrsleep syz-fuzzer 62793 31044 59652 0 3 0x4000082 thrsleep syz-fuzzer 62793 85662 59652 0 3 0x4000082 thrsleep syz-fuzzer 62793 163015 59652 0 3 0x4000082 thrsleep syz-fuzzer 59652 518113 71647 0 3 0x10008a pause ksh 71647 515233 11441 0 3 0x92 select sshd 11441 47848 1 0 3 0x80 select sshd 74054 40963 16135 73 3 0x100090 kqread syslogd 16135 155524 1 0 3 0x100082 netio syslogd 63400 166787 1 77 3 0x100090 poll dhclient 77806 58825 1 0 3 0x80 poll dhclient 15966 221772 0 0 2 0x14200 zerothread 9327 59913 0 0 3 0x14200 aiodoned aiodoned 65451 299216 0 0 3 0x14200 syncer update 76864 253981 0 0 3 0x14200 cleaner cleaner 71170 315284 0 0 3 0x14200 reaper reaper 83660 319285 0 0 3 0x14200 pgdaemon pagedaemon 26805 506047 0 0 3 0x14200 bored crynlk 37281 93920 0 0 3 0x14200 bored crypto 45601 415060 0 0 3 0x40014200 acpi0 acpi0 56217 243330 0 0 3 0x40014200 idle1 20579 77202 0 0 3 0x14200 bored softnet 24462 364765 0 0 3 0x14200 bored systqmp 75563 41349 0 0 3 0x14200 bored systq 22011 138927 0 0 3 0x40014200 bored softclock 31088 158421 0 0 3 0x40014200 idle0 1 420563 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 323 (syz-executor.1) thread 0xffff800020b42978 (511580) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8235c720) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x58a sys/kern/subr_witness.c:1205 #1 syscall+0x47f mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x47f sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 Process 68902 (syz-executor.0) thread 0xffff800020b43530 (291964) exclusive rrwlock inode r = 0 (0xfffffd807097b0a0) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x58a sys/kern/subr_witness.c:1205 #1 _rw_enter+0x44d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 uvm_vnp_uncache+0xa9 sys/uvm/uvm_vnode.c:1333 #6 ffs_write+0x4fa sys/ufs/ffs/ffs_vnops.c:355 #7 VOP_WRITE+0x76 sys/kern/vfs_vops.c:268 #8 vn_write+0x1fd sys/kern/vfs_vnops.c:397 #9 dofilewritev+0x1b0 sys/kern/sys_generic.c:364 #10 sys_pwritev+0xd9 sys/kern/vfs_syscalls.c:3161 #11 syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] #11 syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 #12 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9504 6351K 6359K 78643K 10817 0 0 pcb 23 9K 10K 78643K 395 0 0 rtable 100 3K 4K 78643K 295 0 0 ifaddr 52 12K 13K 78643K 120 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 17 0 0 iov 1 12K 16K 78643K 48 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 76K 78643K 1621 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 14 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 78 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 25K 78643K 629 0 0 sigio 0 0K 0K 78643K 7 0 0 proc 42 38K 70K 78643K 319 0 0 subproc 64 65538K 67586K 78643K 72 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 69 0 0 in_multi 33 2K 2K 78643K 57 0 0 ether_multi 1 0K 0K 78643K 8 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 214 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 82 20K 21K 78643K 2666 0 0 UVM aobj 51 3K 3K 78643K 51 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 15 0 0 NDP 10 0K 0K 78643K 33 0 0 temp 145 2360K 2428K 78643K 4527 0 0 kqueue 0 0K 0K 78643K 7 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 307 0 300 1 0 1 1 0 8 0 plimitpl 152 21 0 14 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 5 0 5 1 1 0 1 0 8 0 tcpcb 544 97 0 93 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 17 0 17 4 3 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 0 12 0 12 12 0 8 0 art_table 32 186 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 6 3 3 0 1 0 8 0 semapl 112 76 0 66 1 0 1 1 0 8 0 shmpl 112 49 0 0 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2689 0 1278 46 0 46 46 0 8 0 ffsino 272 2689 0 1278 95 0 95 95 0 8 0 nchpl 144 3800 0 2175 61 0 61 61 0 8 0 uvmvnodes 72 2807 0 0 52 0 52 52 0 8 0 vnodes 200 2807 0 0 148 0 148 148 0 8 0 namei 1024 10582 0 10582 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 9724 0 9724 7 6 1 6 0 8 1 sigapl 432 798 0 784 2 0 2 2 0 8 0 futexpl 56 9163 0 9163 1 0 1 1 0 8 1 knotepl 112 214 0 187 3 2 1 2 0 8 0 kqueuepl 104 187 0 185 1 0 1 1 0 8 0 pipepl 112 438 0 419 3 1 2 2 0 8 1 fdescpl 488 799 0 784 3 1 2 3 0 8 0 filepl 152 4720 0 4622 8 3 5 5 0 8 1 lockfpl 104 199 0 198 5 4 1 1 0 8 0 lockfspl 32 214 0 213 5 4 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 28 0 18 1 0 1 1 0 8 0 ucredpl 96 1235 0 1228 1 0 1 1 0 8 0 zombiepl 144 784 0 784 2 1 1 1 0 8 1 processpl 840 814 0 784 4 0 4 4 0 8 0 procpl 600 2079 0 2036 4 0 4 4 0 8 0 sosppl 128 9 0 9 3 3 0 1 0 8 0 sockpl 384 635 0 618 6 3 3 3 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 119 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 150 0 0 8 0 8 8 0 8 0 bufpl 256 6382 0 1013 336 0 336 336 0 8 0 anonpl 16 74479 0 66483 47 14 33 38 0 125 0 amapchunkpl 152 4188 0 4093 15 11 4 9 0 158 0 amappl16 192 3231 0 2813 25 3 22 23 0 8 1 amappl15 184 5 0 3 1 0 1 1 0 8 0 amappl14 176 6 0 5 2 1 1 1 0 8 0 amappl13 168 25 0 22 1 0 1 1 0 8 0 amappl12 160 620 0 616 2 1 1 1 0 8 0 amappl11 152 180 0 170 1 0 1 1 0 8 0 amappl10 144 59 0 57 2 1 1 1 0 8 0 amappl9 136 345 0 341 1 0 1 1 0 8 0 amappl8 128 751 0 730 1 0 1 1 0 8 0 amappl7 120 40 0 34 1 0 1 1 0 8 0 amappl6 112 52 0 46 1 0 1 1 0 8 0 amappl5 104 151 0 139 1 0 1 1 0 8 0 amappl4 96 275 0 250 2 1 1 2 0 8 0 amappl3 88 164 0 159 1 0 1 1 0 8 0 amappl2 80 6762 0 6703 2 0 2 2 0 8 0 amappl1 72 25095 0 24655 24 14 10 19 0 8 0 amappl 72 2285 0 2249 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 50 0 0 1 0 1 1 0 8 0 uaddrrnd 24 799 0 784 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 799 0 784 1 0 1 1 0 8 0 vmmpekpl 168 9972 0 9952 2 0 2 2 0 8 0 vmmpepl 168 89157 0 87702 86 21 65 71 0 357 1 vmsppl 360 798 0 784 2 0 2 2 0 8 0 pdppl 4096 1605 0 1568 6 1 5 6 0 8 0 pvpl 32 242262 0 231199 140 42 98 103 0 265 8 pmappl 224 798 0 784 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 486 0 4 14 0 14 14 0 8 0