panic: m_copydata: null mbuf Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 510784 41688 0 0 0 0 syz-executor.1 *287347 41688 0 0 0x4000000 1 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd8067b59c00,6f8,8,fffffd8071c67520) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd8067b59c00,6f8,8,fffffd8071c67520) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd8067b59c00,6f8,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1149 ip6_savecontrol(fffffd806f6d3460,fffffd8067b59c00,ffff800021b5cb70) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1036 rip6_input(ffff800021b5cdc8,ffff800021b5cdd4,0,18) at rip6_input+0x7e7 sys/netinet6/raw_ip6.c:225 ip_deliver(ffff800021b5cdc8,ffff800021b5cdd4,0,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800021b5cdc8,ffff800021b5cdd4,29,0,ffff80000066d000) at ip6_input_if+0x17cb ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800021b5cdc8,ffff800021b5cdd4,29,0,ffff80000066d000) at ip6_input_if+0x17cb sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd8067b59c00) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd8067b59c00,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd8070230300,ffff800000b33080,fffffd806f6d3b60,0,0,fffffd806f6d3af0) at ip6_output+0xd26 rip6_output(fffffd8070230300,fffffd8061155ac0,ffff800021b5d130,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd8061155ac0,9,fffffd8070230300,0,0,ffff800020acf8d0) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd8061155ac0,0,ffff800021b5d378,0,0,0) at sosend+0x645 sys/kern/uipc_socket.c:524 end trace frame: 0xffff800021b5d360, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic m_copydata: null mbuf ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd8067b59c00,6f8,8,fffffd8071c67520) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd8067b59c00,6f8,8,fffffd8071c67520) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd8067b59c00,6f8,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1149 ip6_savecontrol(fffffd806f6d3460,fffffd8067b59c00,ffff800021b5cb70) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1036 rip6_input(ffff800021b5cdc8,ffff800021b5cdd4,0,18) at rip6_input+0x7e7 sys/netinet6/raw_ip6.c:225 ip_deliver(ffff800021b5cdc8,ffff800021b5cdd4,0,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800021b5cdc8,ffff800021b5cdd4,29,0,ffff80000066d000) at ip6_input_if+0x17cb ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800021b5cdc8,ffff800021b5cdd4,29,0,ffff80000066d000) at ip6_input_if+0x17cb sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd8067b59c00) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd8067b59c00,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd8070230300,ffff800000b33080,fffffd806f6d3b60,0,0,fffffd806f6d3af0) at ip6_output+0xd26 rip6_output(fffffd8070230300,fffffd8061155ac0,ffff800021b5d130,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd8061155ac0,9,fffffd8070230300,0,0,ffff800020acf8d0) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd8061155ac0,0,ffff800021b5d378,0,0,0) at sosend+0x645 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020acf8d0,3,ffff800021b5d378,0,ffff800021b5d460) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020acf8d0,ffff800021b5d418,ffff800021b5d460) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800021b5d4e0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021b5d4e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,c,0,3,2baa0a0a010) at Xsyscall+0x128 end of kernel end trace frame: 0x2bd5b06c880, count: -18 ddb{1}> show registers rdi 0xffffffff81f89c47 db_enter+0x17 rsi 0x49ed __ALIGN_SIZE+0x39ed rbp 0xffff800021b5c8e0 rbx 0xffff800021b5c990 rdx 0x49ee __ALIGN_SIZE+0x39ee rcx 0xffff800022b52000 rax 0xffff800022b52000 r8 0xffffffff8213953f kprintf+0x16f r9 0x1 r10 0x25 r11 0x7ee3ae87a6bd3cf0 r12 0x3000000008 r13 0xffff800021b5c8f0 r14 0x100 r15 0x1 rip 0xffffffff81f89c48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021b5c8d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=287347 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020acea00,0xffffffff82659070 process=0xffff800020a8a710 user=0xffff800021b58000, vmspace=0xfffffd807f00b5c0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 41688 510784 55000 0 7 0 syz-executor.1 *41688 287347 55000 0 7 0x4000000 syz-executor.1 46859 61885 81895 0 3 0x80 nanosleep syz-executor.0 46859 409465 81895 0 3 0x4000080 netcon syz-executor.0 55000 136965 24171 0 3 0x82 nanosleep syz-executor.1 81895 3580 24171 0 3 0x82 nanosleep syz-executor.0 27808 484056 0 0 3 0x14200 acct acct 64721 394656 0 0 3 0x14200 bored sosplice 24171 400195 30310 0 3 0x82 thrsleep syz-fuzzer 24171 272280 30310 0 3 0x4000082 nanosleep syz-fuzzer 24171 297540 30310 0 3 0x4000082 thrsleep syz-fuzzer 24171 212271 30310 0 3 0x4000082 thrsleep syz-fuzzer 24171 106964 30310 0 3 0x4000082 thrsleep syz-fuzzer 24171 152212 30310 0 3 0x4000082 kqread syz-fuzzer 24171 390200 30310 0 3 0x4000082 thrsleep syz-fuzzer 24171 219033 30310 0 3 0x4000082 thrsleep syz-fuzzer 24171 175739 30310 0 3 0x4000082 thrsleep syz-fuzzer 24171 335273 30310 0 3 0x4000082 thrsleep syz-fuzzer 30310 214449 59558 0 3 0x10008a pause ksh 59558 255742 44087 0 3 0x92 select sshd 86452 22499 1 0 3 0x100083 ttyin getty 44087 178413 1 0 3 0x80 select sshd 33678 349235 91764 74 3 0x100092 bpf pflogd 91764 351730 1 0 3 0x80 netio pflogd 44863 837 13189 73 3 0x100090 kqread syslogd 13189 170883 1 0 3 0x100082 netio syslogd 26647 268299 1 77 3 0x100090 poll dhclient 71921 83709 1 0 3 0x80 poll dhclient 88223 415100 0 0 3 0x14200 pgzero zerothread 22440 307812 0 0 3 0x14200 aiodoned aiodoned 92745 90584 0 0 3 0x14200 syncer update 98468 329212 0 0 3 0x14200 cleaner cleaner 64436 232066 0 0 3 0x14200 reaper reaper 46036 470204 0 0 3 0x14200 pgdaemon pagedaemon 98380 136775 0 0 3 0x14200 bored crynlk 94550 361693 0 0 3 0x14200 bored crypto 98179 143796 0 0 3 0x40014200 acpi0 acpi0 82419 239145 0 0 3 0x40014200 idle1 73032 419606 0 0 3 0x14200 bored softnet 3275 242547 0 0 3 0x14200 bored systqmp 35301 511712 0 0 3 0x14200 bored systq 81655 27516 0 0 3 0x40014200 bored softclock 65377 325739 0 0 3 0x40014200 idle0 94592 196022 0 0 3 0x14200 bored smr 1 492612 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 41688 (syz-executor.1) thread 0xffff800020acf8d0 (287347) exclusive rwlock netlock r = 0 (0xffffffff824b3b78) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sosend+0x51b sys/kern/uipc_socket.c:512 #3 dofilewritev+0x1b7 sys/kern/sys_generic.c:364 #4 sys_write+0x83 sys/kern/sys_generic.c:284 #5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #6 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9601 7221K 7730K 78643K 15687 0 0 pcb 15 8K 8K 78643K 502 0 0 rtable 148 15K 15K 78643K 1513 0 0 ifaddr 94 19K 19K 78643K 515 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1595 0 0 iov 0 0K 28K 78643K 514 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1222 77K 77K 78643K 3153 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 37 0 0 VM map 20 10K 10K 78643K 21 0 0 sem 12 0K 0K 78643K 583 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 2145 0 0 sigio 0 0K 0K 78643K 25 0 0 proc 62 63K 95K 78643K 1251 0 0 subproc 32 2K 2K 78643K 238 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 199 0 0 in_multi 26 1K 2K 78643K 278 0 0 ether_multi 1 0K 0K 78643K 34 0 0 mrt 1 0K 0K 78643K 12 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 616 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 151 122K 124K 78643K 8537 0 0 UVM aobj 130 4K 4K 78643K 132 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 2 0K 1K 78643K 474 0 0 NDP 21 0K 0K 78643K 149 0 0 temp 234 3561K 4201K 78643K 86120 0 0 kqueue 0 0K 0K 78643K 25 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 40 0 35 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 490 0 488 1 0 1 1 0 8 0 rtentry 112 257 0 199 2 0 2 2 0 8 0 unpcb 120 1387 0 1376 1 0 1 1 0 8 0 syncache 264 15 0 15 5 5 0 1 0 8 0 tcpqe 32 53 0 53 2 2 0 1 0 8 0 tcpcb 544 3231 0 3224 13 11 2 4 0 8 1 inpcb 280 5475 0 5464 11 8 3 5 0 8 2 rttmr 72 5 0 4 3 2 1 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 29 0 26 5 4 1 1 0 8 0 pkpcb 40 31 0 31 7 6 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 71 0 71 6 5 1 1 0 8 1 pffrag 232 81 0 81 3 2 1 1 0 482 1 pffrnode 88 78 0 78 3 2 1 1 0 8 1 pffrent 40 2164 0 2164 2 1 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 225 0 144 1 0 1 1 0 8 0 pfstkey 112 226 0 145 3 0 3 3 0 8 0 pfstate 328 226 0 145 8 0 8 8 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 12 0 6 11 4 7 7 0 8 1 art_heap4 256 1096 0 812 34 15 19 19 0 8 0 art_table 32 1108 0 818 4 1 3 3 0 8 0 art_node 16 256 0 206 1 0 1 1 0 8 0 sysvmsgpl 40 61 0 33 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 579 0 569 1 0 1 1 0 8 0 shmpl 112 130 0 2 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4770 0 3362 46 0 46 46 0 8 0 ffsino 272 4770 0 3362 95 0 95 95 0 8 0 nchpl 144 8245 0 7795 60 41 19 60 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 208 5926 0 0 312 0 312 312 0 8 0 namei 1024 27247 0 27247 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 vcpupl 1984 18 0 0 3 0 3 3 0 8 0 vmpool 552 19 0 1 2 0 2 2 0 8 0 scsiplug 64 9 0 9 4 4 0 1 0 8 0 scxspl 192 25799 0 25799 19 18 1 7 0 8 1 plimitpl 152 165 0 157 1 0 1 1 0 8 0 sigapl 432 2307 0 2291 3 1 2 3 0 8 0 futexpl 56 56226 0 56226 1 0 1 1 0 8 1 knotepl 112 889 0 870 4 3 1 3 0 8 0 kqueuepl 104 1190 0 1188 1 0 1 1 0 8 0 pipepl 112 2648 0 2629 7 6 1 2 0 8 0 fdescpl 488 2308 0 2291 3 0 3 3 0 8 0 filepl 152 22823 0 22717 18 12 6 8 0 8 1 lockfpl 104 614 0 613 1 0 1 1 0 8 0 lockfspl 48 227 0 226 1 0 1 1 0 8 0 sessionpl 112 30 0 19 1 0 1 1 0 8 0 pgrppl 48 58 0 47 1 0 1 1 0 8 0 ucredpl 96 2700 0 2691 1 0 1 1 0 8 0 zombiepl 144 2291 0 2291 1 0 1 1 0 8 1 processpl 896 2325 0 2291 4 0 4 4 0 8 0 procpl 632 7087 0 7042 5 0 5 5 0 8 0 srpgc 64 25 0 25 7 7 0 1 0 8 0 sosppl 128 70 0 70 8 7 1 1 0 8 1 sockpl 384 7415 0 7390 21 16 5 10 0 8 2 mcl64k 65536 31 0 0 4 0 4 4 0 8 0 mcl16k 16384 17 0 0 3 0 3 3 0 8 1 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 196 0 0 24 4 20 24 0 8 0 mtagpl 80 35 0 0 1 0 1 1 0 8 0 mbufpl 256 840 0 0 50 0 50 50 0 8 0 bufpl 256 12391 0 5333 442 0 442 442 0 8 0 anonpl 16 290764 0 271067 142 55 87 100 0 124 0 amapchunkpl 152 17676 0 17513 48 37 11 21 0 158 4 amappl16 192 12619 0 11480 122 64 58 69 0 8 0 amappl15 184 436 0 432 3 2 1 1 0 8 0 amappl14 176 145 0 139 1 0 1 1 0 8 0 amappl13 168 20 0 20 3 3 0 1 0 8 0 amappl12 160 36 0 34 1 0 1 1 0 8 0 amappl11 152 970 0 952 1 0 1 1 0 8 0 amappl10 144 174 0 168 1 0 1 1 0 8 0 amappl9 136 1030 0 1026 1 0 1 1 0 8 0 amappl8 128 630 0 592 2 0 2 2 0 8 0 amappl7 120 239 0 229 1 0 1 1 0 8 0 amappl6 112 928 0 916 1 0 1 1 0 8 0 amappl5 104 279 0 265 1 0 1 1 0 8 0 amappl4 96 2603 0 2573 1 0 1 1 0 8 0 amappl3 88 207 0 201 1 0 1 1 0 8 0 amappl2 80 17094 0 17012 3 1 2 3 0 8 0 amappl1 72 62024 0 61575 25 15 10 20 0 8 0 amappl 80 7578 0 7523 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 17 0 17 1 1 0 1 0 8 0 aobjpl 64 131 0 2 3 0 3 3 0 8 0 uaddrrnd 24 2327 0 2291 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2327 0 2291 1 0 1 1 0 8 0 vmmpekpl 168 24867 0 24826 4 2 2 3 0 8 0 vmmpepl 168 299771 0 297347 231 84 147 151 0 357 38 vmsppl 368 2307 0 2291 2 0 2 2 0 8 0 pdppl 4096 4661 0 4602 8 0 8 8 0 8 0 pvpl 32 765749 0 742743 286 87 199 230 0 265 0 pmappl 232 2326 0 2292 4 1 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 700 0 37 19 0 19 19 0 8 0