panic: m_copym0: m == NULL and not COPYALL Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 510710 23645 0 0x2 0x4000000 1K syz-fuzzer * 91914 60870 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82437b05) at panic+0x15c sys/kern/subr_prf.c:207 m_copym(fffffd806462c500,22c,580,2) at m_copym+0x5b9 sys/kern/uipc_mbuf.c:664 tcp_output(ffff800000ada760) at tcp_output+0x15ba sys/netinet/tcp_output.c:673 tcp_usrreq(fffffd806eaa34b8,9,fffffd806462c400,0,0,ffff800020e41d50) at tcp_usrreq+0xa55 sosend(fffffd806eaa34b8,0,ffff800020e63208,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e41d50,4,ffff800020e63208,0,ffff800020e632f0) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e41d50,ffff800020e632a0,ffff800020e632f0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e63370) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e63370) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde3d0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic m_copym0: m == NULL and not COPYALL ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82437b05) at panic+0x15c sys/kern/subr_prf.c:207 m_copym(fffffd806462c500,22c,580,2) at m_copym+0x5b9 sys/kern/uipc_mbuf.c:664 tcp_output(ffff800000ada760) at tcp_output+0x15ba sys/netinet/tcp_output.c:673 tcp_usrreq(fffffd806eaa34b8,9,fffffd806462c400,0,0,ffff800020e41d50) at tcp_usrreq+0xa55 sosend(fffffd806eaa34b8,0,ffff800020e63208,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e41d50,4,ffff800020e63208,0,ffff800020e632f0) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e41d50,ffff800020e632a0,ffff800020e632f0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e63370) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e63370) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde3d0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020e62cd0 rbx 0xffff800020e62d80 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff8151256f kprintf+0x16f r9 0x1 r10 0x2 r11 0xe44f1df453e473d1 r12 0x3000000008 r13 0xffff800020e62ce0 r14 0x100 r15 0x1 rip 0xffffffff81f0cec8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020e62cc0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (sshd) pid=91914 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020e404f0,0xffff800020e40770 process=0xffff800020e39350 user=0xffff800020e5e000, vmspace=0xfffffd806e8f5178 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 50411 460850 23645 0 3 0x82 piperd syz-executor.1 87356 79649 0 0 3 0x14200 bored sosplice 99906 60758 0 0 3 0x14280 nfsidl nfsio 4677 286753 0 0 3 0x14280 nfsidl nfsio 42152 40940 0 0 3 0x14280 nfsidl nfsio 8910 497061 0 0 3 0x14280 nfsidl nfsio 1094 451960 0 0 3 0x14280 nfsidl nfsio 40634 438948 0 0 3 0x14280 nfsidl nfsio 59467 9457 0 0 3 0x14280 nfsidl nfsio 61127 355151 0 0 3 0x14280 nfsidl nfsio 18742 345120 0 0 3 0x14280 nfsidl nfsio 42738 248721 0 0 3 0x14280 nfsidl nfsio 52145 178251 0 0 3 0x14280 nfsidl nfsio 38036 452768 0 0 3 0x14280 nfsidl nfsio 61321 198022 0 0 3 0x14280 nfsidl nfsio 85055 513718 0 0 3 0x14280 nfsidl nfsio 90050 347346 0 0 3 0x14280 nfsidl nfsio 36820 292016 0 0 3 0x14280 nfsidl nfsio 18344 271791 0 0 3 0x14280 nfsidl nfsio 58632 474484 0 0 3 0x14280 nfsidl nfsio 24995 388960 0 0 3 0x14280 nfsidl nfsio 74048 83553 0 0 3 0x14280 nfsidl nfsio 73140 44102 23645 0 2 0x2 syz-executor.0 23645 126522 8385 0 3 0x82 thrsleep syz-fuzzer 23645 141139 8385 0 3 0x4000082 nanosleep syz-fuzzer 23645 415274 8385 0 3 0x4000082 thrsleep syz-fuzzer 23645 510710 8385 0 7 0x4000002 syz-fuzzer 23645 66632 8385 0 3 0x4000082 thrsleep syz-fuzzer 23645 207586 8385 0 3 0x4000082 thrsleep syz-fuzzer 23645 489351 8385 0 3 0x4000082 thrsleep syz-fuzzer 23645 52002 8385 0 2 0x4000002 syz-fuzzer 23645 372430 8385 0 3 0x4000082 thrsleep syz-fuzzer 23645 219336 8385 0 3 0x4000082 thrsleep syz-fuzzer 8385 39841 60870 0 3 0x10008a pause ksh *60870 91914 24635 0 7 0x12 sshd 80584 442406 1 0 3 0x100083 ttyin getty 24635 135238 1 0 3 0x80 select sshd 12414 297021 96082 74 3 0x100092 bpf pflogd 96082 327422 1 0 3 0x80 netio pflogd 38884 10753 76976 73 3 0x100090 kqread syslogd 76976 291063 1 0 3 0x100082 netio syslogd 68726 59925 1 77 3 0x100090 poll dhclient 85566 213031 1 0 3 0x80 poll dhclient 45122 395460 0 0 3 0x14200 bored smr 61636 498211 0 0 2 0x14200 zerothread 62350 124538 0 0 3 0x14200 aiodoned aiodoned 85527 77552 0 0 3 0x14200 syncer update 84010 438816 0 0 3 0x14200 cleaner cleaner 39635 38323 0 0 3 0x14200 reaper reaper 56444 62929 0 0 3 0x14200 pgdaemon pagedaemon 67680 304750 0 0 3 0x14200 bored crynlk 75743 218582 0 0 3 0x14200 bored crypto 33386 451973 0 0 3 0x40014200 acpi0 acpi0 42644 44268 0 0 3 0x40014200 idle1 50602 509956 0 0 3 0x14200 bored softnet 95144 17869 0 0 3 0x14200 bored systqmp 23127 202482 0 0 3 0x14200 bored systq 6632 11045 0 0 3 0x40014200 bored softclock 5281 30599 0 0 3 0x40014200 idle0 1 65923 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 60870 (sshd) thread 0xffff800020e41d50 (91914) exclusive rwlock netlock r = 0 (0xffffffff8276eb48) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sosend+0x559 sys/kern/uipc_socket.c:543 #3 dofilewritev+0x1b6 sys/kern/sys_generic.c:365 #4 sys_write+0x83 sys/kern/sys_generic.c:285 #5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] #5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 #6 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9520 6424K 7136K 78643K 11669 0 pcb 13 8K 8K 78643K 73 0 rtable 103 13K 13K 78643K 372 0 ifaddr 75 15K 15K 78643K 142 0 counters 43 33K 34K 78643K 65 0 ioctlops 0 0K 4K 78643K 1516 0 iov 0 0K 16K 78643K 37 0 mount 1 1K 1K 78643K 1 0 vnodes 1224 77K 77K 78643K 1510 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 6 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 87 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 4 9K 25K 78643K 356 0 sigio 0 0K 0K 78643K 7 0 proc 62 63K 95K 78643K 504 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 35 0 in_multi 55 3K 3K 78643K 100 0 ether_multi 1 0K 0K 78643K 14 0 mrt 0 0K 0K 78643K 5 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 43 201K 201K 78643K 43 0 exec 0 0K 1K 78643K 236 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 123 39K 39K 78643K 2075 0 UVM aobj 6 2K 2K 78643K 10 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 55 0 NDP 12 0K 0K 78643K 30 0 temp 133 3872K 4110K 78643K 5667 0 kqueue 3 4K 12K 78643K 15 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 9 0 2 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 43 0 41 1 0 1 1 0 8 0 rtentry 112 65 0 28 2 0 2 2 0 8 0 unpcb 120 149 0 139 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 452 0 452 1 1 0 1 0 8 0 tcpcb 544 118 0 114 1 0 1 1 0 8 0 inpcb 296 363 0 354 2 0 2 2 0 8 1 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 11 0 4 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 1 0 1 0 8 0 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 3 0 3 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 pfrktable 1344 6 0 2 1 0 1 1 0 8 0 pfstitem 24 18 0 8 1 0 1 1 0 8 0 pfstkey 112 18 0 8 1 0 1 1 0 8 0 pfstate 328 18 0 8 2 0 2 2 0 8 0 pfrule 1360 25 0 16 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 334 0 140 14 1 13 13 0 8 0 art_table 32 336 0 140 2 0 2 2 0 8 0 art_node 16 64 0 31 1 0 1 1 0 8 0 sysvmsgpl 40 80 0 40 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 85 0 75 1 0 1 1 0 8 0 shmpl 112 8 0 5 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1939 0 537 89 0 89 89 0 8 0 ffsino 272 1939 0 537 96 1 95 95 0 8 0 nchpl 144 2618 0 1021 60 0 60 60 0 8 0 uvmvnodes 72 2225 0 0 41 0 41 41 0 8 0 vnodes 208 2225 0 0 118 0 118 118 0 8 0 namei 1024 7465 0 7465 2 1 1 1 0 8 1 percpumem 16 43 0 11 1 0 1 1 0 8 0 vcpupl 1984 3 0 0 1 0 1 1 0 8 0 vmpool 560 4 0 1 1 0 1 1 0 8 0 pfiaddrpl 120 2 0 0 1 0 1 1 0 8 0 scxspl 192 7663 0 7663 8 7 1 7 0 8 1 plimitpl 152 46 0 38 1 0 1 1 0 8 0 sigapl 424 589 0 538 6 0 6 6 0 8 0 futexpl 56 5582 0 5582 1 0 1 1 0 8 1 knotepl 112 88 0 69 1 0 1 1 0 8 0 kqueuepl 144 74 0 71 1 0 1 1 0 8 0 pipelkpl 48 119 0 109 1 0 1 1 0 8 0 pipepl 120 238 0 219 1 0 1 1 0 8 0 fdescpl 496 553 0 538 3 0 3 3 0 8 0 filepl 152 3203 0 3103 6 1 5 5 0 8 1 lockfpl 104 46 0 45 1 0 1 1 0 8 0 lockfspl 48 19 0 18 1 0 1 1 0 8 0 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 244 0 235 1 0 1 1 0 8 0 zombiepl 144 538 0 538 2 1 1 1 0 8 1 processpl 984 589 0 538 8 1 7 7 0 8 0 procpl 624 1274 0 1214 6 0 6 6 0 8 1 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 400 556 0 537 4 1 3 3 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 199 0 0 24 0 24 24 0 8 0 mtagpl 96 151 0 0 4 0 4 4 0 8 0 mbufpl 256 485 0 0 30 1 29 29 0 8 0 bufpl 280 3909 0 131 270 0 270 270 0 8 0 anonpl 16 70068 0 55433 84 6 78 83 0 124 8 amapchunkpl 152 3005 0 2861 8 1 7 8 0 158 0 amappl16 192 2820 0 1913 61 12 49 57 0 8 3 amappl15 184 160 0 159 2 1 1 1 0 8 0 amappl14 176 25 0 19 1 0 1 1 0 8 0 amappl13 168 44 0 40 1 0 1 1 0 8 0 amappl12 160 4 0 4 1 1 0 1 0 8 0 amappl11 152 61 0 46 1 0 1 1 0 8 0 amappl10 144 36 0 29 1 0 1 1 0 8 0 amappl9 136 520 0 517 1 0 1 1 0 8 0 amappl8 128 521 0 482 2 0 2 2 0 8 0 amappl7 120 142 0 129 1 0 1 1 0 8 0 amappl6 112 27 0 23 1 0 1 1 0 8 0 amappl5 104 464 0 449 1 0 1 1 0 8 0 amappl4 96 501 0 473 1 0 1 1 0 8 0 amappl3 88 115 0 110 1 0 1 1 0 8 0 amappl2 80 3577 0 3512 2 0 2 2 0 8 0 amappl1 72 21789 0 21362 24 14 10 18 0 8 0 amappl 80 1519 0 1476 2 0 2 2 0 84 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 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 9 0 4 1 0 1 1 0 8 0 uaddrrnd 24 557 0 539 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 557 0 539 1 0 1 1 0 8 0 vmmpekpl 168 7960 0 7920 2 0 2 2 0 8 0 vmmpepl 168 75327 0 73326 146 19 127 127 0 357 30 vmsppl 368 556 0 539 2 0 2 2 0 8 0 pdppl 4096 1121 0 1081 7 1 6 6 0 8 0 pvpl 32 214989 0 197694 197 6 191 196 0 265 29 pmappl 232 556 0 539 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 289 0 9 8 0 8 8 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82437b05) at panic+0x15c sys/kern/subr_prf.c:207 m_copym(fffffd806462c500,22c,580,2) at m_copym+0x5b9 sys/kern/uipc_mbuf.c:664 tcp_output(ffff800000ada760) at tcp_output+0x15ba sys/netinet/tcp_output.c:673 tcp_usrreq(fffffd806eaa34b8,9,fffffd806462c400,0,0,ffff800020e41d50) at tcp_usrreq+0xa55 sosend(fffffd806eaa34b8,0,ffff800020e63208,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e41d50,4,ffff800020e63208,0,ffff800020e632f0) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e41d50,ffff800020e632a0,ffff800020e632f0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e63370) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e63370) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde3d0, count: -10 ddb{0}> machine ddbcpu 1