panic: malloc: allocation too large, type = 2, size = 671088648 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 212315 94965 0 0 0 1 syz-executor.1 *441807 94965 0 0 0x4000000 0K syz-executor.1 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(28000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(5000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5000000,ffff800000026f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8067b0c618,80085761,ffff800020c5d990,2,fffffd807f7c6900,ffff800020b74bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807b275318,80085761,ffff800020c5d990,ffff800020b74bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74bd0,ffff800020c5dad8,ffff800020c5dac0) at sys_ioctl+0x651 syscall(ffff800020c5db70) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5db70) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,e317e83e010) at Xsyscall+0x128 end of kernel end trace frame: 0xe3407e9b4d0, 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 = 671088648 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(28000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(5000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5000000,ffff800000026f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8067b0c618,80085761,ffff800020c5d990,2,fffffd807f7c6900,ffff800020b74bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807b275318,80085761,ffff800020c5d990,ffff800020b74bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74bd0,ffff800020c5dad8,ffff800020c5dac0) at sys_ioctl+0x651 syscall(ffff800020c5db70) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5db70) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,e317e83e010) at Xsyscall+0x128 end of kernel end trace frame: 0xe3407e9b4d0, count: -10 ddb{0}> show registers rdi 0xffffffff815744d7 db_enter+0x17 rsi 0x1f5c __ALIGN_SIZE+0xf5c rbp 0xffff800020c5d560 rbx 0xffff800020c5d610 rdx 0x1f5d __ALIGN_SIZE+0xf5d rcx 0xffff800000963000 rax 0xffff800000963000 r8 0xffffffff8161baa3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xa3595e3220e4ca19 r12 0x3000000008 r13 0xffff800020c5d570 r14 0x100 r15 0x1 rip 0xffffffff815744d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c5d550 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=441807 stat=onproc flags process=0 proc=4000000 pri=68, usrpri=68, nice=20 forw=0xffffffffffffffff, list=0xffff800020b744c8,0xffffffff82382238 process=0xffff800020b8d080 user=0xffff800020c58000, vmspace=0xfffffd807effeb40 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 94965 212315 97711 0 7 0 syz-executor.1 *94965 441807 97711 0 7 0x4000000 syz-executor.1 95754 144994 45499 0 3 0x80 nanosleep syz-executor.0 95754 238202 45499 0 3 0x4000080 fsleep syz-executor.0 95754 513157 45499 0 3 0x4000080 bell syz-executor.0 97711 304723 31632 0 3 0x82 nanosleep syz-executor.1 35595 192094 1 0 3 0x100083 ttyin getty 45499 522704 31632 0 3 0x82 nanosleep syz-executor.0 50406 61020 0 0 3 0x14200 bored sosplice 31632 37111 30814 0 3 0x82 thrsleep syz-fuzzer 31632 326417 30814 0 3 0x4000082 thrsleep syz-fuzzer 31632 171534 30814 0 3 0x4000082 thrsleep syz-fuzzer 31632 442421 30814 0 3 0x4000082 thrsleep syz-fuzzer 31632 500895 30814 0 3 0x4000082 thrsleep syz-fuzzer 31632 66502 30814 0 3 0x4000082 thrsleep syz-fuzzer 31632 109737 30814 0 3 0x4000082 thrsleep syz-fuzzer 31632 247557 30814 0 3 0x4000082 thrsleep syz-fuzzer 31632 118839 30814 0 3 0x4000082 kqread syz-fuzzer 31632 386955 30814 0 3 0x4000082 thrsleep syz-fuzzer 30814 124023 63574 0 3 0x10008a pause ksh 63574 149473 77217 0 3 0x92 select sshd 77217 27989 1 0 3 0x80 select sshd 32222 35588 16884 74 3 0x100092 bpf pflogd 16884 373111 1 0 3 0x80 netio pflogd 77718 367928 36515 73 3 0x100090 kqread syslogd 36515 182512 1 0 3 0x100082 netio syslogd 85450 176064 1 77 3 0x100090 poll dhclient 30808 16106 1 0 3 0x80 poll dhclient 50005 426289 0 0 3 0x14200 pgzero zerothread 2420 240299 0 0 3 0x14200 aiodoned aiodoned 25658 422244 0 0 3 0x14200 syncer update 88091 246851 0 0 3 0x14200 cleaner cleaner 18226 446254 0 0 3 0x14200 reaper reaper 48047 114848 0 0 3 0x14200 pgdaemon pagedaemon 21594 358886 0 0 3 0x14200 bored crynlk 9944 285853 0 0 3 0x14200 bored crypto 87856 174168 0 0 3 0x40014200 acpi0 acpi0 8452 302583 0 0 3 0x40014200 idle1 92463 120567 0 0 3 0x14200 bored softnet 51042 232041 0 0 3 0x14200 bored systqmp 87533 8998 0 0 3 0x14200 bored systq 86439 159997 0 0 3 0x40014200 bored softclock 4189 453081 0 0 3 0x40014200 idle0 10367 515224 0 0 3 0x14200 bored smr 1 266640 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 94965 (syz-executor.1) thread 0xffff800020b74bd0 (441807) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823959b0) 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 9583 26932K 31031K 78643K 14959 0 0 pcb 25 9K 11K 78643K 7240 0 0 rtable 100 3K 4K 78643K 2879 0 0 ifaddr 71 18K 20K 78643K 917 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1581 0 0 iov 0 0K 24K 78643K 769 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 75K 78643K 6226 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 498 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 799 0 0 dirhash 15 2K 2K 78643K 15 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 9587 0 0 sigio 0 0K 0K 78643K 95 0 0 proc 54 51K 71K 78643K 4449 0 0 subproc 64 65538K 67586K 78643K 1933 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 795 0 0 in_multi 33 2K 2K 78643K 830 0 0 ether_multi 1 0K 0K 78643K 37 0 0 mrt 0 0K 0K 78643K 13 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 1650 0 0 pfkey data 0 0K 0K 78643K 1 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 107 22K 31K 78643K 32313 0 0 UVM aobj 130 5K 5K 78643K 131 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 328 0 0 NDP 16 0K 0K 78643K 319 0 0 temp 200 2380K 3020K 78643K 31664 0 0 kqueue 0 0K 0K 78643K 52 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 58 0 54 1 0 1 1 0 8 0 inpcbpl 280 5653 0 5646 1 0 1 1 0 8 0 plimitpl 152 294 0 286 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 539 0 499 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 1268 0 1264 1 0 1 1 0 8 0 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 112 0 108 1 0 1 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 113 0 113 48 48 0 1 0 8 0 pffrent 40 2 0 2 1 1 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 238 0 236 1 0 1 1 0 8 0 pfstkey 112 238 0 236 2 1 1 2 0 8 0 pfstate 328 238 0 236 6 5 1 4 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 2595 0 2403 29 16 13 14 0 8 0 art_table 32 2596 0 2403 2 0 2 2 0 8 0 art_node 16 528 0 494 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 797 0 787 1 0 1 1 0 8 0 shmpl 112 129 0 1 4 0 4 4 0 8 0 dirhash 1024 19 0 0 3 0 3 3 0 8 0 dino1pl 128 19249 0 17278 66 2 64 64 0 8 0 ffsino 272 19249 0 17278 133 1 132 132 0 8 0 nchpl 144 32754 0 30944 69 1 68 68 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 98268 0 98268 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 15 0 15 13 13 0 1 0 8 0 scxspl 192 94938 0 94938 45 44 1 6 0 8 1 sigapl 432 9631 0 9615 2 0 2 2 0 8 0 futexpl 56 105010 0 105009 1 0 1 1 0 8 0 knotepl 112 2122 0 2103 2 1 1 2 0 8 0 kqueuepl 104 1375 0 1373 1 0 1 1 0 8 0 pipepl 112 4090 0 4071 9 8 1 2 0 8 0 fdescpl 488 9632 0 9615 3 0 3 3 0 8 0 filepl 152 54413 0 54312 14 9 5 6 0 8 1 lockfpl 104 5060 0 5059 2 1 1 1 0 8 0 lockfspl 32 2336 0 2335 2 1 1 1 0 8 0 sessionpl 112 79 0 68 1 0 1 1 0 8 0 pgrppl 48 148 0 137 1 0 1 1 0 8 0 ucredpl 96 6918 0 6909 1 0 1 1 0 8 0 zombiepl 144 9615 0 9615 2 1 1 1 0 8 1 processpl 840 9648 0 9615 4 0 4 4 0 8 0 procpl 600 30372 0 30327 9 5 4 5 0 8 0 srpgc 64 324 0 324 40 40 0 1 0 8 0 sosppl 128 71 0 71 23 23 0 1 0 8 0 sockpl 384 12568 0 12549 14 12 2 4 0 8 0 mcl64k 65536 456 0 0 56 52 4 30 0 8 0 mcl16k 16384 8 0 0 1 0 1 1 0 8 0 mcl12k 12288 42 0 0 2 0 2 2 0 8 0 mcl9k 9216 25 0 0 2 1 1 2 0 8 0 mcl8k 8192 23 0 0 3 1 2 3 0 8 0 mcl4k 4096 25 0 0 3 0 3 3 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 202 0 0 17 4 13 17 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 1076 0 0 28 9 19 20 0 8 0 bufpl 256 23153 0 16129 440 0 440 440 0 8 0 anonpl 16 853351 0 845567 247 209 38 53 0 125 0 amapchunkpl 152 58501 0 58410 87 83 4 11 0 158 0 amappl16 192 44348 0 43865 243 218 25 37 0 8 0 amappl15 184 2067 0 2061 1 0 1 1 0 8 0 amappl14 176 2377 0 2369 2 1 1 1 0 8 0 amappl13 168 440 0 437 1 0 1 1 0 8 0 amappl12 160 876 0 876 10 10 0 1 0 8 0 amappl11 152 2934 0 2917 1 0 1 1 0 8 0 amappl10 144 960 0 953 1 0 1 1 0 8 0 amappl9 136 2858 0 2853 1 0 1 1 0 8 0 amappl8 128 2517 0 2478 2 0 2 2 0 8 0 amappl7 120 655 0 648 1 0 1 1 0 8 0 amappl6 112 2672 0 2661 1 0 1 1 0 8 0 amappl5 104 730 0 716 1 0 1 1 0 8 0 amappl4 96 9716 0 9681 2 1 1 2 0 8 0 amappl3 88 3576 0 3570 1 0 1 1 0 8 0 amappl2 80 84051 0 83983 2 0 2 2 0 8 0 amappl1 72 217309 0 216847 25 15 10 20 0 8 0 amappl 72 31011 0 30973 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 130 0 1 3 0 3 3 0 8 0 uaddrrnd 24 9632 0 9615 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9632 0 9615 1 0 1 1 0 8 0 vmmpekpl 168 82385 0 82362 2 0 2 2 0 8 0 vmmpepl 168 1024104 0 1022492 545 471 74 90 0 357 0 vmsppl 360 9631 0 9615 2 0 2 2 0 8 0 pdppl 4096 19272 0 19230 6 0 6 6 0 8 0 pvpl 32 2329748 0 2318518 598 495 103 142 0 265 0 pmappl 224 9631 0 9615 31 30 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 727 0 87 19 0 19 19 0 8 0