panic: malloc: allocation too large, type = 2, size = 13612829496 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *100305 63956 0 0x2 0x4000000 0K syz-executor2979 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x16c sys/kern/subr_prf.c:208 malloc(6538aca7d428cf75,656c6966,656c6967) at malloc+0xa20 sys/kern/kern_malloc.c:339 wsmux_getmux(5e804b5ce5bb3fd5) at wsmux_getmux+0x6f sys/dev/wscons/wsmux.c:135 wsmux_do_ioctl(8ddd421ea052d8d1,80085761,fffffd806dc23710,86,fffffd807f7c7b40) a t wsmux_do_ioctl+0x268 VOP_IOCTL(49f38de2f7331eab,80085761,fffffd806fc80688,ffff800020be4718,fffffd806dc23710,ffff800020be4718) at VOP_IOCTL+0x80 sys/kern/vfs_vops.c:290 vn_ioctl(172d85cfb96652ce,fffffd806fc80688,ffff800020be4718,8) at vn_ioctl+0xc5 sys/kern/vfs_vnops.c:512 sys_ioctl(75ca304f7ed6d67d,2,ffff800020be4718) at sys_ioctl+0x652 syscall(63955301028372c1) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(63955301028372c1) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,1606dbbf0b8,0,1606dbbf098,1606dbbf090) at Xsyscall+0x128 end of kernel end trace frame: 0x162b948ee30, 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}> show panic malloc: allocation too large, type = 2, size = 13612829496 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x16c sys/kern/subr_prf.c:208 malloc(6538aca7d428cf75,656c6966,656c6967) at malloc+0xa20 sys/kern/kern_malloc.c:339 wsmux_getmux(5e804b5ce5bb3fd5) at wsmux_getmux+0x6f sys/dev/wscons/wsmux.c:135 wsmux_do_ioctl(8ddd421ea052d8d1,80085761,fffffd806dc23710,86,fffffd807f7c7b40) at wsmux_do_ioctl+0x268 wsmux_add_mux sys/dev/wscons/wsmux.c:563 [inline] wsmux_do_ioctl(8ddd421ea052d8d1,80085761,fffffd806dc23710,86,fffffd807f7c7b40) at wsmux_do_ioctl+0x268 sys/dev/wscons/wsmux.c:424 VOP_IOCTL(49f38de2f7331eab,80085761,fffffd806fc80688,ffff800020be4718,fffffd806dc23710,ffff800020be4718) at VOP_IOCTL+0x80 sys/kern/vfs_vops.c:290 vn_ioctl(172d85cfb96652ce,fffffd806fc80688,ffff800020be4718,8) at vn_ioctl+0xc5 sys/kern/vfs_vnops.c:512sys_ioctl(75ca304f7ed6d67d,2,ffff800020be4718) at sys_ioctl+0x652 syscall(63955301028372c1) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(63955301028372c1) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,1606dbbf0b8,0,1606dbbf098,1606dbbf090) at Xsyscall+0x128 end of kernel end trace frame: 0x162b948ee30, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c04e00 rbx 0xffff800020c04ea0 rdx 0xffffffff81f31836 cy_pio_rec+0x3821 rcx 0x201 rax 0x1 r8 0xffffffff81d43064 kprintf+0x174 r9 0x1 r10 0x6538aca7d478c12e r11 0xaca5505f78bac558 r12 0x3000000008 r13 0xffff800020c04e10 r14 0x100 r15 0x1 rip 0xffffffff81724178 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c04df0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor2979) pid=100305 stat=onproc flags process=2 proc=4000000 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020be5780,0xffff800020be4bd8 process=0xffff800020bca9f0 user=0xffff800020c00000, vmspace=0xfffffd806e9269e0 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 63956 460030 73378 0 3 0x82 nanosleep syz-executor2979 *63956 100305 73378 0 7 0x4000002 syz-executor2979 63956 432896 73378 0 3 0x4000082 fsleep syz-executor2979 73378 360884 64372 0 3 0x10008a pause ksh 64372 424525 70183 0 3 0x92 select sshd 95697 278861 1 0 3 0x100083 ttyin getty 70183 171594 1 0 3 0x80 select sshd 38704 178335 14261 73 3 0x100090 kqread syslogd 14261 317755 1 0 3 0x100082 netio syslogd 56454 412578 1 77 3 0x100090 poll dhclient 99992 199569 1 0 3 0x80 poll dhclient 56927 420099 0 0 3 0x14200 pgzero zerothread 73833 224997 0 0 3 0x14200 aiodoned aiodoned 96224 510251 0 0 3 0x14200 syncer update 66475 226479 0 0 3 0x14200 cleaner cleaner 72679 495396 0 0 3 0x14200 reaper reaper 26874 103011 0 0 3 0x14200 pgdaemon pagedaemon 4668 411060 0 0 3 0x14200 bored crynlk 29851 291210 0 0 3 0x14200 bored crypto 69896 336230 0 0 3 0x40014200 acpi0 acpi0 42747 145831 0 0 7 0x40014200 idle1 1255 268131 0 0 3 0x14200 bored softnet 77953 191332 0 0 3 0x14200 bored systqmp 84701 216568 0 0 3 0x14200 bored systq 72172 175538 0 0 3 0x40014200 bored softclock 88495 502826 0 0 3 0x40014200 idle0 1 354229 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 63956 (syz-executor2979) thread 0xffff800020be4718 (100305) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff822d2378) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9442 6315K 6316K 78643K 10529 0 0 pcb 23 9K 9K 78643K 55 0 0 rtable 61 2K 2K 78643K 115 0 0 ifaddr 21 7K 7K 78643K 21 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 13 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1166 73K 73K 78643K 1172 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 2 0K 0K 78643K 2 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 1 0K 0K 78643K 1 0 0 proc 40 38K 46K 78643K 201 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 in_multi 11 0K 0K 78643K 11 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 18 79K 79K 78643K 18 0 0 exec 0 0K 1K 78643K 149 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 53 10K 10K 78643K 653 0 0 UVM aobj 2 2K 2K 78643K 2 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 3 0K 0K 78643K 3 0 0 temp 30 2343K 2407K 78643K 1689 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 2 0 0 1 0 1 1 0 8 0 inpcbpl 280 22 0 16 1 0 1 1 0 8 0 plimitpl 152 14 0 8 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 syncache 264 5 0 5 1 0 1 1 0 8 1 tcpcb 544 8 0 5 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 96 0 0 6 0 6 6 0 8 0 art_table 32 97 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1383 0 18 45 0 45 45 0 8 0 ffsino 272 1383 0 18 92 0 92 92 0 8 0 nchpl 144 1554 0 30 57 0 57 57 0 8 0 uvmvnodes 72 1392 0 0 26 0 26 26 0 8 0 vnodes 200 1392 0 0 74 0 74 74 0 8 0 namei 1024 3259 0 3259 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 2227 0 2227 2 1 1 2 0 8 1 sigapl 432 173 0 163 2 0 2 2 0 8 0 futexpl 56 2 0 1 1 0 1 1 0 8 0 knotepl 112 5 0 0 1 0 1 1 0 8 0 kqueuepl 104 1 0 0 1 0 1 1 0 8 0 pipepl 112 114 0 107 1 0 1 1 0 8 0 fdescpl 488 174 0 163 2 0 2 2 0 8 0 filepl 152 809 0 765 2 0 2 2 0 8 0 lockfpl 96 8 0 6 2 1 1 1 0 8 0 lockfspl 24 4 0 3 2 1 1 1 0 8 0 sessionpl 112 18 0 9 1 0 1 1 0 8 0 pgrppl 48 18 0 9 1 0 1 1 0 8 0 ucredpl 96 47 0 40 1 0 1 1 0 8 0 zombiepl 144 163 0 163 1 0 1 1 0 8 1 processpl 840 188 0 163 4 0 4 4 0 8 0 procpl 600 190 0 163 3 0 3 3 0 8 0 sockpl 384 64 0 48 2 0 2 2 0 8 0 mcl4k 4096 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 56 0 0 7 0 7 7 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 76 0 0 5 0 5 5 0 8 0 bufpl 256 2012 0 261 110 0 110 110 0 8 0 anonpl 16 16701 0 15567 6 1 5 6 0 125 0 amapchunkpl 152 489 0 450 2 0 2 2 0 158 0 amappl16 192 67 0 62 1 0 1 1 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 1 0 1 1 1 0 1 0 8 0 amappl13 168 16 0 13 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 0 1 1 0 8 1 amappl11 152 174 0 165 1 0 1 1 0 8 0 amappl10 144 48 0 47 1 0 1 1 0 8 0 amappl9 136 217 0 216 1 0 1 1 0 8 0 amappl8 128 101 0 94 1 0 1 1 0 8 0 amappl7 120 31 0 27 1 0 1 1 0 8 0 amappl6 112 43 0 39 1 0 1 1 0 8 0 amappl5 104 124 0 112 1 0 1 1 0 8 0 amappl4 96 257 0 237 1 0 1 1 0 8 0 amappl3 88 112 0 106 1 0 1 1 0 8 0 amappl2 80 561 0 519 1 0 1 1 0 8 0 amappl1 72 11462 0 11059 14 4 10 14 0 8 0 amappl 72 365 0 344 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 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 174 0 163 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 174 0 163 1 0 1 1 0 8 0 vmmpekpl 168 5108 0 5088 1 0 1 1 0 8 0 vmmpepl 168 23182 0 22439 42 9 33 42 0 357 0 vmsppl 360 173 0 163 2 0 2 2 0 8 0 pdppl 4096 355 0 326 5 0 5 5 0 8 0 pvpl 32 69698 0 66900 26 0 26 26 0 265 3 pmappl 224 173 0 163 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 234 0 2 7 0 7 7 0 8 0 ddb{0}>