panic: malloc: allocation too large, type = 2, size = 16561268912 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 425338 52378 0 0 0 1 syz-executor.1 *106538 52252 0 0 0x4000000 0K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(3db20e8b0,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(7b641d15) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7b641d15,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd80792a5ab0,80085761,ffff800020be78b0,3,fffffd807f7c6900,ffff800020b28720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80677cdc90,80085761,ffff800020be78b0,ffff800020b28720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28720,ffff800020be79f8,ffff800020be79e0) at sys_ioctl+0x651 syscall(ffff800020be7a90) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020be7a90) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,8e68180010) at Xsyscall+0x128 end of kernel end trace frame: 0x90e9465a80, count: 5 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic malloc: allocation too large, type = 2, size = 16561268912 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(3db20e8b0,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(7b641d15) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7b641d15,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd80792a5ab0,80085761,ffff800020be78b0,3,fffffd807f7c6900,ffff800020b28720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80677cdc90,80085761,ffff800020be78b0,ffff800020b28720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28720,ffff800020be79f8,ffff800020be79e0) at sys_ioctl+0x651 syscall(ffff800020be7a90) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020be7a90) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,8e68180010) at Xsyscall+0x128 end of kernel end trace frame: 0x90e9465a80, count: -10 ddb{0}> show registers rdi 0xffffffff81d528d7 db_enter+0x17 rsi 0x1a86 __ALIGN_SIZE+0xa86 rbp 0xffff800020be7480 rbx 0xffff800020be7530 rdx 0x1a87 __ALIGN_SIZE+0xa87 rcx 0xffff800003b66000 rax 0xffff800003b66000 r8 0xffffffff81b94ad3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x1d6339b6bf2d29bd r12 0x3000000008 r13 0xffff800020be7490 r14 0x100 r15 0x1 rip 0xffffffff81d528d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020be7470 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=106538 stat=onproc flags process=0 proc=4000000 pri=74, usrpri=74, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28018,0xffff800020b284d8 process=0xffff800020b7da58 user=0xffff800020be2000, vmspace=0xfffffd807effe5a0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 52378 425338 25969 0 7 0 syz-executor.1 52378 317847 25969 0 3 0x4000080 fsleep syz-executor.1 52252 280979 68687 0 2 0 syz-executor.0 *52252 106538 68687 0 7 0x4000000 syz-executor.0 68687 350167 37399 0 2 0x482 syz-executor.0 91347 16532 0 0 3 0x14200 bored sosplice 25969 481233 37399 0 3 0x82 nanosleep syz-executor.1 37399 402486 38286 0 3 0x82 thrsleep syz-fuzzer 37399 284714 38286 0 3 0x4000082 thrsleep syz-fuzzer 37399 49321 38286 0 3 0x4000082 thrsleep syz-fuzzer 37399 18676 38286 0 3 0x4000082 thrsleep syz-fuzzer 37399 209368 38286 0 3 0x4000082 thrsleep syz-fuzzer 37399 44275 38286 0 3 0x4000082 thrsleep syz-fuzzer 37399 221277 38286 0 3 0x4000082 thrsleep syz-fuzzer 37399 196095 38286 0 3 0x4000082 thrsleep syz-fuzzer 37399 19885 38286 0 3 0x4000082 kqread syz-fuzzer 37399 4810 38286 0 3 0x4000082 thrsleep syz-fuzzer 38286 143023 36809 0 3 0x10008a pause ksh 36809 267675 19811 0 3 0x92 select sshd 3768 110759 1 0 3 0x100083 ttyin getty 19811 455069 1 0 3 0x80 select sshd 65062 46488 43048 74 3 0x100092 bpf pflogd 43048 40816 1 0 3 0x80 netio pflogd 53977 410092 79818 73 3 0x100090 kqread syslogd 79818 464062 1 0 3 0x100082 netio syslogd 31272 12164 1 77 3 0x100090 poll dhclient 47006 137482 1 0 3 0x80 poll dhclient 28673 491918 0 0 2 0x14200 zerothread 58080 400404 0 0 3 0x14200 aiodoned aiodoned 10148 281671 0 0 3 0x14200 syncer update 48250 46336 0 0 3 0x14200 cleaner cleaner 14063 186482 0 0 3 0x14200 reaper reaper 87551 392943 0 0 3 0x14200 pgdaemon pagedaemon 1588 432408 0 0 3 0x14200 bored crynlk 66368 407993 0 0 3 0x14200 bored crypto 39994 483135 0 0 3 0x40014200 acpi0 acpi0 29416 199969 0 0 3 0x40014200 idle1 88561 428885 0 0 3 0x14200 bored softnet 57644 160641 0 0 3 0x14200 bored systqmp 77586 205361 0 0 3 0x14200 bored systq 50671 295298 0 0 3 0x40014200 bored softclock 13655 413537 0 0 3 0x40014200 idle0 97908 118137 0 0 3 0x14200 bored smr 1 377575 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 52252 (syz-executor.0) thread 0xffff800020b28720 (106538) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823e9b78) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9504 6411K 6415K 78643K 10637 0 0 pcb 25 9K 10K 78643K 112 0 0 rtable 100 3K 4K 78643K 244 0 0 ifaddr 52 12K 12K 78643K 75 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1472 0 0 iov 0 0K 16K 78643K 29 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 75K 78643K 1268 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 4 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 24 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 136 0 0 proc 53 50K 71K 78643K 350 0 0 subproc 64 65538K 67586K 78643K 102 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 16 0 0 in_multi 33 2K 2K 78643K 44 0 0 ether_multi 1 0K 0K 78643K 1 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 207 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 87 21K 21K 78643K 1285 0 0 UVM aobj 17 2K 2K 78643K 17 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 6 0 0 NDP 10 0K 0K 78643K 21 0 0 temp 125 2367K 2433K 78643K 3589 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 5 0 1 1 0 1 1 0 8 0 inpcbpl 280 99 0 92 1 0 1 1 0 8 0 plimitpl 152 21 0 13 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 50 0 10 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 9 0 9 1 1 0 1 0 8 0 tcpcb 544 26 0 22 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 3 0 3 2 2 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 16 0 6 1 0 1 1 0 8 0 pfstkey 112 16 0 6 1 0 1 1 0 8 0 pfstate 328 16 0 6 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 225 0 41 12 0 12 12 0 8 0 art_table 32 226 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 22 0 12 1 0 1 1 0 8 0 shmpl 112 15 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1640 0 223 46 0 46 46 0 8 0 ffsino 272 1640 0 223 95 0 95 95 0 8 0 nchpl 144 2031 0 397 61 0 61 61 0 8 0 uvmvnodes 72 1707 0 0 32 0 32 32 0 8 0 vnodes 200 1707 0 0 90 0 90 90 0 8 0 namei 1024 5383 0 5383 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 5462 0 5462 7 6 1 6 0 8 1 sigapl 432 332 0 316 2 0 2 2 0 8 0 futexpl 56 1543 0 1542 1 0 1 1 0 8 0 knotepl 112 103 0 84 1 0 1 1 0 8 0 kqueuepl 104 49 0 45 1 0 1 1 0 8 0 pipepl 112 246 0 227 3 2 1 1 0 8 0 fdescpl 488 333 0 316 3 0 3 3 0 8 0 filepl 152 1786 0 1682 5 0 5 5 0 8 0 lockfpl 104 34 0 34 2 1 1 1 0 8 1 lockfspl 32 36 0 36 2 1 1 1 0 8 1 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 186 0 177 1 0 1 1 0 8 0 zombiepl 144 316 0 316 3 2 1 1 0 8 1 processpl 840 349 0 316 4 0 4 4 0 8 0 procpl 600 609 0 565 5 1 4 5 0 8 0 srpgc 64 6 0 6 1 0 1 1 0 8 1 sosppl 128 3 0 3 1 1 0 1 0 8 0 sockpl 384 183 0 164 3 0 3 3 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 153 0 0 8 0 8 8 0 8 0 bufpl 256 6036 0 1143 306 0 306 306 0 8 0 anonpl 16 46510 0 39022 54 3 51 51 0 125 16 amapchunkpl 152 1440 0 1355 6 1 5 5 0 158 1 amappl16 192 1528 0 1085 38 7 31 35 0 8 8 amappl15 184 115 0 109 1 0 1 1 0 8 0 amappl14 176 26 0 22 3 2 1 1 0 8 0 amappl13 168 29 0 25 1 0 1 1 0 8 0 amappl12 160 13 0 11 2 1 1 1 0 8 0 amappl11 152 83 0 66 1 0 1 1 0 8 0 amappl10 144 68 0 65 1 0 1 1 0 8 0 amappl9 136 587 0 584 1 0 1 1 0 8 0 amappl8 128 132 0 119 1 0 1 1 0 8 0 amappl7 120 32 0 28 1 0 1 1 0 8 0 amappl6 112 118 0 107 1 0 1 1 0 8 0 amappl5 104 106 0 93 1 0 1 1 0 8 0 amappl4 96 567 0 533 2 0 2 2 0 8 0 amappl3 88 115 0 110 1 0 1 1 0 8 0 amappl2 80 1693 0 1628 2 0 2 2 0 8 0 amappl1 72 17046 0 16585 26 16 10 20 0 8 0 amappl 72 851 0 815 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 16 0 0 1 0 1 1 0 8 0 uaddrrnd 24 333 0 316 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 333 0 316 1 0 1 1 0 8 0 vmmpekpl 168 6817 0 6795 2 0 2 2 0 8 0 vmmpepl 168 43245 0 41710 98 20 78 78 0 357 11 vmsppl 360 332 0 316 2 0 2 2 0 8 0 pdppl 4096 674 0 632 6 0 6 6 0 8 0 pvpl 32 154226 0 143400 141 10 131 131 0 265 36 pmappl 224 332 0 316 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 456 0 4 13 0 13 13 0 8 0