panic: malloc: allocation too large, type = 29, size = 13002741572 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 314412 97446 0 0 0 0 syz-executor.0 * 30390 95344 60929 0x10 0x4000000 1K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824a0dc5) at panic+0x177 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff800022c917b0,ffff8000246b9f98,ffff8000246b9ff0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff8000246ba060) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000246ba060) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b0204dc3c0, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: malloc: allocation too large, type = 29, size = 13002741572 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824a0dc5) at panic+0x177 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff800022c917b0,ffff8000246b9f98,ffff8000246b9ff0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff8000246ba060) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000246ba060) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b0204dc3c0, count: -6 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000246b9d70 rbx 0xffff800020d39bff rdx 0x8b rcx 0x2 rax 0x43 r8 0xffffffff817eb474 kprintf+0x144 r9 0x1 r10 0xaa508a6dbb5379f8 r11 0x974d400c0dee27ce r12 0xffff800020d39a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81552b08 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000246b9d60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=30390 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800022c902b0,0xffff800022c90800 process=0xffff8000ffff8008 user=0xffff8000246b5000, vmspace=0xfffffd80085822e0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 97446 314412 58849 0 7 0 syz-executor.0 97446 222298 58849 0 2 0x4000000 syz-executor.0 95344 279061 86160 60929 2 0x10 syz-executor.1 *95344 30390 86160 60929 7 0x4000010 syz-executor.1 86160 303871 19282 0 3 0x82 nanoslp syz-executor.1 25630 2174 0 0 3 0x14200 acct acct 58849 428214 19282 0 3 0x82 nanoslp syz-executor.0 99336 182795 0 0 3 0x14200 bored sosplice 19282 504022 56281 0 3 0x82 thrsleep syz-fuzzer 19282 156350 56281 0 3 0x4000082 thrsleep syz-fuzzer 19282 390122 56281 0 3 0x4000082 thrsleep syz-fuzzer 19282 40591 56281 0 3 0x4000082 kqread syz-fuzzer 19282 318716 56281 0 3 0x4000082 thrsleep syz-fuzzer 19282 105451 56281 0 3 0x4000082 thrsleep syz-fuzzer 19282 156797 56281 0 3 0x4000082 thrsleep syz-fuzzer 19282 325727 56281 0 3 0x4000082 thrsleep syz-fuzzer 56281 119513 82507 0 3 0x10008a sigsusp ksh 82507 52957 30111 0 3 0x9a kqread sshd 67288 510815 1 0 3 0x100083 ttyin getty 30111 414854 1 0 3 0x88 kqread sshd 31571 441091 62134 74 3 0x100092 bpf pflogd 62134 309755 1 0 3 0x80 netio pflogd 81860 438539 3353 73 3 0x100090 kqread syslogd 3353 5057 1 0 3 0x100082 netio syslogd 88196 150986 1 0 3 0x100080 kqread resolvd 94644 174601 4778 77 3 0x100092 kqread dhcpleased 77837 391255 4778 77 3 0x100092 kqread dhcpleased 4778 78672 1 0 3 0x80 kqread dhcpleased 47762 299766 0 0 3 0x14200 bored smr 59757 372484 0 0 2 0x14200 zerothread 55232 388521 0 0 3 0x14200 aiodoned aiodoned 24802 33517 0 0 3 0x14200 syncer update 40869 149716 0 0 3 0x14200 cleaner cleaner 4373 388928 0 0 3 0x14200 reaper reaper 25974 326345 0 0 3 0x14200 pgdaemon pagedaemon 91047 493207 0 0 3 0x14200 bored viomb 31820 74234 0 0 3 0x40014200 acpi0 acpi0 42946 117855 0 0 3 0x40014200 idle1 29450 434072 0 0 3 0x14200 bored softnet 71967 505843 0 0 3 0x14200 bored systqmp 92935 393005 0 0 3 0x14200 bored systq 10102 319738 0 0 3 0x40014200 bored softclock 42479 241570 0 0 3 0x40014200 idle0 1 266695 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 95344 (syz-executor.1) thread 0xffff800022c917b0 (30390) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828ba480) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 syscall+0x3ef mi_syscall sys/sys/syscall_mi.h:93 [inline] #1 syscall+0x3ef sys/arch/amd64/amd64/trap.c:585 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10146 6450K 7220K 78643K 24323 0 pcb 13 16K 18K 78643K 795 0 rtable 75 5K 7K 78643K 1482 0 ifaddr 55 14K 16K 78643K 632 0 sysctl 2 0K 0K 78643K 2 0 counters 44 34K 34K 78643K 272 0 ioctlops 0 0K 4K 78643K 2406 0 iov 0 0K 16K 78643K 726 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1326 83K 84K 78643K 4667 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 47 0 VM map 2 1K 1K 78643K 2 0 sem 10 0K 1K 78643K 15 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 6 17K 25K 78643K 7928 0 sigio 0 0K 0K 78643K 24 0 proc 70 87K 99K 78643K 1196 0 subproc 26 1K 1K 78643K 286 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 307 0 in_multi 10 0K 2K 78643K 499 0 ether_multi 1 0K 0K 78643K 54 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 157 705K 705K 78643K 157 0 exec 0 0K 2K 78643K 1313 0 pfkey data 0 0K 0K 78643K 4 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 313 377K 378K 78643K 106872 0 UVM aobj 112 3K 3K 78643K 112 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 312 0 NDP 7 0K 0K 78643K 180 0 temp 95 4216K 4294K 78643K 79502 0 kqueue 12 18K 28K 78643K 210 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 256 0 253 3 2 1 3 0 8 0 rtentry 112 337 0 316 3 1 2 2 0 8 0 unpcb 128 15841 0 15826 121 120 1 7 0 8 0 syncache 296 32 0 32 10 10 0 1 0 8 0 tcpqe 32 20 5 20 3 3 0 1 0 8 0 tcpcb 736 4955 0 4949 158 155 3 20 0 8 2 arp 120 46 0 40 1 0 1 1 0 8 0 inpcb 304 15582 0 15573 206 204 2 12 0 8 1 rttmr 72 3 0 3 1 1 0 1 0 8 0 nd6 48 88 0 87 2 1 1 1 0 8 0 pkpcb 40 16 0 16 5 5 0 1 0 8 0 kcovpl 48 22 0 20 1 0 1 1 0 8 0 ppxss 1248 25 0 25 6 6 0 1 0 8 0 pffrag 232 26 0 26 11 11 0 1 0 482 0 pffrnode 88 26 0 26 11 11 0 1 0 8 0 pffrent 40 414 0 414 12 12 0 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 25 0 19 1 0 1 1 0 8 0 pfstitem 24 13 0 11 1 0 1 1 0 8 0 pfstkey 112 13 0 11 1 0 1 1 0 8 0 pfstate 320 13 0 11 1 0 1 1 0 8 0 pfrule 1360 302 0 282 2 0 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1737 0 1679 29 21 8 16 0 8 0 art_table 32 1738 0 1679 3 1 2 2 0 8 0 art_node 16 335 0 319 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 7 1 0 1 1 0 8 0 semapl 112 8 0 0 1 0 1 1 0 8 0 shmpl 112 109 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 10600 0 9182 89 0 89 89 0 8 0 ffsino 272 10600 0 9182 95 0 95 95 0 8 0 nchpl 144 20309 0 18700 61 0 61 61 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 63691 0 63691 4 3 1 1 0 8 1 percpumem 16 148 0 114 1 0 1 1 0 8 0 vcpupl 2048 25 0 0 4 0 4 4 0 8 0 vmpool 560 27 0 2 2 0 2 2 0 8 0 pfiaddrpl 120 9 0 0 1 0 1 1 0 8 0 scsiplug 72 4 0 4 1 1 0 1 0 8 0 scxspl 216 59178 0 59178 18 17 1 8 0 8 1 plimitpl 152 620 0 611 1 0 1 1 0 8 0 sigapl 424 8119 0 8084 4 0 4 4 0 8 0 futexpl 64 63597 0 63597 3 2 1 1 0 8 1 knotepl 112 139 0 0 3 0 3 3 0 8 0 kqueuepl 216 1950 0 1939 47 42 5 5 0 8 4 pipepl 336 1125 0 1115 52 50 2 7 0 8 1 fdescpl 496 8103 0 8084 3 0 3 3 0 8 0 filepl 152 61337 0 61231 195 185 10 15 0 8 5 lockfpl 104 2191 0 2189 4 3 1 2 0 8 0 lockfspl 48 942 0 940 1 0 1 1 0 8 0 sessionpl 144 38 0 27 1 0 1 1 0 8 0 pgrppl 48 115 0 104 1 0 1 1 0 8 0 ucredpl 96 3973 0 3960 1 0 1 1 0 8 0 zombiepl 144 8084 0 8084 4 3 1 1 0 8 1 processpl 1064 8119 0 8084 3 0 3 3 0 8 0 procpl 672 25725 0 25681 21 16 5 6 0 8 0 srpgc 96 28 0 28 6 6 0 1 0 8 0 sosppl 168 28 0 28 8 7 1 1 0 8 1 sockpl 480 31772 0 31745 727 721 6 37 0 8 2 mcl64k 65536 18 0 0 3 0 3 3 0 8 0 mcl16k 16384 28 0 0 4 2 2 3 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 33 0 0 2 0 2 2 0 8 0 mcl8k 8192 38 0 0 5 3 2 3 0 8 0 mcl4k 4096 33 0 0 3 0 3 3 0 8 0 mcl2k2 2112 14 0 0 1 0 1 1 0 8 0 mcl2k 2048 274 0 0 21 2 19 21 0 8 0 mtagpl 96 583 0 0 10 1 9 9 0 8 0 mbufpl 256 1502 0 0 60 0 60 60 0 8 0 bufpl 280 13873 0 7547 452 0 452 452 0 8 0 anonpl 24 2349298 0 2331691 254 144 110 129 0 186 0 amapchunkpl 152 434971 0 434245 102 73 29 42 0 158 0 amappl16 200 19322 0 18786 104 75 29 41 0 8 0 amappl15 192 295 0 289 1 0 1 1 0 8 0 amappl14 184 15 0 15 4 4 0 1 0 8 0 amappl13 176 176 0 173 1 0 1 1 0 8 0 amappl12 168 1019 0 1018 1 0 1 1 0 8 0 amappl11 160 710 0 691 1 0 1 1 0 8 0 amappl10 152 751 0 747 1 0 1 1 0 8 0 amappl9 144 4367 0 4365 1 0 1 1 0 8 0 amappl8 136 1727 0 1669 3 0 3 3 0 8 0 amappl7 128 1128 0 1117 1 0 1 1 0 8 0 amappl6 120 4270 0 4260 1 0 1 1 0 8 0 amappl5 112 7898 0 7877 1 0 1 1 0 8 0 amappl4 104 2233 0 2204 1 0 1 1 0 8 0 amappl3 96 1687 0 1669 1 0 1 1 0 8 0 amappl2 88 9120 0 9076 12 11 1 2 0 8 0 amappl1 80 147226 0 146771 13 3 10 13 0 8 0 amappl 88 106096 0 105886 6 1 5 6 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 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 64 111 0 0 2 0 2 2 0 8 0 uaddrrnd 24 8130 0 8086 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 8130 0 8086 1 0 1 1 0 8 0 vmmpekpl 168 64077 0 64049 2 0 2 2 0 8 0 vmmpepl 168 755026 0 753078 371 282 89 110 0 357 0 vmsppl 368 8129 0 8086 5 1 4 4 0 8 0 rwobjpl 56 187711 0 186352 42 20 22 23 0 8 0 pdppl 4096 16268 0 16197 105 34 71 72 0 8 0 pvpl 32 3876108 0 3855260 415 242 173 206 0 265 4 pmappl 224 8129 0 8086 3 0 3 3 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 646 0 273 12 0 12 12 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff827e2ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff828ba278) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff828ba278) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x1f end of kernel end trace frame: 0x7f7ffffd90a0, count: 9 ddb{0}> trace x86_ipi_db(ffffffff827e2ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff828ba278) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff828ba278) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x1f end of kernel end trace frame: 0x7f7ffffd90a0, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824a0dc5) at panic+0x177 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff800022c917b0,ffff8000246b9f98,ffff8000246b9ff0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff8000246ba060) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000246ba060) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b0204dc3c0, count: 9 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824a0dc5) at panic+0x177 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff800022c917b0,ffff8000246b9f98,ffff8000246b9ff0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff8000246ba060) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000246ba060) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b0204dc3c0, count: -6