panic: malloc: allocation too large, type = 2, size = 402653192 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 84116 21743 0 0 0 0 syz-executor.0 *404592 21743 0 0 0x4000000 1K syz-executor.0 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(18000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(3000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(3000000,ffff800000026f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807dcc7d88,80085761,ffff800020c17d10,2,fffffd807f7c6720,ffff800020b28720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb4e4d0,80085761,ffff800020c17d10,ffff800020b28720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28720,ffff800020c17e58,ffff800020c17e40) at sys_ioctl+0x651 syscall(ffff800020c17ef0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c17ef0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,da345b12010) at Xsyscall+0x128 end of kernel end trace frame: 0xda60689a400, 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 = 402653192 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(18000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(3000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(3000000,ffff800000026f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807dcc7d88,80085761,ffff800020c17d10,2,fffffd807f7c6720,ffff800020b28720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb4e4d0,80085761,ffff800020c17d10,ffff800020b28720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28720,ffff800020c17e58,ffff800020c17e40) at sys_ioctl+0x651 syscall(ffff800020c17ef0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c17ef0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,da345b12010) at Xsyscall+0x128 end of kernel end trace frame: 0xda60689a400, count: -10 ddb{1}> show registers rdi 0xffffffff81d528d7 db_enter+0x17 rsi 0x1a43 __ALIGN_SIZE+0xa43 rbp 0xffff800020c178e0 rbx 0xffff800020c17990 rdx 0x1a44 __ALIGN_SIZE+0xa44 rcx 0xffff800000966000 rax 0xffff800000966000 r8 0xffffffff81b94ad3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x3da564fd4ac98c22 r12 0x3000000008 r13 0xffff800020c178f0 r14 0x100 r15 0x1 rip 0xffffffff81d528d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c178d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=404592 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28018,0xffffffff82377160 process=0xffff800020b7c018 user=0xffff800020c12000, vmspace=0xfffffd807effe5a0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 21743 84116 40693 0 7 0 syz-executor.0 *21743 404592 40693 0 7 0x4000000 syz-executor.0 53587 188433 7653 0 3 0x2 biowait syz-executor.1 49092 113300 0 0 3 0x14200 bored sosplice 40693 342763 7653 0 3 0x82 nanosleep syz-executor.0 7653 366015 53980 0 3 0x82 thrsleep syz-fuzzer 7653 444727 53980 0 3 0x4000082 nanosleep syz-fuzzer 7653 75474 53980 0 3 0x4000082 thrsleep syz-fuzzer 7653 300763 53980 0 3 0x4000082 thrsleep syz-fuzzer 7653 484428 53980 0 3 0x4000082 kqread syz-fuzzer 7653 405993 53980 0 3 0x4000082 thrsleep syz-fuzzer 7653 55168 53980 0 3 0x4000082 thrsleep syz-fuzzer 7653 54063 53980 0 3 0x4000082 thrsleep syz-fuzzer 7653 440791 53980 0 3 0x4000082 thrsleep syz-fuzzer 7653 454512 53980 0 3 0x4000082 nanosleep syz-fuzzer 53980 500072 81750 0 3 0x10008a pause ksh 81750 514493 94308 0 3 0x92 select sshd 55120 124179 1 0 3 0x100083 ttyin getty 94308 439981 1 0 3 0x80 select sshd 72619 426313 71304 74 3 0x100092 bpf pflogd 71304 237592 1 0 3 0x80 netio pflogd 47078 483918 92284 73 3 0x100090 kqread syslogd 92284 220703 1 0 3 0x100082 netio syslogd 57080 161383 1 77 3 0x100090 poll dhclient 97194 295812 1 0 3 0x80 poll dhclient 38823 218413 0 0 3 0x14200 pgzero zerothread 63307 271762 0 0 3 0x14200 aiodoned aiodoned 22638 299255 0 0 3 0x14200 syncer update 23680 82900 0 0 3 0x14200 cleaner cleaner 85823 191869 0 0 3 0x14200 reaper reaper 78224 378718 0 0 3 0x14200 pgdaemon pagedaemon 45448 195590 0 0 3 0x14200 bored crynlk 59081 185856 0 0 3 0x14200 bored crypto 97476 233666 0 0 3 0x40014200 acpi0 acpi0 38445 222757 0 0 3 0x40014200 idle1 7504 324294 0 0 3 0x14200 bored softnet 42693 100096 0 0 3 0x14200 bored systqmp 98442 168713 0 0 3 0x14200 bored systq 52976 325101 0 0 3 0x40014200 bored softclock 13650 174757 0 0 3 0x40014200 idle0 57520 261686 0 0 3 0x14200 bored smr 1 173927 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 21743 (syz-executor.0) thread 0xffff800020b28720 (404592) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823e9b78) 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 Process 53587 (syz-executor.1) thread 0xffff800020b28e28 (188433) exclusive rrwlock inode r = 0 (0xfffffd806ec082b8) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_ihash.c:140 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 ufs_ihashins+0x6d sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x143 sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0x10f sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0x76 sys/kern/vfs_vops.c:449 #8 domkdirat+0x12d sys/kern/vfs_syscalls.c:2881 #9 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8068873a30) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xf5 sys/kern/vfs_lookup.c:387 #6 namei+0x4b2 sys/kern/vfs_lookup.c:224 #7 domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 #8 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9500 26889K 27289K 78643K 10670 0 0 pcb 25 9K 10K 78643K 111 0 0 rtable 100 3K 4K 78643K 266 0 0 ifaddr 46 11K 12K 78643K 86 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1473 0 0 iov 0 0K 12K 78643K 22 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 75K 78643K 1344 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 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 28 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 21K 78643K 245 0 0 proc 53 50K 71K 78643K 370 0 0 subproc 64 65538K 67586K 78643K 102 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 53 0 0 in_multi 33 2K 2K 78643K 68 0 0 ether_multi 1 0K 0K 78643K 3 0 0 mrt 0 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 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 213 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 82 20K 25K 78643K 1558 0 0 UVM aobj 8 2K 2K 78643K 8 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 9 0 0 NDP 8 0K 0K 78643K 23 0 0 temp 117 2368K 2432K 78643K 3835 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 5 0 1 1 0 1 1 0 8 0 inpcbpl 280 150 0 143 1 0 1 1 0 8 0 plimitpl 152 22 0 14 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 50 0 10 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7 0 7 1 1 0 1 0 8 0 tcpcb 544 44 0 40 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 8 0 8 1 0 1 1 0 8 1 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 19 0 3 1 0 1 1 0 8 0 pfstkey 112 19 0 3 1 0 1 1 0 8 0 pfstate 328 19 0 3 2 0 2 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 226 0 41 12 0 12 12 0 8 0 art_table 32 227 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 2 1 0 1 1 0 8 0 semapl 112 26 0 16 1 0 1 1 0 8 0 shmpl 112 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1904 0 491 46 0 46 46 0 8 0 ffsino 272 1904 0 491 95 0 95 95 0 8 0 nchpl 144 2447 0 813 61 0 61 61 0 8 0 uvmvnodes 72 1977 0 0 36 0 36 36 0 8 0 vnodes 200 1977 0 0 105 0 105 105 0 8 0 namei 1024 6448 0 6447 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 6270 0 6269 7 6 1 6 0 8 0 sigapl 432 441 0 426 2 0 2 2 0 8 0 futexpl 56 2368 0 2368 1 0 1 1 0 8 1 knotepl 112 101 0 82 1 0 1 1 0 8 0 kqueuepl 104 57 0 55 1 0 1 1 0 8 0 pipepl 112 224 0 205 2 1 1 1 0 8 0 fdescpl 488 442 0 426 3 0 3 3 0 8 0 filepl 152 2333 0 2233 5 0 5 5 0 8 1 lockfpl 104 41 0 41 2 1 1 1 0 8 1 lockfspl 32 21 0 21 2 1 1 1 0 8 1 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 23 0 12 1 0 1 1 0 8 0 ucredpl 96 300 0 291 1 0 1 1 0 8 0 zombiepl 144 426 0 426 2 1 1 1 0 8 1 processpl 840 458 0 426 4 0 4 4 0 8 0 procpl 600 879 0 837 4 0 4 4 0 8 0 srpgc 64 6 0 6 1 1 0 1 0 8 0 sockpl 384 225 0 206 3 0 3 3 0 8 1 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 144 0 0 8 0 8 8 0 8 0 bufpl 256 6090 0 1143 310 0 310 310 0 8 0 anonpl 16 51979 0 43970 52 6 46 50 0 125 12 amapchunkpl 152 2090 0 2005 10 6 4 10 0 158 0 amappl16 192 1644 0 1222 33 7 26 33 0 8 4 amappl15 184 57 0 53 1 0 1 1 0 8 0 amappl14 176 193 0 186 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 58 0 57 1 0 1 1 0 8 0 amappl11 152 24 0 8 1 0 1 1 0 8 0 amappl10 144 132 0 127 1 0 1 1 0 8 0 amappl9 136 586 0 583 1 0 1 1 0 8 0 amappl8 128 136 0 124 1 0 1 1 0 8 0 amappl7 120 31 0 28 1 0 1 1 0 8 0 amappl6 112 58 0 49 1 0 1 1 0 8 0 amappl5 104 157 0 141 1 0 1 1 0 8 0 amappl4 96 620 0 592 2 1 1 2 0 8 0 amappl3 88 288 0 279 1 0 1 1 0 8 0 amappl2 80 2702 0 2646 2 0 2 2 0 8 0 amappl1 72 18870 0 18430 26 16 10 20 0 8 0 amappl 72 1124 0 1089 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 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 442 0 426 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 442 0 426 1 0 1 1 0 8 0 vmmpekpl 168 7326 0 7304 2 0 2 2 0 8 0 vmmpepl 168 53965 0 52543 91 16 75 77 0 357 12 vmsppl 360 441 0 426 2 0 2 2 0 8 0 pdppl 4096 892 0 852 6 0 6 6 0 8 0 pvpl 32 177489 0 166226 135 8 127 131 0 265 29 pmappl 224 441 0 426 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 460 0 4 14 0 14 14 0 8 0