panic: malloc: allocation too large, type = 29, size = 13002741572 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *388075 42608 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247fb14) at panic+0x161 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff80002164c7e0,ffff800024b5f058,ffff800024b5f0b0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff800024b5f120) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbf670720b50, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: malloc: allocation too large, type = 29, size = 13002741572 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247fb14) at panic+0x161 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff80002164c7e0,ffff800024b5f058,ffff800024b5f0b0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff800024b5f120) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbf670720b50, count: -6 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800024b5ee40 rbx 0 rdx 0x8b rcx 0x2 rax 0x43 r8 0xffffffff81c693b5 kprintf+0x145 r9 0x1 r10 0x336ed94f7169abcd r11 0x42dd2fd0ee021d56 r12 0 r13 0x307061744 r14 0 r15 0x1 rip 0xffffffff81a08b68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800024b5ee30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=388075 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff80002164d260,0xffff80002164ca90 process=0xffff80002165cbe0 user=0xffff800024b5a000, vmspace=0xfffffd807275a770 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 28933 97744 8181 0 2 0 syz-executor.0 28933 294730 8181 0 2 0x4000000 syz-executor.0 42608 192608 96413 0 2 0 syz-executor.1 *42608 388075 96413 0 7 0x4000000 syz-executor.1 8181 481832 20827 0 3 0x82 nanoslp syz-executor.0 96413 307974 20827 0 3 0x82 nanoslp syz-executor.1 28705 108577 0 0 3 0x14200 acct acct 80499 404386 1 0 3 0x100083 ttyin getty 77422 171689 0 0 3 0x14200 bored sosplice 20827 316 8007 0 3 0x82 thrsleep syz-fuzzer 20827 50239 8007 0 3 0x4000082 thrsleep syz-fuzzer 20827 415686 8007 0 3 0x4000082 thrsleep syz-fuzzer 20827 112000 8007 0 3 0x4000082 kqread syz-fuzzer 20827 439711 8007 0 3 0x4000082 thrsleep syz-fuzzer 20827 155500 8007 0 3 0x4000082 thrsleep syz-fuzzer 8007 116202 57175 0 3 0x10008a sigsusp ksh 57175 37192 64767 0 3 0x9a kqread sshd 64767 92445 1 0 3 0x88 kqread sshd 94695 317468 85689 73 3 0x100090 kqread syslogd 85689 317050 1 0 3 0x100082 netio syslogd 4404 95192 1 0 3 0x100080 kqread resolvd 50395 325677 93700 77 3 0x100092 kqread dhcpleased 81866 134040 93700 77 3 0x100092 kqread dhcpleased 93700 201249 1 0 3 0x80 kqread dhcpleased 60629 8095 0 0 3 0x14200 bored smr 93278 466737 0 0 2 0x14200 zerothread 94185 221473 0 0 3 0x14200 aiodoned aiodoned 60511 490252 0 0 3 0x14200 syncer update 89680 245613 0 0 3 0x14200 cleaner cleaner 81399 377686 0 0 3 0x14200 reaper reaper 10028 393549 0 0 3 0x14200 pgdaemon pagedaemon 23820 214882 0 0 3 0x14200 bored viomb 98030 31014 0 0 3 0x40014200 acpi0 acpi0 80918 352844 0 0 3 0x14200 bored softnet 15133 194686 0 0 3 0x14200 bored systqmp 18613 93145 0 0 3 0x14200 bored systq 55952 2066 0 0 3 0x40014200 bored softclock 68269 363471 0 0 3 0x40014200 idle0 1 483599 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10124 6352K 6935K 78643K 17485 0 pcb 13 18K 20K 78643K 1011 0 rtable 110 12K 14K 78643K 9357 0 ifaddr 55 15K 16K 78643K 1910 0 sysctl 2 0K 0K 78643K 2 0 counters 20 16K 17K 78643K 106 0 ioctlops 0 0K 4K 78643K 3212 0 iov 0 0K 36K 78643K 7720 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1273 80K 80K 78643K 3821 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 32 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 675 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 6 17K 25K 78643K 6331 0 sigio 0 0K 0K 78643K 32 0 proc 59 55K 63K 78643K 1226 0 subproc 26 1K 1K 78643K 396 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 419 0 in_multi 22 1K 2K 78643K 654 0 ether_multi 1 0K 0K 78643K 120 0 mrt 1 0K 0K 78643K 13 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 151 678K 678K 78643K 151 0 exec 0 0K 2K 78643K 4356 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 299 465K 465K 78643K 75972 0 UVM aobj 48 2K 2K 78643K 48 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 285 0 NDP 6 0K 0K 78643K 165 0 temp 85 4198K 4270K 78643K 84541 0 kqueue 12 18K 24K 78643K 174 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 363 0 360 6 5 1 3 0 8 0 rtentry 112 431 0 406 3 1 2 2 0 8 0 unpcb 128 1832 0 1819 16 13 3 5 0 8 2 syncache 296 30 0 30 9 8 1 1 0 8 1 tcpqe 32 8 0 8 2 1 1 1 0 8 1 tcpcb 736 1763 0 1753 72 64 8 13 0 8 7 arp 88 67 0 63 1 0 1 1 0 8 0 ipq 40 20 0 19 5 4 1 1 0 8 0 ipqe 40 78 0 77 5 4 1 1 0 8 0 inpcb 304 5028 0 5021 77 69 8 14 0 8 7 rttmr 72 3 0 3 1 1 0 1 0 8 0 nd6 48 107 0 104 1 0 1 1 0 8 0 pkpcb 40 149 0 149 5 5 0 2 0 8 0 kcovpl 48 30 0 28 1 0 1 1 0 8 0 ppxss 1152 12 0 12 4 4 0 1 0 8 0 pfrktable 1344 3954 0 3937 3 1 2 2 0 8 0 pftag 88 226 0 223 4 3 1 1 0 8 0 pfstkey 112 6 0 6 1 1 0 1 0 8 0 pfstate 320 3 0 3 1 1 0 1 0 8 0 pfrule 1360 2372 0 2294 10 3 7 7 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1853 0 1716 23 11 12 14 0 8 3 art_table 32 1854 0 1716 2 0 2 2 0 8 0 art_node 16 426 0 406 1 0 1 1 0 8 0 semupl 112 7 0 7 1 1 0 1 0 8 0 semapl 112 669 0 659 1 0 1 1 0 8 0 shmpl 112 45 0 0 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 9832 0 8414 89 0 89 89 0 8 0 ffsino 240 9832 0 8414 84 0 84 84 0 8 0 nchpl 144 21390 0 19798 60 0 60 60 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 70802 0 70802 1 0 1 1 0 8 1 vcpupl 1984 126 0 0 16 0 16 16 0 8 0 vmpool 528 146 0 20 10 1 9 9 0 8 0 pfiaddrpl 120 5814 0 5735 3 0 3 3 0 8 0 scsiplug 72 6 0 6 1 1 0 1 0 8 0 scxspl 216 56621 0 56621 20 19 1 8 0 8 1 plimitpl 152 631 0 623 1 0 1 1 0 8 0 sigapl 424 6472 0 6440 4 0 4 4 0 8 0 futexpl 64 78403 0 78403 1 0 1 1 0 8 1 knotepl 112 55870 0 55827 2 0 2 2 0 8 0 kqueuepl 184 1162 0 1150 24 23 1 7 0 8 0 pipepl 304 879 0 869 25 24 1 6 0 8 0 fdescpl 432 6455 0 6438 3 1 2 3 0 8 0 filepl 120 45161 0 45060 50 42 8 10 0 8 4 lockfpl 104 1285 0 1283 2 1 1 2 0 8 0 lockfspl 48 327 0 325 1 0 1 1 0 8 0 sessionpl 144 46 0 36 1 0 1 1 0 8 0 pgrppl 48 51 0 41 1 0 1 1 0 8 0 ucredpl 96 4139 0 4129 1 0 1 1 0 8 0 zombiepl 144 6440 0 6440 1 0 1 1 0 8 1 processpl 1000 6472 0 6440 6 1 5 5 0 8 0 procpl 672 15416 0 15377 17 12 5 5 0 8 1 sosppl 168 17 0 17 5 4 1 1 0 8 1 sockpl 448 7372 0 7349 118 108 10 21 0 8 7 mcl64k 65536 1693 0 1693 8 7 1 1 0 8 1 mcl16k 16384 110 0 110 9 9 0 1 0 8 0 mcl12k 12288 162 0 162 10 10 0 1 0 8 0 mcl9k 9216 69 0 69 14 13 1 1 0 8 1 mcl8k 8192 403 0 403 6 5 1 1 0 8 1 mcl4k 4096 493 0 493 4 3 1 1 0 8 1 mcl2k2 2112 45 0 45 14 14 0 1 0 8 0 mcl2k 2048 99233 0 99198 22 16 6 10 0 8 1 mtagpl 96 956 0 956 20 18 2 7 0 8 2 mbufpl 256 240338 0 240165 579 560 19 288 0 8 5 bufpl 280 15551 0 9152 458 0 458 458 0 8 0 anonpl 24 1730337 0 1715200 151 41 110 130 0 188 0 amapchunkpl 152 189034 0 188474 83 59 24 36 0 158 2 amappl16 200 15788 0 15084 70 32 38 50 0 8 0 amappl15 192 1783 0 1778 1 0 1 1 0 8 0 amappl14 184 1904 0 1903 1 0 1 1 0 8 0 amappl13 176 357 0 354 1 0 1 1 0 8 0 amappl12 168 692 0 690 1 0 1 1 0 8 0 amappl11 160 1083 0 1069 1 0 1 1 0 8 0 amappl10 152 455 0 453 1 0 1 1 0 8 0 amappl9 144 402 0 400 1 0 1 1 0 8 0 amappl8 136 1801 0 1753 3 1 2 2 0 8 0 amappl7 128 1169 0 1163 1 0 1 1 0 8 0 amappl6 120 341 0 331 1 0 1 1 0 8 0 amappl5 112 6198 0 6178 1 0 1 1 0 8 0 amappl4 104 3658 0 3628 1 0 1 1 0 8 0 amappl3 96 1219 0 1203 1 0 1 1 0 8 0 amappl2 88 7604 0 7552 2 0 2 2 0 8 0 amappl1 80 108776 0 108357 13 4 9 12 0 8 0 amappl 88 75128 0 74950 6 1 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 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 47 0 0 1 0 1 1 0 8 0 uaddrrnd 24 6601 0 6458 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 6601 0 6458 1 0 1 1 0 8 0 vmmpekpl 168 41476 0 41439 2 0 2 2 0 8 0 vmmpepl 168 589330 0 587065 266 138 128 128 0 357 29 vmsppl 272 6600 0 6458 10 0 10 10 0 8 0 rwobjpl 24 133466 0 132017 15 6 9 11 0 8 0 pdppl 4096 13208 0 13042 189 23 166 166 0 8 0 pvpl 32 2964318 0 2946327 243 74 169 201 0 265 0 pmappl 192 6600 0 6458 8 0 8 8 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 1231 0 811 20 7 13 17 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247fb14) at panic+0x161 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff80002164c7e0,ffff800024b5f058,ffff800024b5f0b0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff800024b5f120) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbf670720b50, count: -6 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247fb14) at panic+0x161 sys/kern/subr_prf.c:202 malloc(307061744,1d,1) at malloc+0xa34 sys/kern/kern_malloc.c:345 sys_shmat(ffff80002164c7e0,ffff800024b5f058,ffff800024b5f0b0) at sys_shmat+0x7f sys/kern/sysv_shm.c:228 syscall(ffff800024b5f120) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbf670720b50, count: -6