panic: malloc: allocation too large, type = 31, size = 4294971504 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 334010 99297 60928 0x10 0 1 syz-executor *377963 99297 60928 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83027394) at panic+0x1e5 sys/kern/subr_prf.c:198 malloc(100001070,1f,1) at malloc+0xcf4 sys/kern/kern_malloc.c:330 sys_semop(ffff80002a0f31f0,ffff8000371c2dc0,ffff8000371c2d10) at sys_semop+0x234 sys/kern/sysv_sem.c:564 syscall(ffff8000371c2dc0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff8000371c2dc0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xeaa74baf0, count: 9 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}> set $maxwidth = 0 ddb{0}> show panic *cpu0: malloc: allocation too large, type = 31, size = 4294971504 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83027394) at panic+0x1e5 sys/kern/subr_prf.c:198 malloc(100001070,1f,1) at malloc+0xcf4 sys/kern/kern_malloc.c:330 sys_semop(ffff80002a0f31f0,ffff8000371c2dc0,ffff8000371c2d10) at sys_semop+0x234 sys/kern/sysv_sem.c:564 syscall(ffff8000371c2dc0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff8000371c2dc0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xeaa74baf0, count: -6 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000371c2a30 rbx 0xffffffff83433d87 cpu_info_full_primary+0x2d87 rdx 0xffff8000011e7a40 rcx 0xffff80002a0f31f0 rax 0xffffffff83432ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3c6bfd8fda2183cd r11 0x7226e7279b6db43c r12 0xffffffff83433b88 cpu_info_full_primary+0x2b88 r13 0 r14 0 r15 0x1 rip 0xffffffff8124a355 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000371c2a20 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=377963 pid=99297 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a0f3700,0xffffffff835e2358 process=0xffff800029fe9fc0 user=0xffff8000371bd000, vmspace=0xfffffd806c57cdd8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 99297 334010 38425 60928 7 0x10 syz-executor *99297 377963 38425 60928 7 0x4000010 syz-executor 84338 306890 94647 0 2 0 syz-executor 84338 318779 94647 0 3 0x4000080 fsleep syz-executor 38872 294531 97616 0 2 0 syz-executor 38872 519104 97616 0 3 0x4000080 sbwait syz-executor 59969 180818 55056 0 2 0 syz-executor 59969 426648 55056 0 3 0x4000080 fsleep syz-executor 95463 435711 84980 60929 2 0x10 syz-executor 95463 294710 84980 60929 3 0x4000090 fsleep syz-executor 42622 101724 92499 0 2 0 syz-executor 42622 230158 92499 0 3 0x4000080 fsleep syz-executor 60586 243464 77789 0 2 0 syz-executor 60586 457052 77789 0 3 0x4000080 fsleep syz-executor 38425 42961 66393 0 3 0x82 nanoslp syz-executor 92499 63988 66393 0 3 0x82 nanoslp syz-executor 70077 383874 66393 0 3 0x82 piperd syz-executor 77789 231565 66393 0 2 0x2 syz-executor 97616 84616 66393 0 3 0x82 nanoslp syz-executor 94647 122857 66393 0 3 0x82 nanoslp syz-executor 55056 431606 66393 0 3 0x82 nanoslp syz-executor 84980 131564 66393 0 3 0x82 nanoslp syz-executor 74818 431117 1 0 3 0x100083 ttyin getty 75754 85657 0 0 3 0x14200 bored sosplice 66393 355005 49859 0 2 0x2 syz-executor 49859 268022 42541 0 3 0x10008a sigsusp ksh 42541 57042 97602 0 3 0x98 kqread sshd-session 97602 166621 93067 0 3 0x92 kqread sshd-session 93067 347648 1 0 3 0x88 kqread sshd 33021 392608 93174 74 3 0x1100092 bpf pflogd 93174 329369 1 0 3 0x80 sbwait pflogd 80229 110069 75345 73 2 0x1100010 syslogd 75345 202024 1 0 3 0x100082 sbwait syslogd 91901 218078 1 0 3 0x100080 kqread resolvd 17165 489976 53767 77 3 0x100092 kqread dhcpleased 44347 123938 53767 77 3 0x100092 kqread dhcpleased 53767 323695 1 0 3 0x80 kqread dhcpleased 57337 67695 0 0 3 0x14200 bored smr 86855 54449 0 0 2 0x14200 zerothread 4744 96718 0 0 3 0x14200 aiodoned aiodoned 50476 461447 0 0 3 0x14200 syncer update 66517 211548 0 0 3 0x14200 cleaner cleaner 79530 198712 0 0 3 0x14200 reaper reaper 24991 181333 0 0 3 0x14200 pgdaemon pagedaemon 69619 138440 0 0 3 0x14200 bored viomb 31435 346408 0 0 3 0x40014200 acpi0 acpi0 44068 361847 0 0 3 0x40014200 idle1 39826 494315 0 0 3 0x14200 bored softnet3 49753 494317 0 0 3 0x14200 bored softnet2 57914 451634 0 0 3 0x14200 bored softnet1 43764 261819 0 0 3 0x14200 bored softnet0 35429 31574 0 0 3 0x14200 bored systqmp 47386 44785 0 0 3 0x14200 bored systq 58238 79778 0 0 3 0x14200 tmoslp softclockmp 62997 112016 0 0 3 0x40014200 tmoslp softclock 91303 407126 0 0 3 0x40014200 idle0 1 336944 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 99297 (syz-executor) thread 0xffff80002a0f31f0 (377963) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff835824e8) #0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151 #1 syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:179 [inline] #1 syscall+0xad6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 Process 80229 (syslogd) thread 0xffff8000ffffdbe8 (110069) exclusive rrwlock inode r = 0 (0xfffffd806e49c4e0) #0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151 #1 rw_enter+0x41b sys/kern/kern_rwlock.c:309 #2 rrw_enter+0xbe sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:524 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:564 #5 sys_fsync+0x152 sys/kern/vfs_syscalls.c:2927 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10221 10223K 10429K 166960K 12283 0 pcb 19 18K 20K 166960K 325 0 rtable 208 6K 8K 166960K 1878 0 pf 35 17K 21K 166960K 193 0 ifaddr 39 7K 8K 166960K 245 0 ifgroup 51 2K 2K 166960K 287 0 sysctl 3 0K 0K 166960K 3 0 counters 62 36K 36K 166960K 180 0 ioctlops 0 0K 4K 166960K 1619 0 iov 0 0K 18K 166960K 65 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1489 94K 94K 166960K 2825 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 13 0 VM map 2 1K 1K 166960K 2 0 sem 19 5K 5K 166960K 35 0 dirhash 15 2K 3K 166960K 33 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 17 61K 89K 166960K 1605 0 sigio 0 0K 0K 166960K 22 0 proc 71 91K 128K 166960K 1861 0 subproc 104 6K 6K 166960K 676 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 129 0 in_multi 85 6K 7K 166960K 600 0 ether_multi 1 0K 0K 166960K 4 0 mrt 0 0K 0K 166960K 5 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 259 1155K 1155K 166960K 259 0 exec 0 0K 1K 166960K 1066 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 236 73K 93K 166960K 14041 0 UVM aobj 94 5K 5K 166960K 97 0 pinsyscall 42 84K 104K 166960K 3822 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 42 0 NDP 11 0K 2K 166960K 174 0 temp 62 6820K 7450K 166960K 61533 0 kqueue 15 24K 29K 166960K 165 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 197 0 194 1 0 1 1 0 8 0 rtentry 112 643 0 549 4 1 3 4 0 8 0 unpcb 144 1038 0 1013 15 9 6 6 0 8 4 syncache 336 6 0 6 3 3 0 1 0 8 0 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 808 795 0 790 40 32 8 17 0 8 7 arp 120 116 0 98 1 0 1 1 0 8 0 inpcb 336 2169 0 2155 52 39 13 23 0 8 11 nd6 136 167 0 145 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 kcovpl 48 52 0 44 1 0 1 1 0 8 0 ppxss 1168 5 0 5 3 2 1 1 0 8 1 pfstscr 40 2 0 2 1 1 0 1 0 8 0 pffrag 232 6 0 5 1 0 1 1 0 482 0 pffrnode 88 6 0 5 1 0 1 1 0 8 0 pffrent 40 9 0 8 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 2 0 1 2 1 1 1 0 8 0 pftag 88 2 0 0 1 0 1 1 0 8 0 pfstitem 24 108 0 74 1 0 1 1 0 8 0 pfstkey 128 111 0 77 2 0 2 2 0 8 0 pfstate 376 110 0 76 5 0 5 5 0 8 0 pfrule 1344 29 0 20 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 2518 0 2126 39 12 27 29 0 8 0 art_table 32 2520 0 2126 5 1 4 4 0 8 0 art_node 16 639 0 557 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 7 1 0 1 1 0 8 0 semapl 112 30 0 13 1 0 1 1 0 8 0 shmpl 112 94 0 3 3 0 3 3 0 8 0 dirhash 1024 31 0 12 3 0 3 3 0 8 0 dino2pl 256 3285 0 1687 101 0 101 101 0 8 0 ffsino 272 3285 0 1687 107 0 107 107 0 8 0 nchpl 144 4694 0 2947 65 0 65 65 0 8 0 uvmvnodes 80 4481 0 0 92 0 92 92 0 8 0 vnodes 216 4481 0 0 249 0 249 249 0 8 0 namei 1024 21345 0 21345 4 3 1 2 0 8 1 percpumem 16 104 0 59 1 0 1 1 0 8 0 vcpupl 3904 4 0 0 1 0 1 1 0 8 0 vmpool 696 5 0 1 1 0 1 1 0 8 0 kstatmem 264 140 0 118 2 0 2 2 0 8 0 scsiplug 72 2 0 2 2 1 1 1 0 8 1 scxspl 216 34275 0 34275 15 14 1 8 1 8 1 plimitpl 152 262 0 244 1 0 1 1 0 8 0 sigapl 424 1819 0 1769 9 2 7 7 0 8 0 futexpl 64 14118 0 14113 5 4 1 1 0 8 0 knotepl 120 562 0 0 17 0 17 17 0 8 0 kqueuepl 216 264 0 252 1 0 1 1 0 8 0 pipepl 320 355 0 328 6 3 3 6 0 8 0 fdescpl 496 1798 0 1767 6 1 5 5 0 8 0 filepl 152 11483 0 11215 41 25 16 22 0 8 5 lockfpl 104 302 0 299 1 0 1 1 0 8 0 lockfspl 48 125 0 122 1 0 1 1 0 8 0 sessionpl 144 67 0 58 1 0 1 1 0 8 0 pgrppl 48 203 0 186 1 0 1 1 0 8 0 ucredpl 104 1682 0 1667 1 0 1 1 0 8 0 zombiepl 144 1769 0 1769 1 0 1 1 0 8 1 processpl 1160 1819 0 1769 5 1 4 5 0 8 0 procpl 648 3249 0 3192 8 2 6 7 0 8 0 srpgc 96 14 0 14 4 3 1 1 0 8 1 sosppl 168 1 0 1 1 0 1 1 0 8 1 sockpl 664 3420 0 3378 62 47 15 25 0 8 11 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 230 0 0 29 0 29 29 0 8 0 mtagpl 96 68 0 0 2 0 2 2 0 8 0 mbufpl 256 470 0 0 27 0 27 27 0 8 0 bufpl 280 8345 0 1978 455 0 455 455 0 8 0 anonpl 24 292482 0 288923 60 9 51 53 0 185 12 amapchunkpl 152 44700 0 44209 44 14 30 39 0 158 9 amappl16 200 5551 0 5526 37 35 2 14 0 8 0 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 210 0 198 1 0 1 1 0 8 0 amappl13 176 11 0 11 2 1 1 1 0 8 1 amappl12 168 3146 0 3115 4 2 2 3 0 8 0 amappl11 160 51 0 37 1 0 1 1 0 8 0 amappl10 152 23 0 23 1 1 0 1 0 8 0 amappl9 144 128 0 128 1 1 0 1 0 8 0 amappl8 136 24 0 22 1 0 1 1 0 8 0 amappl7 128 190 0 177 1 0 1 1 0 8 0 amappl6 120 604 0 603 1 0 1 1 0 8 0 amappl5 112 315 0 303 1 0 1 1 0 8 0 amappl4 104 447 0 426 1 0 1 1 0 8 0 amappl3 96 8849 0 8732 5 1 4 4 0 8 0 amappl2 88 1240 0 1175 2 0 2 2 0 8 0 amappl1 80 14823 0 14239 15 1 14 14 0 8 0 amappl 88 13302 0 13132 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 254 0 254 2 2 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 8 0 8 2 2 0 1 0 8 0 dma16 16 19 0 18 1 0 1 1 0 8 0 aobjpl 72 96 0 3 2 0 2 2 0 8 0 uaddrrnd 24 1803 0 1768 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1803 0 1768 1 0 1 1 0 8 0 vmmpekpl 168 16350 0 16289 5 1 4 4 0 8 0 vmmpepl 168 115969 0 114079 115 28 87 96 0 357 1 vmsppl 440 1802 0 1768 7 2 5 5 0 8 0 rwobjpl 56 38865 0 33344 83 5 78 78 0 8 0 pdppl 4096 3613 0 3540 156 81 75 83 0 8 2 pvpl 32 28503 0 0 230 0 230 230 0 265 0 pmappl 248 1802 0 1768 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 573 0 174 12 0 12 12 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83027394) at panic+0x1e5 sys/kern/subr_prf.c:198 malloc(100001070,1f,1) at malloc+0xcf4 sys/kern/kern_malloc.c:330 sys_semop(ffff80002a0f31f0,ffff8000371c2dc0,ffff8000371c2d10) at sys_semop+0x234 sys/kern/sysv_sem.c:564 syscall(ffff8000371c2dc0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff8000371c2dc0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xeaa74baf0, count: -6 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff800029b7bff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x7dc660b3edc0, count: 12