panic: malloc: allocation too large, type = 2, size = 14169088264 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *473311 39290 0 0 0x4000000 0 syz-executor.1 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(34c8b2108,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(69916420) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(69916420,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802c13dea8,80085761,ffff800014a22cb0,2,fffffd803f7c6ae0,ffff8000149fa020) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8037f4cc30,80085761,ffff800014a22cb0,ffff8000149fa020) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149fa020,ffff800014a22df8,ffff800014a22de0) at sys_ioctl+0x638 syscall(ffff800014a22e90) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,915f0797010) at Xsyscall+0x128 end of kernel end trace frame: 0x918dfce1120, 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 = 14169088264 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(34c8b2108,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(69916420) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(69916420,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802c13dea8,80085761,ffff800014a22cb0,2,fffffd803f7c6ae0,ffff8000149fa020) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8037f4cc30,80085761,ffff800014a22cb0,ffff8000149fa020) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149fa020,ffff800014a22df8,ffff800014a22de0) at sys_ioctl+0x638 syscall(ffff800014a22e90) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,915f0797010) at Xsyscall+0x128 end of kernel end trace frame: 0x918dfce1120, count: -10 ddb> show registers rdi 0xffffffff810e7007 db_enter+0x17 rsi 0x1ecb __ALIGN_SIZE+0xecb rbp 0xffff800014a22880 rbx 0xffff800014a22930 rdx 0x1ecc __ALIGN_SIZE+0xecc rcx 0xffff800002772000 rax 0xffff800002772000 r8 0xffff800014a22840 r9 0x1 r10 0xffff8000019441c0 r11 0x480f39de49458c5e r12 0x3000000008 r13 0xffff800014a22890 r14 0x100 r15 0x1 rip 0xffffffff810e7008 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a22870 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=473311 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000149fa728,0xffffffff82254d50 process=0xffff8000ffff69e8 user=0xffff800014a1d000, vmspace=0xfffffd803f013318 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 39290 447006 78057 0 2 0 syz-executor.1 *39290 473311 78057 0 7 0x4000000 syz-executor.1 15024 159087 85394 0 2 0x2 syz-executor.0 78057 148476 85394 0 3 0x82 nanosleep syz-executor.1 46945 267185 1 0 3 0x100083 ttyin getty 31392 263586 0 0 3 0x14200 bored sosplice 85394 41237 59863 0 3 0x82 kqread syz-fuzzer 85394 151284 59863 0 3 0x4000082 thrsleep syz-fuzzer 85394 360454 59863 0 3 0x4000082 thrsleep syz-fuzzer 85394 243764 59863 0 3 0x4000082 thrsleep syz-fuzzer 85394 466398 59863 0 3 0x4000082 thrsleep syz-fuzzer 85394 381714 59863 0 3 0x4000082 thrsleep syz-fuzzer 85394 172825 59863 0 3 0x4000082 thrsleep syz-fuzzer 85394 30351 59863 0 3 0x4000082 thrsleep syz-fuzzer 59863 257401 24278 0 3 0x10008a pause ksh 24278 138074 7321 0 3 0x92 select sshd 7321 511712 1 0 3 0x80 select sshd 66501 274404 63453 73 3 0x100090 kqread syslogd 63453 415284 1 0 3 0x100082 netio syslogd 3005 33063 1 77 3 0x100090 poll dhclient 3366 519067 1 0 3 0x80 poll dhclient 92496 229765 0 0 2 0x14200 zerothread 39401 212323 0 0 3 0x14200 aiodoned aiodoned 47287 184751 0 0 3 0x14200 syncer update 3208 444407 0 0 3 0x14200 cleaner cleaner 14002 402392 0 0 3 0x14200 reaper reaper 39595 294805 0 0 3 0x14200 pgdaemon pagedaemon 65586 95044 0 0 3 0x14200 bored crynlk 36180 471394 0 0 3 0x14200 bored crypto 55071 419082 0 0 3 0x40014200 acpi0 acpi0 51830 237170 0 0 3 0x14200 bored softnet 15375 147998 0 0 3 0x14200 bored systqmp 89544 446886 0 0 3 0x14200 bored systq 26979 485454 0 0 3 0x40014200 bored softclock 53968 147526 0 0 3 0x40014200 idle0 61047 504705 0 0 3 0x14200 bored smr 1 76107 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 9531 6356K 6372K 78643K 12088 0 0 pcb 23 9K 11K 78643K 2109 0 0 rtable 106 4K 4K 78643K 2122 0 0 ifaddr 64 17K 19K 78643K 743 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 95 0 0 iov 0 0K 32K 78643K 582 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1192 75K 75K 78643K 3309 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 59 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 481 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 3918 0 0 sigio 0 0K 0K 78643K 62 0 0 proc 42 30K 46K 78643K 1365 0 0 subproc 64 65538K 67586K 78643K 1167 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 507 0 0 in_multi 33 2K 2K 78643K 564 0 0 ether_multi 1 0K 0K 78643K 28 0 0 mrt 0 0K 0K 78643K 8 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 637 0 0 pfkey data 0 0K 0K 78643K 8 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 86 21K 29K 78643K 10651 0 0 UVM aobj 130 6K 6K 78643K 145 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 179 0 0 NDP 14 0K 0K 78643K 244 0 0 temp 186 2359K 2487K 78643K 15531 0 0 kqueue 0 0K 0K 78643K 43 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 36 0 32 1 0 1 1 0 8 0 inpcbpl 280 2118 0 2111 1 0 1 1 0 8 0 plimitpl 152 172 0 165 1 0 1 1 0 8 0 rtentry 112 343 0 303 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 6 0 6 1 1 0 1 0 8 0 tcpcb 544 758 0 754 1 0 1 1 0 8 0 nd6 48 68 0 64 1 0 1 1 0 8 0 ppxss 1128 107 0 107 27 26 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1552 0 1363 17 5 12 13 0 8 0 art_table 32 1553 0 1363 2 0 2 2 0 8 0 art_node 16 328 0 294 1 0 1 1 0 8 0 sysvmsgpl 40 23 0 8 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 477 0 467 1 0 1 1 0 8 0 shmpl 112 143 0 15 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8036 0 6436 52 0 52 52 0 8 0 ffsino 240 8036 0 6436 95 0 95 95 0 8 0 nchpl 144 13747 0 12000 66 1 65 65 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 44878 0 44877 4 3 1 1 0 8 0 scsiplug 64 15 0 15 11 11 0 1 0 8 0 scxspl 192 49183 0 49183 30 29 1 6 0 8 1 sigapl 432 3994 0 3981 2 0 2 2 0 8 0 futexpl 56 64718 0 64718 2 1 1 1 0 8 1 knotepl 112 1526 0 1507 1 0 1 1 0 8 0 kqueuepl 104 1090 0 1088 1 0 1 1 0 8 0 pipepl 112 2684 0 2665 9 8 1 2 0 8 0 fdescpl 424 3995 0 3981 2 0 2 2 0 8 0 filepl 120 26282 0 26187 7 3 4 5 0 8 1 lockfpl 104 1021 0 1021 12 11 1 1 0 8 1 lockfspl 32 720 0 720 12 11 1 1 0 8 1 sessionpl 112 51 0 41 1 0 1 1 0 8 0 pgrppl 48 103 0 93 1 0 1 1 0 8 0 ucredpl 96 5587 0 5580 1 0 1 1 0 8 0 zombiepl 144 3981 0 3981 3 2 1 1 0 8 1 processpl 840 4010 0 3981 4 0 4 4 0 8 0 procpl 600 9219 0 9182 5 1 4 4 0 8 0 sosppl 128 72 0 72 20 20 0 1 0 8 0 sockpl 384 3919 0 3902 10 7 3 4 0 8 1 mcl64k 65536 1900 0 1900 172 164 8 33 0 8 8 mcl16k 16384 13 0 13 12 11 1 1 0 8 1 mcl12k 12288 89 0 89 28 27 1 1 0 8 1 mcl9k 9216 72 0 72 21 20 1 1 0 8 1 mcl8k 8192 61 0 60 29 28 1 1 0 8 0 mcl4k 4096 192 0 192 24 23 1 1 0 8 1 mcl2k2 2112 35 0 35 22 21 1 1 0 8 1 mcl2k 2048 53645 0 53616 16 11 5 10 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 112673 0 112610 91 83 8 23 0 8 0 bufpl 256 16657 0 10809 366 0 366 366 0 8 0 anonpl 16 474325 0 466586 218 178 40 60 0 62 1 amapchunkpl 152 20008 0 19928 94 89 5 14 0 158 1 amappl16 192 24439 0 23951 265 237 28 47 0 8 2 amappl15 184 519 0 515 1 0 1 1 0 8 0 amappl14 176 639 0 638 3 2 1 1 0 8 0 amappl13 168 98 0 93 1 0 1 1 0 8 0 amappl12 160 901 0 899 2 1 1 1 0 8 0 amappl11 152 689 0 676 1 0 1 1 0 8 0 amappl10 144 875 0 873 3 2 1 1 0 8 0 amappl9 136 1576 0 1571 1 0 1 1 0 8 0 amappl8 128 1126 0 1104 1 0 1 1 0 8 0 amappl7 120 625 0 619 1 0 1 1 0 8 0 amappl6 112 352 0 343 1 0 1 1 0 8 0 amappl5 104 860 0 850 1 0 1 1 0 8 0 amappl4 96 3888 0 3861 2 1 1 2 0 8 0 amappl3 88 1068 0 1063 1 0 1 1 0 8 0 amappl2 80 34104 0 34052 2 0 2 2 0 8 0 amappl1 72 82689 0 82279 24 15 9 19 0 8 0 amappl 72 9724 0 9692 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 144 0 15 3 0 3 3 0 8 0 uaddrrnd 24 3995 0 3981 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3995 0 3981 1 0 1 1 0 8 0 vmmpekpl 168 30276 0 30255 2 0 2 2 0 8 0 vmmpepl 168 430671 0 429248 305 225 80 85 0 357 11 vmsppl 264 3994 0 3981 9 8 1 2 0 8 0 pdppl 4096 7996 0 7962 5 0 5 5 0 8 0 pvpl 32 1329762 0 1318837 500 383 117 222 0 265 17 pmappl 192 3994 0 3981 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 838 0 330 16 0 16 16 0 8 0