panic: malloc: allocation too large, type = 2, size = 10370435592 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *155337 3568 0 0 0x4000000 1K syz-executor.0 197952 25584 0 0x14000 0x200 0 reaper 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(26a204a08,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(4d440940) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(4d440940,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8063d9a298,80085761,ffff800020c5b5b0,42,fffffd807f7c6a80,ffff800020b39c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807e1e8268,80085761,ffff800020c5b5b0,ffff800020b39c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b39c38,ffff800020c5b6f8,ffff800020c5b6e0) at sys_ioctl+0x651 syscall(ffff800020c5b790) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5b790) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,29a362ce010) at Xsyscall+0x128 end of kernel end trace frame: 0x29cab5ea690, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic malloc: allocation too large, type = 2, size = 10370435592 ddb{1}> 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(26a204a08,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(4d440940) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(4d440940,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8063d9a298,80085761,ffff800020c5b5b0,42,fffffd807f7c6a80,ffff800020b39c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807e1e8268,80085761,ffff800020c5b5b0,ffff800020b39c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b39c38,ffff800020c5b6f8,ffff800020c5b6e0) at sys_ioctl+0x651 syscall(ffff800020c5b790) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5b790) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,29a362ce010) at Xsyscall+0x128 end of kernel end trace frame: 0x29cab5ea690, count: -10 ddb{1}> show registers rdi 0xffffffff815744d7 db_enter+0x17 rsi 0x1b0a __ALIGN_SIZE+0xb0a rbp 0xffff800020c5b180 rbx 0xffff800020c5b230 rdx 0x1b0b __ALIGN_SIZE+0xb0b rcx 0xffff800000966000 rax 0xffff800000966000 r8 0xffffffff8161baa3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xb1fd1f8b09964c35 r12 0x3000000008 r13 0xffff800020c5b190 r14 0x100 r15 0x1 rip 0xffffffff815744d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c5b170 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=155337 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b399e0,0xffffffff82382238 process=0xffff800020b3a358 user=0xffff800020c56000, vmspace=0xfffffd807effe2d0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 3568 293874 24321 0 2 0 syz-executor.0 * 3568 155337 24321 0 7 0x4000000 syz-executor.0 24321 132976 74285 0 3 0x82 nanosleep syz-executor.0 76915 199206 1 0 3 0x100083 ttyin getty 89169 477037 74285 0 3 0x82 nanosleep syz-executor.1 89575 371852 0 0 3 0x14200 bored sosplice 74285 59904 93071 0 3 0x82 thrsleep syz-fuzzer 74285 188115 93071 0 3 0x4000082 nanosleep syz-fuzzer 74285 376744 93071 0 3 0x4000082 thrsleep syz-fuzzer 74285 322186 93071 0 3 0x4000082 thrsleep syz-fuzzer 74285 280455 93071 0 3 0x4000082 thrsleep syz-fuzzer 74285 288227 93071 0 3 0x4000082 thrsleep syz-fuzzer 74285 379453 93071 0 3 0x4000082 thrsleep syz-fuzzer 74285 183637 93071 0 3 0x4000082 kqread syz-fuzzer 74285 371259 93071 0 3 0x4000082 thrsleep syz-fuzzer 74285 196747 93071 0 3 0x4000082 thrsleep syz-fuzzer 93071 84849 348 0 3 0x10008a pause ksh 348 12048 98907 0 3 0x92 select sshd 98907 443047 1 0 3 0x80 select sshd 17058 83331 82503 74 3 0x100092 bpf pflogd 82503 231178 1 0 3 0x80 netio pflogd 12575 20193 90418 73 3 0x100090 kqread syslogd 90418 203182 1 0 3 0x100082 netio syslogd 98484 493571 1 77 3 0x100090 poll dhclient 9022 12134 1 0 3 0x80 poll dhclient 14488 285382 0 0 3 0x14200 pgzero zerothread 53124 413371 0 0 3 0x14200 aiodoned aiodoned 10301 504752 0 0 3 0x14200 syncer update 69592 273865 0 0 3 0x14200 cleaner cleaner 25584 197952 0 0 7 0x14200 reaper 4036 37691 0 0 3 0x14200 pgdaemon pagedaemon 69236 195119 0 0 3 0x14200 bored crynlk 77733 510260 0 0 3 0x14200 bored crypto 27008 25769 0 0 3 0x40014200 acpi0 acpi0 44857 96139 0 0 3 0x40014200 idle1 10255 43553 0 0 3 0x14200 bored softnet 36535 293648 0 0 3 0x14200 bored systqmp 90266 382505 0 0 3 0x14200 bored systq 40529 427503 0 0 3 0x40014200 bored softclock 54652 265999 0 0 3 0x40014200 idle0 13644 118222 0 0 3 0x14200 bored smr 1 474779 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 0: exclusive mutex &uvm.fpageqlock r = 0 (0xffffffff8237c188) locked @ /syzkaller/managers/multicore/kernel/sys/uvm/uvm_pmemrange.c:1124 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 uvm_pmr_freepages+0x132 sys/uvm/uvm_pmemrange.c:1124 #2 pmap_do_remove+0x6cb sys/arch/amd64/amd64/pmap.c:1800 #3 uvm_map_teardown+0x1a5 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:206 [inline] #3 uvm_map_teardown+0x1a5 sys/uvm/uvm_map.c:2640 #4 uvmspace_free+0x85 sys/uvm/uvm_map.c:3509 #5 uvm_exit+0x29 sys/uvm/uvm_glue.c:297 #6 reaper+0x198 sys/kern/kern_exit.c:431 #7 proc_trampoline+0x1c Process 3568 (syz-executor.0) thread 0xffff800020b39c38 (155337) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9544 6417K 6435K 78643K 11136 0 0 pcb 25 9K 11K 78643K 787 0 0 rtable 100 3K 4K 78643K 632 0 0 ifaddr 65 14K 15K 78643K 238 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1489 0 0 iov 0 0K 16K 78643K 123 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 76K 78643K 1954 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 30 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 209 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 21K 78643K 1181 0 0 sigio 0 0K 0K 78643K 19 0 0 proc 54 51K 71K 78643K 566 0 0 subproc 64 65538K 67586K 78643K 278 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 147 0 0 in_multi 33 2K 2K 78643K 164 0 0 ether_multi 1 0K 0K 78643K 10 0 0 mrt 0 0K 0K 78643K 10 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 342 0 0 pfkey data 0 0K 0K 78643K 2 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 85 20K 29K 78643K 4686 0 0 UVM aobj 68 3K 3K 78643K 75 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 50 0 0 NDP 14 0K 0K 78643K 72 0 0 temp 186 2380K 2446K 78643K 6756 0 0 kqueue 0 0K 0K 78643K 14 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 10 0 6 1 0 1 1 0 8 0 inpcbpl 280 667 0 660 1 0 1 1 0 8 0 plimitpl 152 66 0 58 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 99 0 59 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 6 0 6 1 1 0 1 0 8 0 tcpcb 544 240 0 236 1 0 1 1 0 8 0 rttmr 72 4 0 4 3 3 0 1 0 8 0 nd6 48 16 0 12 1 0 1 1 0 8 0 ppxss 1128 29 0 29 8 7 1 1 0 8 1 pffrag 232 1 0 1 1 1 0 1 0 482 0 pffrnode 88 1 0 1 1 1 0 1 0 8 0 pffrent 40 1 0 1 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 41 0 35 1 0 1 1 0 8 0 pfstkey 112 41 0 35 1 0 1 1 0 8 0 pfstate 328 41 0 35 2 1 1 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 508 0 318 14 2 12 14 0 8 0 art_table 32 509 0 318 2 0 2 2 0 8 0 art_node 16 98 0 64 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 205 0 195 1 0 1 1 0 8 0 shmpl 112 73 0 7 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3511 0 2071 47 0 47 47 0 8 0 ffsino 272 3511 0 2071 97 0 97 97 0 8 0 nchpl 144 5420 0 3762 62 0 62 62 0 8 0 uvmvnodes 72 3810 0 0 70 0 70 70 0 8 0 vnodes 200 3810 0 0 201 0 201 201 0 8 0 namei 1024 16612 0 16612 5 4 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 4 0 4 2 2 0 1 0 8 0 scxspl 192 14624 0 14624 17 16 1 6 0 8 1 sigapl 432 1363 0 1348 2 0 2 2 0 8 0 futexpl 56 14207 0 14207 6 5 1 1 0 8 1 knotepl 112 426 0 407 2 1 1 2 0 8 0 kqueuepl 104 317 0 315 1 0 1 1 0 8 0 pipepl 112 994 0 975 4 3 1 2 0 8 0 fdescpl 488 1364 0 1348 3 0 3 3 0 8 0 filepl 152 8706 0 8606 8 3 5 7 0 8 0 lockfpl 104 383 0 382 7 6 1 1 0 8 0 lockfspl 32 486 0 485 7 6 1 1 0 8 0 sessionpl 112 25 0 14 1 0 1 1 0 8 0 pgrppl 48 47 0 36 1 0 1 1 0 8 0 ucredpl 96 2102 0 2093 1 0 1 1 0 8 0 zombiepl 144 1348 0 1347 5 4 1 1 0 8 0 processpl 840 1380 0 1347 4 0 4 4 0 8 0 procpl 600 3852 0 3809 4 0 4 4 0 8 0 srpgc 64 40 0 40 5 5 0 1 0 8 0 sosppl 128 11 0 11 4 4 0 1 0 8 0 sockpl 384 1350 0 1331 10 7 3 4 0 8 1 mcl64k 65536 410 0 0 49 18 31 34 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 14 0 0 2 0 2 2 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 18 0 0 3 0 3 3 0 8 1 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 151 0 0 15 2 13 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 527 0 0 21 0 21 21 0 8 0 bufpl 256 7899 0 1148 422 0 422 422 0 8 0 anonpl 16 161820 0 153804 101 58 43 54 0 125 3 amapchunkpl 152 8156 0 8066 22 17 5 11 0 158 0 amappl16 192 7746 0 7253 88 58 30 37 0 8 3 amappl15 184 97 0 91 1 0 1 1 0 8 0 amappl14 176 44 0 41 2 1 1 1 0 8 0 amappl13 168 312 0 309 1 0 1 1 0 8 0 amappl12 160 18 0 17 1 0 1 1 0 8 0 amappl11 152 565 0 545 1 0 1 1 0 8 0 amappl10 144 67 0 64 1 0 1 1 0 8 0 amappl9 136 851 0 847 1 0 1 1 0 8 0 amappl8 128 424 0 409 1 0 1 1 0 8 0 amappl7 120 43 0 37 1 0 1 1 0 8 0 amappl6 112 551 0 541 1 0 1 1 0 8 0 amappl5 104 158 0 143 1 0 1 1 0 8 0 amappl4 96 1885 0 1852 2 1 1 2 0 8 0 amappl3 88 177 0 171 1 0 1 1 0 8 0 amappl2 80 10824 0 10760 2 0 2 2 0 8 0 amappl1 72 39458 0 38994 25 15 10 20 0 8 0 amappl 72 4147 0 4109 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 74 0 7 2 0 2 2 0 8 0 uaddrrnd 24 1364 0 1348 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1364 0 1348 1 0 1 1 0 8 0 vmmpekpl 168 15461 0 15436 2 0 2 2 0 8 0 vmmpepl 168 153175 0 151582 139 57 82 83 0 357 11 vmsppl 360 1363 0 1347 2 0 2 2 0 8 0 pdppl 4096 2736 0 2694 6 0 6 6 0 8 0 pvpl 32 436484 0 425262 223 100 123 141 0 265 18 pmappl 224 1363 0 1347 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 643 0 29 18 0 18 18 0 8 0