panic: m_copydata: null mbuf Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *364079 64032 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82254a01) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd806bc22800,30,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1169 ip6_savecontrol(fffffd805e558348,fffffd806bc22800,ffff80001d81d830) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1056 rip6_input(ffff80001d81da88,ffff80001d81da94,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d81da88,ffff80001d81da94,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d81da88,ffff80001d81da94,29,0,ffff80000017a2a8) at ip6_input_if+0xf26 ipv6_input(ffff80000017a2a8,fffffd806bc22800) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000017a2a8,fffffd806bc22800,18) at if_input_local+0x121 sys/net/if.c:780 ip6_output(fffffd806bc22200,ffff800000a0bf80,fffffd805e558c78,0,0,fffffd805e558c08) at ip6_output+0xd02 rip6_output(fffffd806bc22200,fffffd8069add650,ffff80001d81ddf0,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd8069add650,9,fffffd806bc22200,0,0,ffff80001d7a7760) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd8069add650,0,ffff80001d81e038,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 end trace frame: 0xffff80001d81e020, 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(ffffffff82254a01) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd806bc22800,30,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1169 ip6_savecontrol(fffffd805e558348,fffffd806bc22800,ffff80001d81d830) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1056 rip6_input(ffff80001d81da88,ffff80001d81da94,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d81da88,ffff80001d81da94,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d81da88,ffff80001d81da94,29,0,ffff80000017a2a8) at ip6_input_if+0xf26 ipv6_input(ffff80000017a2a8,fffffd806bc22800) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000017a2a8,fffffd806bc22800,18) at if_input_local+0x121 sys/net/if.c:780 ip6_output(fffffd806bc22200,ffff800000a0bf80,fffffd805e558c78,0,0,fffffd805e558c08) at ip6_output+0xd02 rip6_output(fffffd806bc22200,fffffd8069add650,ffff80001d81ddf0,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd8069add650,9,fffffd806bc22200,0,0,ffff80001d7a7760) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd8069add650,0,ffff80001d81e038,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 dofilewritev(ffff80001d7a7760,6,ffff80001d81e038,0,ffff80001d81e120) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d7a7760,ffff80001d81e0d8,ffff80001d81e120) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d81e1a0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9ac45d53140, count: -18 ddb> show registers rdi 0xffffffff81d0a707 db_enter+0x17 rsi 0x13d6 __ALIGN_SIZE+0x3d6 rbp 0xffff80001d81d5a0 rbx 0xffff80001d81d650 rdx 0x13d7 __ALIGN_SIZE+0x3d7 rcx 0xffff80001d827000 rax 0xffff80001d827000 r8 0xffff80001d81d560 r9 0x1 r10 0xffff8000009f98c0 r11 0xb17c90122c77f9fc r12 0x3000000008 r13 0xffff80001d81d5b0 r14 0x100 r15 0x1 rip 0xffffffff81d0a708 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d81d590 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=364079 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=62, nice=20 forw=0xffffffffffffffff, list=0xffff80001d7a7010,0xffffffff825bf5f8 process=0xffff8000ffffae70 user=0xffff80001d819000, vmspace=0xfffffd8057512008 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 64032 198413 59944 0 2 0 syz-executor.1 *64032 364079 59944 0 7 0x4000000 syz-executor.1 6378 10875 98926 0 2 0 syz-executor.0 6378 192866 98926 0 3 0x4000080 pipewr syz-executor.0 98926 169713 67594 0 3 0x82 nanosleep syz-executor.0 59944 514082 67594 0 3 0x82 nanosleep syz-executor.1 67594 173530 71231 0 3 0x82 thrsleep syz-fuzzer 67594 433131 71231 0 3 0x4000082 thrsleep syz-fuzzer 67594 501117 71231 0 3 0x4000082 thrsleep syz-fuzzer 67594 33411 71231 0 3 0x4000082 thrsleep syz-fuzzer 67594 211937 71231 0 3 0x4000082 kqread syz-fuzzer 67594 14569 71231 0 3 0x4000082 thrsleep syz-fuzzer 67594 295290 71231 0 3 0x4000082 thrsleep syz-fuzzer 71231 246898 2349 0 3 0x10008a pause ksh 2349 409627 70874 0 3 0x92 select sshd 84084 11881 1 0 3 0x100083 ttyin getty 70874 4555 1 0 3 0x80 select sshd 48101 429242 51806 73 3 0x100090 kqread syslogd 51806 365973 1 0 3 0x100082 netio syslogd 15597 62547 1 77 3 0x100090 poll dhclient 17234 200314 1 0 3 0x80 poll dhclient 29428 387182 0 0 3 0x14200 bored smr 85391 414207 0 0 2 0x14200 zerothread 20394 372465 0 0 3 0x14200 aiodoned aiodoned 23279 310789 0 0 3 0x14200 syncer update 4295 375365 0 0 3 0x14200 cleaner cleaner 50394 118521 0 0 3 0x14200 reaper reaper 16965 276900 0 0 3 0x14200 pgdaemon pagedaemon 83863 91180 0 0 3 0x14200 bored crynlk 93870 147624 0 0 3 0x14200 bored crypto 14645 113309 0 0 3 0x40014200 acpi0 acpi0 59714 418780 0 0 3 0x14200 bored softnet 75513 55801 0 0 3 0x14200 bored systqmp 53543 471859 0 0 3 0x14200 bored systq 11559 164415 0 0 3 0x40014200 bored softclock 89329 115403 0 0 3 0x40014200 idle0 1 307847 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 9473 6332K 7236K 78643K 10844 0 pcb 16 8K 8K 78643K 86 0 rtable 107 3K 3K 78643K 200 0 ifaddr 58 13K 13K 78643K 61 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 2K 78643K 21 0 iov 0 0K 2K 78643K 14 0 mount 1 1K 1K 78643K 1 0 vnodes 1222 77K 77K 78643K 1289 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 11 0K 0K 78643K 11 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 6 17K 25K 78643K 94 0 proc 49 38K 63K 78643K 365 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 9 0 in_multi 55 3K 3K 78643K 65 0 ether_multi 2 0K 0K 78643K 6 0 mrt 0 0K 0K 78643K 2 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 195 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 128 39K 55K 78643K 1082 0 UVM aobj 4 2K 2K 78643K 4 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 2 0K 0K 78643K 24 0 NDP 8 0K 0K 78643K 12 0 temp 74 3032K 3096K 78643K 2118 0 kqueue 4 6K 6K 78643K 4 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 19 0 17 1 0 1 1 0 8 0 rtentry 112 47 0 2 2 0 2 2 0 8 0 unpcb 120 67 0 59 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 113 0 113 1 0 1 1 0 8 1 tcpcb 544 45 0 39 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 175 0 164 2 0 2 2 0 8 1 rttmr 72 1 0 1 1 0 1 1 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 195 0 0 13 0 13 13 0 8 0 art_table 32 197 0 0 2 0 2 2 0 8 0 art_node 16 46 0 5 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1507 0 110 88 0 88 88 0 8 0 ffsino 240 1507 0 110 83 0 83 83 0 8 0 nchpl 144 1810 0 210 60 0 60 60 0 8 0 uvmvnodes 72 1606 0 0 30 0 30 30 0 8 0 vnodes 208 1606 0 0 85 0 85 85 0 8 0 namei 1024 4538 0 4538 1 0 1 1 0 8 1 vcpupl 1984 1 0 0 1 0 1 1 0 8 0 vmpool 528 2 0 1 1 0 1 1 0 8 0 scxspl 192 4672 0 4672 1 0 1 1 0 8 1 plimitpl 152 18 0 11 1 0 1 1 0 8 0 sigapl 424 280 0 251 4 0 4 4 0 8 0 futexpl 56 1599 0 1599 1 0 1 1 0 8 1 knotepl 112 62 0 42 1 0 1 1 0 8 0 kqueuepl 144 9 0 6 1 0 1 1 0 8 0 pipelkpl 16 75 0 64 1 0 1 1 0 8 0 pipepl 120 150 0 129 1 0 1 1 0 8 0 fdescpl 432 266 0 251 2 0 2 2 0 8 0 filepl 120 1475 0 1373 4 0 4 4 0 8 0 lockfpl 104 116 0 115 1 0 1 1 0 8 0 lockfspl 48 54 0 53 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 31 0 21 1 0 1 1 0 8 0 ucredpl 96 137 0 130 1 0 1 1 0 8 0 zombiepl 144 251 0 251 1 0 1 1 0 8 1 processpl 920 280 0 251 4 0 4 4 0 8 0 procpl 624 357 0 320 4 0 4 4 0 8 1 sockpl 400 263 0 242 4 0 4 4 0 8 1 mcl64k 65536 10 0 10 1 0 1 1 0 8 1 mcl16k 16384 2 0 2 1 0 1 1 0 8 1 mcl12k 12288 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 1 0 1 1 0 8 1 mcl4k 4096 11 0 11 1 0 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 62640 0 62597 19 5 14 18 0 8 8 mtagpl 80 4 0 2 2 1 1 1 0 8 0 mbufpl 256 99800 0 99697 17 1 16 16 0 8 8 bufpl 280 3347 0 127 230 0 230 230 0 8 0 anonpl 16 44940 0 28575 72 1 71 71 0 107 5 amapchunkpl 152 2126 0 1985 20 0 20 20 0 158 14 amappl16 192 1245 0 324 47 0 47 47 0 8 0 amappl15 184 37 0 34 1 0 1 1 0 8 0 amappl14 176 22 0 18 1 0 1 1 0 8 0 amappl13 168 23 0 22 1 0 1 1 0 8 0 amappl12 160 46 0 40 1 0 1 1 0 8 0 amappl11 152 70 0 58 1 0 1 1 0 8 0 amappl10 144 13 0 8 1 0 1 1 0 8 0 amappl9 136 368 0 367 1 0 1 1 0 8 0 amappl8 128 323 0 282 2 0 2 2 0 8 0 amappl7 120 107 0 94 1 0 1 1 0 8 0 amappl6 112 51 0 42 1 0 1 1 0 8 0 amappl5 104 180 0 169 1 0 1 1 0 8 0 amappl4 96 444 0 417 1 0 1 1 0 8 0 amappl3 88 100 0 95 1 0 1 1 0 8 0 amappl2 80 1312 0 1238 2 0 2 2 0 8 0 amappl1 72 14232 0 13802 24 7 17 17 0 8 8 amappl 80 608 0 561 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 268 0 252 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 268 0 252 1 0 1 1 0 8 0 vmmpekpl 168 5909 0 5884 2 0 2 2 0 8 0 vmmpepl 168 39033 0 36919 120 7 113 113 0 357 21 vmsppl 272 267 0 252 2 0 2 2 0 8 0 pdppl 4096 542 0 505 6 0 6 6 0 8 1 pvpl 32 143106 0 123700 170 0 170 170 0 265 12 pmappl 200 267 0 252 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 249 0 8 7 0 7 7 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:398 panic(ffffffff82254a01) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd806bc22800,30,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1169 ip6_savecontrol(fffffd805e558348,fffffd806bc22800,ffff80001d81d830) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1056 rip6_input(ffff80001d81da88,ffff80001d81da94,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d81da88,ffff80001d81da94,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d81da88,ffff80001d81da94,29,0,ffff80000017a2a8) at ip6_input_if+0xf26 ipv6_input(ffff80000017a2a8,fffffd806bc22800) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000017a2a8,fffffd806bc22800,18) at if_input_local+0x121 sys/net/if.c:780 ip6_output(fffffd806bc22200,ffff800000a0bf80,fffffd805e558c78,0,0,fffffd805e558c08) at ip6_output+0xd02 rip6_output(fffffd806bc22200,fffffd8069add650,ffff80001d81ddf0,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd8069add650,9,fffffd806bc22200,0,0,ffff80001d7a7760) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd8069add650,0,ffff80001d81e038,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 dofilewritev(ffff80001d7a7760,6,ffff80001d81e038,0,ffff80001d81e120) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d7a7760,ffff80001d81e0d8,ffff80001d81e120) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d81e1a0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9ac45d53140, count: -18 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82254a01) at panic+0x15c sys/kern/subr_prf.c:207 m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e m_getptr sys/kern/uipc_mbuf.c:1031 [inline] m_copydata(fffffd806bc22800,30,8,fffffd8059b6fe20) at m_copydata+0x17e sys/kern/uipc_mbuf.c:722 ip6_pullexthdr(fffffd806bc22800,30,0) at ip6_pullexthdr+0x16f sys/netinet6/ip6_input.c:1169 ip6_savecontrol(fffffd805e558348,fffffd806bc22800,ffff80001d81d830) at ip6_savecontrol+0x373 sys/netinet6/ip6_input.c:1056 rip6_input(ffff80001d81da88,ffff80001d81da94,0,18) at rip6_input+0x75b sys/netinet6/raw_ip6.c:225 ip_deliver(ffff80001d81da88,ffff80001d81da94,0,18) at ip_deliver+0x2e3 sys/netinet/ip_input.c:668 ip6_input_if(ffff80001d81da88,ffff80001d81da94,29,0,ffff80000017a2a8) at ip6_input_if+0xf26 ipv6_input(ffff80000017a2a8,fffffd806bc22800) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000017a2a8,fffffd806bc22800,18) at if_input_local+0x121 sys/net/if.c:780 ip6_output(fffffd806bc22200,ffff800000a0bf80,fffffd805e558c78,0,0,fffffd805e558c08) at ip6_output+0xd02 rip6_output(fffffd806bc22200,fffffd8069add650,ffff80001d81ddf0,0) at rip6_output+0x4d7 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd8069add650,9,fffffd806bc22200,0,0,ffff80001d7a7760) at rip6_usrreq+0x5e1 sys/netinet6/raw_ip6.c:670 sosend(fffffd8069add650,0,ffff80001d81e038,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 dofilewritev(ffff80001d7a7760,6,ffff80001d81e038,0,ffff80001d81e120) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d7a7760,ffff80001d81e0d8,ffff80001d81e120) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d81e1a0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9ac45d53140, count: -18