panic: m_copydata: null mbuf Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *351587 22200 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8222531e) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd805c79b200,160,8,fffffd8055579b20) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd805c79b200,160,8,fffffd8055579b20) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd805c79b200,160,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1175 ip6_savecontrol(fffffd805e4d6118,fffffd805c79b200,ffff80001d439690) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1062 rip6_input(ffff80001d4398e8,ffff80001d4398f4,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d4398e8,ffff80001d4398f4,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d4398e8,ffff80001d4398f4,29,0,ffff800000677800) at ip6_input_if+0x1055 ipv6_input(ffff800000677800,fffffd805c79b200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff800000677800,fffffd805c79b200,18) at if_input_local+0x121 sys/net/if.c:781 ip6_output(fffffd805c79ba00,ffff800000a03d00,fffffd805e4d6070,0,0,fffffd805e4d6000) at ip6_output+0xd02 rip6_output(fffffd805c79bf00,fffffd805e4d7900,ffff80001d439c50,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd805e4d7900,9,fffffd805c79bf00,0,0,ffff80001d414780) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd805e4d7900,0,ffff80001d439e98,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:524 end trace frame: 0xffff80001d439e80, count: 0 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 m_copydata: null mbuf ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8222531e) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd805c79b200,160,8,fffffd8055579b20) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd805c79b200,160,8,fffffd8055579b20) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd805c79b200,160,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1175 ip6_savecontrol(fffffd805e4d6118,fffffd805c79b200,ffff80001d439690) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1062 rip6_input(ffff80001d4398e8,ffff80001d4398f4,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d4398e8,ffff80001d4398f4,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d4398e8,ffff80001d4398f4,29,0,ffff800000677800) at ip6_input_if+0x1055 ipv6_input(ffff800000677800,fffffd805c79b200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff800000677800,fffffd805c79b200,18) at if_input_local+0x121 sys/net/if.c:781 ip6_output(fffffd805c79ba00,ffff800000a03d00,fffffd805e4d6070,0,0,fffffd805e4d6000) at ip6_output+0xd02 rip6_output(fffffd805c79bf00,fffffd805e4d7900,ffff80001d439c50,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd805e4d7900,9,fffffd805c79bf00,0,0,ffff80001d414780) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd805e4d7900,0,ffff80001d439e98,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:524 dofilewritev(ffff80001d414780,3,ffff80001d439e98,0,ffff80001d439f80) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff80001d414780,ffff80001d439f38,ffff80001d439f80) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff80001d43a000) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6259c1c3170, count: -18 ddb> show registers rdi 0xffffffff81537307 db_enter+0x17 rsi 0x2310 __ALIGN_SIZE+0x1310 rbp 0xffff80001d439400 rbx 0xffff80001d4394b0 rdx 0x2311 __ALIGN_SIZE+0x1311 rcx 0xffff80001d443000 rax 0xffff80001d443000 r8 0xffff80001d4393c0 r9 0x1 r10 0xffff8000009f1300 r11 0xaaf212a56861866 r12 0x3000000008 r13 0xffff80001d439410 r14 0x100 r15 0x1 rip 0xffffffff81537308 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d4393f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=351587 stat=onproc flags process=0 proc=4000000 pri=78, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff80001d4158c8,0xffffffff8256eef0 process=0xffff8000ffff6378 user=0xffff80001d435000, vmspace=0xfffffd8054e9daa8 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 22200 208523 59714 0 2 0 syz-executor.1 *22200 351587 59714 0 7 0x4000000 syz-executor.1 63268 299989 42972 0 2 0x2 syz-executor.0 59714 309823 42972 0 3 0x82 nanosleep syz-executor.1 42972 271566 47450 0 3 0x82 thrsleep syz-fuzzer 42972 256238 47450 0 3 0x4000082 thrsleep syz-fuzzer 42972 164742 47450 0 3 0x4000082 thrsleep syz-fuzzer 42972 501332 47450 0 3 0x4000082 thrsleep syz-fuzzer 42972 123008 47450 0 3 0x4000082 thrsleep syz-fuzzer 42972 437658 47450 0 3 0x4000082 kqread syz-fuzzer 42972 276036 47450 0 3 0x4000082 thrsleep syz-fuzzer 42972 338682 47450 0 3 0x4000082 thrsleep syz-fuzzer 47450 301514 77775 0 3 0x10008a pause ksh 77775 390429 28195 0 3 0x92 select sshd 11716 472731 1 0 3 0x100083 ttyin getty 28195 141002 1 0 3 0x80 select sshd 58703 167473 16787 73 3 0x100090 kqread syslogd 16787 229543 1 0 3 0x100082 netio syslogd 57381 376513 1 77 3 0x100090 poll dhclient 71710 194829 1 0 3 0x80 poll dhclient 76928 371783 0 0 2 0x14200 zerothread 32211 296107 0 0 3 0x14200 aiodoned aiodoned 19031 490031 0 0 3 0x14200 syncer update 94338 67004 0 0 3 0x14200 cleaner cleaner 85757 152721 0 0 3 0x14200 reaper reaper 58863 17704 0 0 3 0x14200 pgdaemon pagedaemon 17585 291484 0 0 3 0x14200 bored crynlk 52355 51136 0 0 3 0x14200 bored crypto 85707 68115 0 0 3 0x40014200 acpi0 acpi0 95438 332049 0 0 3 0x14200 bored softnet 71614 73695 0 0 3 0x14200 bored systqmp 94751 109298 0 0 3 0x14200 bored systq 40243 291512 0 0 3 0x40014200 bored softclock 46676 481537 0 0 3 0x40014200 idle0 88580 259193 0 0 3 0x14200 bored smr 1 515407 0 0 3 0x82 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 9467 6330K 6779K 78643K 10871 0 pcb 15 8K 8K 78643K 48 0 rtable 90 3K 4K 78643K 254 0 ifaddr 54 12K 12K 78643K 90 0 counters 19 16K 16K 78643K 19 0 ioctlops 0 0K 2K 78643K 25 0 iov 0 0K 16K 78643K 29 0 mount 1 1K 1K 78643K 1 0 vnodes 1220 77K 77K 78643K 1320 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 0K 0K 78643K 2 0 sem 12 1K 1K 78643K 20 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 5 13K 25K 78643K 159 0 sigio 0 0K 0K 78643K 4 0 proc 48 38K 63K 78643K 367 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 10 0 in_multi 56 2K 3K 78643K 69 0 ether_multi 1 0K 0K 78643K 3 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 203 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 115 38K 38K 78643K 1250 0 UVM aobj 9 2K 2K 78643K 9 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 2 0K 0K 78643K 36 0 NDP 7 0K 0K 78643K 18 0 temp 113 3017K 3081K 78643K 11549 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 arp 64 6 0 2 1 0 1 1 0 8 0 rtpcb 80 28 0 26 1 0 1 1 0 8 0 rtentry 112 46 0 11 2 0 2 2 0 8 0 unpcb 120 107 0 99 1 0 1 1 0 8 0 syncache 264 6 0 6 2 1 1 1 0 8 1 tcpqe 32 48 0 48 2 1 1 1 0 8 1 tcpcb 544 75 0 70 1 0 1 1 0 8 0 ipq 40 1 0 1 1 0 1 1 0 8 1 ipqe 40 45 0 45 1 0 1 1 0 8 1 inpcb 280 407 0 398 2 0 2 2 0 8 1 nd6 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 4 0 4 1 1 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 219 0 43 14 0 14 14 0 8 1 art_table 32 221 0 43 2 0 2 2 0 8 0 art_node 16 45 0 13 1 0 1 1 0 8 0 sysvmsgpl 40 24 0 16 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 18 0 8 1 0 1 1 0 8 0 shmpl 112 7 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1602 0 203 46 0 46 46 0 8 0 ffsino 240 1602 0 203 83 0 83 83 0 8 0 nchpl 144 2014 0 404 60 0 60 60 0 8 0 uvmvnodes 72 1726 0 0 32 0 32 32 0 8 0 vnodes 208 1726 0 0 91 0 91 91 0 8 0 namei 1024 5094 0 5094 1 0 1 1 0 8 1 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 528 2 0 0 1 0 1 1 0 8 0 scxspl 192 5837 0 5837 1 0 1 1 0 8 1 plimitpl 152 26 0 19 1 0 1 1 0 8 0 sigapl 432 330 0 317 2 0 2 2 0 8 0 futexpl 56 3557 0 3557 1 0 1 1 0 8 1 knotepl 112 57 0 38 1 0 1 1 0 8 0 kqueuepl 104 9 0 7 1 0 1 1 0 8 0 pipepl 112 190 0 171 2 0 2 2 0 8 1 fdescpl 424 331 0 317 2 0 2 2 0 8 0 filepl 120 2054 0 1957 4 0 4 4 0 8 1 lockfpl 104 45 0 44 1 0 1 1 0 8 0 lockfspl 48 19 0 18 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 123 0 116 1 0 1 1 0 8 0 zombiepl 144 317 0 317 1 0 1 1 0 8 1 processpl 872 345 0 317 4 0 4 4 0 8 0 procpl 632 519 0 483 4 0 4 4 0 8 0 sockpl 384 545 0 526 4 0 4 4 0 8 2 mcl64k 65536 16 0 16 1 0 1 1 0 8 1 mcl12k 12288 6 0 6 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 3 0 3 1 0 1 1 0 8 1 mcl4k 4096 22 0 22 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 68373 0 68328 17 9 8 14 0 8 1 mtagpl 80 16 0 4 2 1 1 1 0 8 0 mbufpl 256 110159 0 110044 19 3 16 16 0 8 7 bufpl 280 6664 0 1326 382 0 382 382 0 8 0 anonpl 16 53020 0 34831 89 0 89 89 0 107 15 amapchunkpl 152 1589 0 1438 10 0 10 10 0 158 3 amappl16 192 1803 0 772 58 0 58 58 0 8 6 amappl15 184 50 0 46 1 0 1 1 0 8 0 amappl14 176 25 0 23 1 0 1 1 0 8 0 amappl13 168 62 0 61 2 1 1 1 0 8 0 amappl12 160 74 0 70 1 0 1 1 0 8 0 amappl11 152 47 0 36 1 0 1 1 0 8 0 amappl10 144 24 0 20 1 0 1 1 0 8 0 amappl9 136 563 0 559 1 0 1 1 0 8 0 amappl8 128 117 0 91 1 0 1 1 0 8 0 amappl7 120 91 0 79 1 0 1 1 0 8 0 amappl6 112 54 0 49 1 0 1 1 0 8 0 amappl5 104 200 0 189 1 0 1 1 0 8 0 amappl4 96 542 0 516 1 0 1 1 0 8 0 amappl3 88 120 0 110 1 0 1 1 0 8 0 amappl2 80 1926 0 1856 3 1 2 3 0 8 0 amappl1 72 15495 0 15080 26 16 10 20 0 8 0 amappl 80 773 0 728 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 8 0 0 1 0 1 1 0 8 0 uaddrrnd 24 333 0 317 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 333 0 317 1 0 1 1 0 8 0 vmmpekpl 168 6161 0 6137 2 0 2 2 0 8 0 vmmpepl 168 47549 0 45422 131 12 119 125 0 357 25 vmsppl 272 332 0 317 2 0 2 2 0 8 0 pdppl 4096 672 0 636 6 1 5 6 0 8 0 pvpl 32 159491 0 138309 202 0 202 202 0 265 30 pmappl 200 332 0 317 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 154 0 16 5 0 5 5 0 8 0