panic: m_copydata: null mbuf Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *130831 96123 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8224e28e) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd8058da6b00,30,8,fffffd805e10f520) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd8058da6b00,30,8,fffffd805e10f520) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd8058da6b00,30,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1169 ip6_savecontrol(fffffd8066c399d8,fffffd8058da6b00,ffff80001d4257e0) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1056 rip6_input(ffff80001d425a38,ffff80001d425a44,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d425a38,ffff80001d425a44,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d425a38,ffff80001d425a44,29,0,ffff80000017a2a8) at ip6_input_if+0xf26 ipv6_input(ffff80000017a2a8,fffffd8058da6b00) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000017a2a8,fffffd8058da6b00,18) at if_input_local+0x121 sys/net/if.c:780 ip6_output(fffffd8058da6200,ffff8000009dd900,fffffd8066c39ea8,0,0,fffffd8066c39e38) at ip6_output+0xd02 rip6_output(fffffd8058da6200,fffffd805db05e18,ffff80001d425da0,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd805db05e18,9,fffffd8058da6200,0,0,ffff80001d339758) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd805db05e18,0,ffff80001d425fe8,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 end trace frame: 0xffff80001d425fd0, 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(ffffffff8224e28e) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd8058da6b00,30,8,fffffd805e10f520) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd8058da6b00,30,8,fffffd805e10f520) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd8058da6b00,30,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1169 ip6_savecontrol(fffffd8066c399d8,fffffd8058da6b00,ffff80001d4257e0) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1056 rip6_input(ffff80001d425a38,ffff80001d425a44,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d425a38,ffff80001d425a44,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d425a38,ffff80001d425a44,29,0,ffff80000017a2a8) at ip6_input_if+0xf26 ipv6_input(ffff80000017a2a8,fffffd8058da6b00) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000017a2a8,fffffd8058da6b00,18) at if_input_local+0x121 sys/net/if.c:780 ip6_output(fffffd8058da6200,ffff8000009dd900,fffffd8066c39ea8,0,0,fffffd8066c39e38) at ip6_output+0xd02 rip6_output(fffffd8058da6200,fffffd805db05e18,ffff80001d425da0,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd805db05e18,9,fffffd8058da6200,0,0,ffff80001d339758) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd805db05e18,0,ffff80001d425fe8,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 dofilewritev(ffff80001d339758,5,ffff80001d425fe8,0,ffff80001d4260d0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d339758,ffff80001d426088,ffff80001d4260d0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d426150) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x728fc43f2b0, count: -18 ddb> show registers rdi 0xffffffff81371d47 db_enter+0x17 rsi 0x1025 __ALIGN_SIZE+0x25 rbp 0xffff80001d425550 rbx 0xffff80001d425600 rdx 0x1026 __ALIGN_SIZE+0x26 rcx 0xffff80001f62f000 rax 0xffff80001f62f000 r8 0xffff80001d425510 r9 0x1 r10 0xffff8000009f8ac0 r11 0xd07b69c1d8424782 r12 0x3000000008 r13 0xffff80001d425560 r14 0x100 r15 0x1 rip 0xffffffff81371d48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d425540 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=130831 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=71, nice=20 forw=0xffffffffffffffff, list=0xffff80001d33a868,0xffffffff825b1558 process=0xffff8000ffffb208 user=0xffff80001d421000, vmspace=0xfffffd806bc0a220 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 96123 319631 68404 0 2 0 syz-executor.0 *96123 130831 68404 0 7 0x4000000 syz-executor.0 61991 388602 0 0 3 0x14200 acct acct 68404 171463 41879 0 3 0x82 nanosleep syz-executor.0 30297 427219 41879 0 2 0x2 syz-executor.1 41879 255472 55425 0 3 0x82 thrsleep syz-fuzzer 41879 386263 55425 0 3 0x4000082 nanosleep syz-fuzzer 41879 123097 55425 0 3 0x4000082 thrsleep syz-fuzzer 41879 168665 55425 0 3 0x4000082 thrsleep syz-fuzzer 41879 238369 55425 0 3 0x4000082 kqread syz-fuzzer 41879 517952 55425 0 3 0x4000082 thrsleep syz-fuzzer 41879 491124 55425 0 3 0x4000082 thrsleep syz-fuzzer 41879 371499 55425 0 3 0x4000082 thrsleep syz-fuzzer 55425 231612 56794 0 3 0x10008a pause ksh 56794 492547 89817 0 3 0x92 select sshd 31851 105822 1 0 3 0x100083 ttyin getty 89817 232560 1 0 3 0x80 select sshd 72087 261163 70550 73 3 0x100090 kqread syslogd 70550 210860 1 0 3 0x100082 netio syslogd 68721 76663 1 77 3 0x100090 poll dhclient 23669 61195 1 0 3 0x80 poll dhclient 30537 17649 0 0 3 0x14200 bored smr 87086 110784 0 0 2 0x14200 zerothread 83979 516652 0 0 3 0x14200 aiodoned aiodoned 78324 494671 0 0 3 0x14200 syncer update 84012 502211 0 0 3 0x14200 cleaner cleaner 72821 315730 0 0 3 0x14200 reaper reaper 29436 377932 0 0 3 0x14200 pgdaemon pagedaemon 20614 47122 0 0 3 0x14200 bored crynlk 33429 386967 0 0 3 0x14200 bored crypto 93291 208424 0 0 3 0x40014200 acpi0 acpi0 12024 7071 0 0 3 0x14200 bored softnet 75151 161541 0 0 3 0x14200 bored systqmp 30906 347768 0 0 3 0x14200 bored systq 35531 313208 0 0 3 0x40014200 bored softclock 52373 383313 0 0 3 0x40014200 idle0 1 488440 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 9487 6338K 6722K 78643K 11032 0 pcb 15 8K 8K 78643K 85 0 rtable 89 3K 4K 78643K 322 0 ifaddr 64 13K 14K 78643K 113 0 counters 21 16K 16K 78643K 29 0 ioctlops 0 0K 2K 78643K 28 0 iov 0 0K 16K 78643K 50 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 1364 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 30 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 5 13K 25K 78643K 285 0 sigio 0 0K 0K 78643K 5 0 proc 51 38K 63K 78643K 411 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 1 0K 0K 78643K 21 0 in_multi 45 2K 3K 78643K 88 0 ether_multi 2 0K 0K 78643K 9 0 mrt 0 0K 0K 78643K 9 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 217 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 93 21K 21K 78643K 1456 0 UVM aobj 18 4K 4K 78643K 20 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 2 0K 0K 78643K 64 0 NDP 10 0K 0K 78643K 23 0 temp 90 3030K 3094K 78643K 8582 0 kqueue 3 4K 8K 78643K 10 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 0 1 0 1 1 0 8 0 rtpcb 80 36 0 34 1 0 1 1 0 8 0 rtentry 112 60 0 27 2 0 2 2 0 8 0 unpcb 120 227 0 219 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpcb 544 122 0 116 1 0 1 1 0 8 0 inpcb 280 344 0 334 2 0 2 2 0 8 1 rttmr 72 4 0 4 1 0 1 1 0 8 1 nd6 48 7 0 3 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 291 0 129 12 0 12 12 0 8 1 art_table 32 292 0 129 2 0 2 2 0 8 0 art_node 16 59 0 31 1 0 1 1 0 8 0 semupl 112 7 0 7 1 1 0 1 0 8 0 semapl 112 28 0 18 1 0 1 1 0 8 0 shmpl 112 18 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1803 0 404 46 0 46 46 0 8 0 ffsino 240 1803 0 404 83 0 83 83 0 8 0 nchpl 144 2558 0 944 60 0 60 60 0 8 0 uvmvnodes 72 1940 0 0 36 0 36 36 0 8 0 vnodes 208 1940 0 0 103 0 103 103 0 8 0 namei 1024 6642 0 6642 1 0 1 1 0 8 1 scxspl 192 7078 0 7078 1 0 1 1 0 8 1 plimitpl 152 47 0 40 1 0 1 1 0 8 0 sigapl 424 472 0 443 4 0 4 4 0 8 0 futexpl 56 5937 0 5937 1 0 1 1 0 8 1 knotepl 112 63 0 44 1 0 1 1 0 8 0 kqueuepl 144 36 0 34 1 0 1 1 0 8 0 pipelkpl 16 128 0 118 1 0 1 1 0 8 0 pipepl 120 256 0 237 1 0 1 1 0 8 0 fdescpl 432 457 0 443 2 0 2 2 0 8 0 filepl 120 3014 0 2915 4 0 4 4 0 8 1 lockfpl 104 85 0 84 1 0 1 1 0 8 0 lockfspl 48 33 0 32 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 290 0 283 1 0 1 1 0 8 0 zombiepl 144 443 0 443 1 0 1 1 0 8 1 processpl 920 472 0 443 4 0 4 4 0 8 0 procpl 624 785 0 748 4 0 4 4 0 8 1 sockpl 400 607 0 587 4 1 3 4 0 8 1 mcl64k 65536 32 0 32 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 5 0 5 2 1 1 1 0 8 1 mcl9k 9216 3 0 3 1 0 1 1 0 8 1 mcl8k 8192 9 0 9 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 61438 0 61395 16 9 7 13 0 8 1 mtagpl 80 22 0 2 2 1 1 1 0 8 0 mbufpl 256 99149 0 98982 17 2 15 15 0 8 3 bufpl 280 4555 0 163 314 0 314 314 0 8 0 anonpl 16 51949 0 38172 64 2 62 62 0 107 0 amapchunkpl 152 1881 0 1754 8 2 6 8 0 158 0 amappl16 192 1998 0 1163 43 0 43 43 0 8 1 amappl15 184 131 0 128 1 0 1 1 0 8 0 amappl14 176 128 0 124 2 1 1 1 0 8 0 amappl13 168 23 0 22 1 0 1 1 0 8 0 amappl12 160 12 0 11 1 0 1 1 0 8 0 amappl11 152 59 0 47 1 0 1 1 0 8 0 amappl10 144 16 0 10 1 0 1 1 0 8 0 amappl9 136 387 0 383 1 0 1 1 0 8 0 amappl8 128 270 0 256 1 0 1 1 0 8 0 amappl7 120 107 0 97 1 0 1 1 0 8 0 amappl6 112 20 0 19 1 0 1 1 0 8 0 amappl5 104 394 0 381 1 0 1 1 0 8 0 amappl4 96 437 0 409 1 0 1 1 0 8 0 amappl3 88 231 0 225 1 0 1 1 0 8 0 amappl2 80 2989 0 2924 3 1 2 3 0 8 0 amappl1 72 17629 0 17218 26 17 9 20 0 8 0 amappl 80 1005 0 965 1 0 1 1 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 19 0 2 1 0 1 1 0 8 0 uaddrrnd 24 457 0 443 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 457 0 443 1 0 1 1 0 8 0 vmmpekpl 168 6915 0 6889 2 0 2 2 0 8 0 vmmpepl 168 60192 0 58303 98 10 88 94 0 357 5 vmsppl 272 456 0 443 2 1 1 2 0 8 0 pdppl 4096 920 0 886 6 1 5 6 0 8 0 pvpl 32 170258 0 153501 150 3 147 150 0 265 0 pmappl 200 456 0 443 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 157 0 17 5 0 5 5 0 8 0