panic: malloc: allocation too large, type = 2, size = 1073741832 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *433687 73971 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(40000008,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(8000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000000,ffff8000006a1f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8035eda5a0,80085761,ffff8000149be740,b,fffffd803f7c6b40,ffff8000ffff5780) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8035f77108,80085761,ffff8000149be740,ffff8000ffff5780) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff5780,ffff8000149be888,ffff8000149be870) at sys_ioctl+0x638 syscall(ffff8000149be920) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,fa64abd4010) at Xsyscall+0x128 end of kernel end trace frame: 0xfa8790046d0, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic malloc: allocation too large, type = 2, size = 1073741832 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(40000008,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(8000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000000,ffff8000006a1f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8035eda5a0,80085761,ffff8000149be740,b,fffffd803f7c6b40,ffff8000ffff5780) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8035f77108,80085761,ffff8000149be740,ffff8000ffff5780) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff5780,ffff8000149be888,ffff8000149be870) at sys_ioctl+0x638 syscall(ffff8000149be920) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,fa64abd4010) at Xsyscall+0x128 end of kernel end trace frame: 0xfa8790046d0, count: -10 ddb> show registers rdi 0xffffffff8161b027 db_enter+0x17 rsi 0x1cf2 __ALIGN_SIZE+0xcf2 rbp 0xffff8000149be310 rbx 0xffff8000149be3c0 rdx 0x1cf3 __ALIGN_SIZE+0xcf3 rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff8000149be2d0 r9 0x1 r10 0xffff800001942900 r11 0xe25ee246b4fdb500 r12 0x3000000008 r13 0xffff8000149be320 r14 0x100 r15 0x1 rip 0xffffffff8161b028 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149be300 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=433687 stat=onproc flags process=0 proc=4000000 pri=76, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5528,0xffffffff82290d98 process=0xffff8000ffffa350 user=0xffff8000149b9000, vmspace=0xfffffd803f014108 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 73971 406066 91669 0 2 0 syz-executor.0 *73971 433687 91669 0 7 0x4000000 syz-executor.0 52082 448414 1 0 3 0x100083 ttyin getty 91669 404013 19167 0 3 0x82 nanosleep syz-executor.0 83356 385303 0 0 3 0x14200 bored sosplice 19167 340596 82658 0 3 0x82 kqread syz-fuzzer 19167 45427 82658 0 3 0x4000082 thrsleep syz-fuzzer 19167 255322 82658 0 3 0x4000082 thrsleep syz-fuzzer 19167 271858 82658 0 3 0x4000082 thrsleep syz-fuzzer 19167 339597 82658 0 3 0x4000082 thrsleep syz-fuzzer 19167 203427 82658 0 3 0x4000082 thrsleep syz-fuzzer 19167 402529 82658 0 3 0x4000082 thrsleep syz-fuzzer 82658 261074 64127 0 3 0x10008a pause ksh 64127 335395 24326 0 3 0x92 select sshd 24326 235631 1 0 3 0x80 select sshd 51877 244489 52031 73 3 0x100090 kqread syslogd 52031 467240 1 0 3 0x100082 netio syslogd 63223 85347 1 77 3 0x100090 poll dhclient 66984 12701 1 0 3 0x80 poll dhclient 33239 393326 0 0 2 0x14200 zerothread 50703 490450 0 0 3 0x14200 aiodoned aiodoned 57311 148377 0 0 3 0x14200 syncer update 68751 42604 0 0 3 0x14200 cleaner cleaner 43321 499675 0 0 3 0x14200 reaper reaper 97290 55818 0 0 3 0x14200 pgdaemon pagedaemon 66454 118314 0 0 3 0x14200 bored crynlk 4870 85846 0 0 3 0x14200 bored crypto 88 38686 0 0 3 0x40014200 acpi0 acpi0 44062 236520 0 0 3 0x14200 bored softnet 48110 161317 0 0 3 0x14200 bored systqmp 99198 90797 0 0 3 0x14200 bored systq 40115 186911 0 0 3 0x40014200 bored softclock 54502 23862 0 0 3 0x40014200 idle0 96574 230610 0 0 3 0x14200 bored smr 1 305450 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9475 6337K 6346K 78643K 10716 0 0 pcb 23 9K 10K 78643K 345 0 0 rtable 82 3K 3K 78643K 365 0 0 ifaddr 43 11K 12K 78643K 107 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 23 0 0 iov 0 0K 16K 78643K 46 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 75K 78643K 1522 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 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 93 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 25K 78643K 451 0 0 sigio 0 0K 0K 78643K 12 0 0 proc 42 30K 46K 78643K 390 0 0 subproc 32 32769K 67586K 78643K 204 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 55 0 0 in_multi 22 1K 2K 78643K 83 0 0 ether_multi 1 0K 0K 78643K 3 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 225 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 72 12K 21K 78643K 1878 0 0 UVM aobj 18 2K 2K 78643K 22 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 15 0 0 NDP 8 0K 0K 78643K 33 0 0 temp 105 2352K 2419K 78643K 4350 0 0 kqueue 0 0K 0K 78643K 5 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 8 0 5 1 0 1 1 0 8 0 inpcbpl 280 252 0 245 1 0 1 1 0 8 0 plimitpl 152 30 0 24 1 0 1 1 0 8 0 rtentry 112 77 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpcb 544 88 0 84 1 0 1 1 0 8 0 nd6 48 12 0 10 1 0 1 1 0 8 0 ppxss 1128 8 0 8 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 351 0 204 12 0 12 12 0 8 0 art_table 32 352 0 204 2 0 2 2 0 8 0 art_node 16 76 0 48 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 3 1 0 1 1 0 8 0 semapl 112 91 0 81 1 0 1 1 0 8 0 shmpl 112 20 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2240 0 811 47 0 47 47 0 8 0 ffsino 240 2240 0 811 85 0 85 85 0 8 0 nchpl 144 3079 0 1439 61 0 61 61 0 8 0 uvmvnodes 72 2390 0 0 44 0 44 44 0 8 0 vnodes 200 2390 0 0 126 0 126 126 0 8 0 namei 1024 8983 0 8983 2 1 1 1 0 8 1 scsiplug 64 2 0 2 1 0 1 1 0 8 1 scxspl 192 9242 0 9242 9 8 1 6 0 8 1 sigapl 432 610 0 598 2 0 2 2 0 8 0 futexpl 56 7708 0 7708 1 0 1 1 0 8 1 knotepl 112 238 0 225 1 0 1 1 0 8 0 kqueuepl 104 137 0 135 1 0 1 1 0 8 0 pipepl 112 422 0 409 4 3 1 2 0 8 0 fdescpl 424 611 0 598 2 0 2 2 0 8 0 filepl 120 3880 0 3808 4 0 4 4 0 8 0 lockfpl 104 174 0 174 2 1 1 1 0 8 1 lockfspl 32 197 0 197 2 1 1 1 0 8 1 sessionpl 112 22 0 13 1 0 1 1 0 8 0 pgrppl 48 24 0 15 1 0 1 1 0 8 0 ucredpl 96 850 0 843 1 0 1 1 0 8 0 zombiepl 144 598 0 598 3 2 1 1 0 8 1 processpl 840 626 0 598 4 0 4 4 0 8 0 procpl 600 1201 0 1166 4 0 4 4 0 8 1 sosppl 128 8 0 8 3 2 1 1 0 8 1 sockpl 384 538 0 521 3 0 3 3 0 8 1 mcl64k 65536 18 0 18 2 1 1 1 0 8 1 mcl16k 16384 5 0 5 2 2 0 1 0 8 0 mcl12k 12288 17 0 17 1 0 1 1 0 8 1 mcl9k 9216 4 0 4 3 2 1 1 0 8 1 mcl8k 8192 8 0 8 1 0 1 1 0 8 1 mcl4k 4096 33 0 33 3 2 1 1 0 8 1 mcl2k2 2112 5 0 5 3 2 1 1 0 8 1 mcl2k 2048 48015 0 47984 9 4 5 9 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 80901 0 80845 10 4 6 7 0 8 0 bufpl 256 6544 0 2056 281 0 281 281 0 8 0 anonpl 16 80597 0 73580 64 12 52 52 0 62 14 amapchunkpl 152 2729 0 2640 10 5 5 9 0 158 0 amappl16 192 3276 0 2823 51 19 32 36 0 8 8 amappl15 184 189 0 185 1 0 1 1 0 8 0 amappl14 176 81 0 80 3 2 1 1 0 8 0 amappl13 168 56 0 52 1 0 1 1 0 8 0 amappl12 160 106 0 101 2 1 1 1 0 8 0 amappl11 152 160 0 149 1 0 1 1 0 8 0 amappl10 144 121 0 119 3 2 1 1 0 8 0 amappl9 136 570 0 567 1 0 1 1 0 8 0 amappl8 128 187 0 171 1 0 1 1 0 8 0 amappl7 120 92 0 87 1 0 1 1 0 8 0 amappl6 112 56 0 45 1 0 1 1 0 8 0 amappl5 104 301 0 289 1 0 1 1 0 8 0 amappl4 96 799 0 775 1 0 1 1 0 8 0 amappl3 88 191 0 185 1 0 1 1 0 8 0 amappl2 80 4455 0 4406 2 0 2 2 0 8 0 amappl1 72 20089 0 19688 25 15 10 19 0 8 0 amappl 72 1445 0 1413 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 21 0 4 1 0 1 1 0 8 0 uaddrrnd 24 611 0 598 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 611 0 598 1 0 1 1 0 8 0 vmmpekpl 168 8575 0 8552 2 0 2 2 0 8 0 vmmpepl 168 72403 0 71074 108 27 81 91 0 357 12 vmsppl 264 610 0 598 3 2 1 2 0 8 0 pdppl 4096 1228 0 1196 6 1 5 6 0 8 0 pvpl 32 246106 0 236082 154 20 134 134 0 265 32 pmappl 192 610 0 598 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 420 0 17 12 0 12 12 0 8 0