panic: kernel diagnostic assertion "len >= 0 && !M_READONLY(m)" failed: file "/syzkaller/managers/main/kernel/sys/kern/uipc_mbuf.c", line 1384 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *316502 48043 0 0 0x4000000 0 syz-executor.4 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8068920c00,ffffffee) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002877fc58,ffff800000c05800,ffff80002877f9b8,ffff80002877f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002877fc58,11) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002877fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a09d670,ffff80002877fc58,11,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068b3aad8,ffff80002877fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002168ea88,5,ffff80002877fc58,0,ffff80002877fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002168ea88,ffff80002877fcf8,ffff80002877fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002877fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1dfa8265570, count: 2 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 *cpu0: kernel diagnostic assertion "len >= 0 && !M_READONLY(m)" failed: file "/syzkaller/managers/main/kernel/sys/kern/uipc_mbuf.c", line 1384 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8068920c00,ffffffee) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002877fc58,ffff800000c05800,ffff80002877f9b8,ffff80002877f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002877fc58,11) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002877fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a09d670,ffff80002877fc58,11,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068b3aad8,ffff80002877fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002168ea88,5,ffff80002877fc58,0,ffff80002877fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002168ea88,ffff80002877fcf8,ffff80002877fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002877fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1dfa8265570, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002877f6e0 rbx 0x30 rdx 0xffff800000badcc0 rcx 0 rax 0xffff80002168ea88 r8 0 r9 0x8080808080808080 r10 0xcf47efacddd4d84 r11 0x1983177c91ade1f4 r12 0 r13 0xffffffee r14 0 r15 0x1 rip 0xffffffff824a53a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002877f6d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.4) pid=316502 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff80002168ed28,0xffff80002168f278 process=0xffff800021627b78 user=0xffff80002877a000, vmspace=0xfffffd80666f7aa0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 95582 366879 78563 0 2 0 syz-executor.0 15995 512221 99723 0 2 0 syz-executor.5 3242 416600 53198 0 2 0 syz-executor.3 3242 79947 53198 0 3 0x4000080 fsleep syz-executor.3 35625 1668 95255 0 2 0 syz-executor.2 35625 98567 95255 0 3 0x4000080 fsleep syz-executor.2 48043 237780 98430 0 2 0 syz-executor.4 *48043 316502 98430 0 7 0x4000000 syz-executor.4 6194 346910 45621 0 2 0 syz-executor.1 6194 81153 45621 0 2 0x4000000 syz-executor.1 78563 501134 89414 0 3 0x82 nanoslp syz-executor.0 4708 323329 89414 0 2 0x2 syz-executor.7 11364 60226 0 0 3 0x14200 bored sosplice 53198 215030 89414 0 2 0x482 syz-executor.3 95255 15741 89414 0 2 0x482 syz-executor.2 91071 302541 89414 0 2 0x2 syz-executor.6 99723 291089 89414 0 3 0x82 nanoslp syz-executor.5 45621 141332 89414 0 3 0x82 nanoslp syz-executor.1 98430 369076 89414 0 3 0x82 nanoslp syz-executor.4 89414 367894 38789 0 3 0x82 thrsleep syz-fuzzer 89414 435841 38789 0 3 0x4000082 nanoslp syz-fuzzer 89414 479093 38789 0 3 0x4000082 thrsleep syz-fuzzer 89414 435806 38789 0 3 0x4000082 thrsleep syz-fuzzer 89414 361749 38789 0 3 0x4000082 thrsleep syz-fuzzer 89414 495136 38789 0 3 0x4000082 thrsleep syz-fuzzer 89414 289804 38789 0 3 0x4000082 thrsleep syz-fuzzer 89414 96419 38789 0 3 0x4000082 kqread syz-fuzzer 89414 102026 38789 0 3 0x4000082 thrsleep syz-fuzzer 38789 317583 6718 0 3 0x10008a sigsusp ksh 6718 345466 81978 0 3 0x9a kqread sshd 10710 349338 1 0 3 0x100083 ttyin getty 81978 97479 1 0 3 0x88 kqread sshd 97704 443915 59522 73 3 0x100090 kqread syslogd 59522 422623 1 0 3 0x100082 netio syslogd 62138 205542 1 0 3 0x100080 kqread resolvd 9512 186247 32838 77 3 0x100092 kqread dhcpleased 49474 129613 32838 77 3 0x100092 kqread dhcpleased 32838 270316 1 0 3 0x80 kqread dhcpleased 81117 221609 0 0 3 0x14200 bored smr 98693 200682 0 0 2 0x14200 zerothread 84971 414454 0 0 3 0x14200 aiodoned aiodoned 46857 415068 0 0 3 0x14200 syncer update 436 521176 0 0 3 0x14200 cleaner cleaner 11915 68403 0 0 3 0x14200 reaper reaper 26149 202872 0 0 3 0x14200 pgdaemon pagedaemon 68788 371078 0 0 3 0x14200 bored viomb 84899 425038 0 0 3 0x40014200 acpi0 acpi0 15406 331108 0 0 3 0x14200 bored softnet 9996 176226 0 0 3 0x14200 bored systqmp 70806 233830 0 0 3 0x14200 bored systq 99781 201185 0 0 3 0x40014200 bored softclock 99392 37763 0 0 3 0x40014200 idle0 1 156781 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 10164 6463K 6704K 78643K 12555 0 pcb 13 14K 16K 78643K 438 0 rtable 193 5K 9K 78643K 796 0 ifaddr 75 16K 18K 78643K 173 0 sysctl 2 0K 0K 78643K 2 0 counters 26 17K 17K 78643K 37 0 ioctlops 0 0K 4K 78643K 306 0 iov 0 0K 12K 78643K 25 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1337 84K 84K 78643K 1645 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 10 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 222 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 16 57K 74K 78643K 1103 0 proc 57 55K 79K 78643K 759 0 subproc 104 6K 6K 78643K 234 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 421 0 in_multi 84 5K 6K 78643K 246 0 ether_multi 1 0K 0K 78643K 8 0 mrt 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 2K 78643K 1173 0 tdb 3 0K 0K 78643K 3 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 294 126K 141K 78643K 13770 0 UVM aobj 13 2K 2K 78643K 13 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 40 0 NDP 10 0K 1K 78643K 59 0 temp 86 4686K 4750K 78643K 10377 0 kqueue 12 18K 22K 78643K 77 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 rtpcb 120 144 0 141 3 2 1 2 0 8 0 rtentry 112 237 0 150 4 0 4 4 0 8 0 unpcb 136 503 0 490 8 7 1 6 0 8 0 syncache 296 7 0 7 2 2 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 89 0 89 1 1 0 1 0 8 0 tcpcb 736 370 0 366 21 12 9 10 0 8 8 arp 88 39 0 23 1 0 1 1 0 8 0 ipq 40 3 0 3 1 1 0 1 0 8 0 ipqe 40 12 0 12 1 1 0 1 0 8 0 inpcb 304 1195 0 1188 24 15 9 11 0 8 8 nd6 48 56 0 37 1 0 1 1 0 8 0 kcovpl 48 18 0 10 1 0 1 1 0 8 0 pfstscr 40 4 0 3 1 0 1 1 0 8 0 pfrktable 1344 18 0 18 1 1 0 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 8 0 6 1 0 1 1 0 8 0 pfstate 320 4 0 3 1 0 1 1 0 8 0 pfrule 1360 11 0 11 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 998 0 642 29 2 27 29 0 8 0 art_table 32 999 0 642 4 0 4 4 0 8 0 art_node 16 236 0 159 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 3 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 220 0 210 1 0 1 1 0 8 0 shmpl 112 10 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2491 0 1058 91 0 91 91 0 8 0 ffsino 240 2491 0 1058 85 0 85 85 0 8 0 nchpl 144 3843 0 2219 62 0 62 62 0 8 0 uvmvnodes 80 2915 0 0 60 0 60 60 0 8 0 vnodes 224 2915 0 0 172 0 172 172 0 8 0 namei 1024 13414 0 13413 2 1 1 2 0 8 0 vcpupl 1984 3 0 0 1 0 1 1 0 8 0 vmpool 528 17 0 14 1 0 1 1 0 8 0 pfiaddrpl 120 6 0 6 1 1 0 1 0 8 0 scxspl 216 11925 0 11925 11 10 1 8 0 8 1 plimitpl 152 49 0 35 1 0 1 1 0 8 0 sigapl 424 1369 0 1328 6 0 6 6 0 8 0 futexpl 64 7827 0 7825 1 0 1 1 0 8 0 knotepl 120 24178 0 24098 10 6 4 10 0 8 0 kqueuepl 184 131 0 121 1 0 1 1 0 8 0 pipepl 304 200 0 172 3 0 3 3 0 8 0 fdescpl 432 1355 0 1328 4 0 4 4 0 8 0 filepl 120 6657 0 6416 26 12 14 15 0 8 5 lockfpl 104 221 0 218 2 0 2 2 0 8 1 lockfspl 48 109 0 106 1 0 1 1 0 8 0 sessionpl 144 33 0 17 1 0 1 1 0 8 0 pgrppl 48 41 0 25 1 0 1 1 0 8 0 ucredpl 96 374 0 364 1 0 1 1 0 8 0 zombiepl 144 1328 0 1328 1 0 1 1 0 8 1 processpl 1000 1369 0 1328 6 0 6 6 0 8 0 procpl 672 2597 0 2544 7 1 6 7 0 8 0 sosppl 168 16 0 16 2 2 0 1 0 8 0 sockpl 448 1842 0 1819 55 42 13 18 0 8 10 mcl64k 65536 31 0 31 3 3 0 1 0 8 0 mcl16k 16384 7 0 7 2 2 0 1 0 8 0 mcl12k 12288 27 0 27 3 2 1 1 0 8 1 mcl9k 9216 12 0 12 3 3 0 1 0 8 0 mcl8k 8192 79 0 79 5 4 1 1 0 8 1 mcl4k 4096 48 0 48 3 2 1 1 0 8 1 mcl2k2 2112 10 0 10 3 2 1 1 0 8 1 mcl2k 2048 74781 0 74730 17 9 8 14 0 8 0 mtagpl 96 173 0 26 5 1 4 4 0 8 0 mbufpl 256 125541 0 125151 33 7 26 27 0 8 0 bufpl 288 5106 0 148 355 0 355 355 0 8 0 anonpl 24 312135 0 295083 132 17 115 132 0 188 0 amapchunkpl 152 32773 0 32053 48 16 32 43 0 158 0 amappl16 200 3057 0 2433 41 5 36 41 0 8 0 amappl15 192 436 0 428 1 0 1 1 0 8 0 amappl14 184 33 0 32 2 1 1 1 0 8 0 amappl13 176 142 0 140 1 0 1 1 0 8 0 amappl12 168 49 0 46 2 1 1 1 0 8 0 amappl11 160 260 0 243 1 0 1 1 0 8 0 amappl10 152 146 0 140 1 0 1 1 0 8 0 amappl9 144 455 0 452 1 0 1 1 0 8 0 amappl8 136 912 0 863 2 0 2 2 0 8 0 amappl7 128 343 0 332 1 0 1 1 0 8 0 amappl6 120 241 0 219 2 1 1 2 0 8 0 amappl5 112 1210 0 1191 1 0 1 1 0 8 0 amappl4 104 1245 0 1215 2 1 1 2 0 8 0 amappl3 96 274 0 261 1 0 1 1 0 8 0 amappl2 88 659 0 614 3 1 2 3 0 8 0 amappl1 80 26366 0 25828 18 5 13 18 0 8 0 amappl 88 13171 0 12955 6 0 6 6 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 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 72 12 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1372 0 1342 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1372 0 1342 1 0 1 1 0 8 0 vmmpekpl 168 13116 0 13066 3 0 3 3 0 8 0 vmmpepl 168 130489 0 128070 157 42 115 157 0 357 6 vmsppl 272 1371 0 1342 4 1 3 3 0 8 0 rwobjpl 24 32710 0 28269 28 0 28 28 0 8 0 pdppl 4096 2750 0 2687 145 80 65 70 0 8 2 pvpl 32 669049 0 647796 244 60 184 244 0 265 0 pmappl 216 1371 0 1342 2 0 2 2 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 858 0 168 20 0 20 20 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:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8068920c00,ffffffee) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002877fc58,ffff800000c05800,ffff80002877f9b8,ffff80002877f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002877fc58,11) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002877fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a09d670,ffff80002877fc58,11,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068b3aad8,ffff80002877fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002168ea88,5,ffff80002877fc58,0,ffff80002877fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002168ea88,ffff80002877fcf8,ffff80002877fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002877fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1dfa8265570, count: -13 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8068920c00,ffffffee) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002877fc58,ffff800000c05800,ffff80002877f9b8,ffff80002877f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002877fc58,11) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002877fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a09d670,ffff80002877fc58,11,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068b3aad8,ffff80002877fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002168ea88,5,ffff80002877fc58,0,ffff80002877fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002168ea88,ffff80002877fcf8,ffff80002877fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002877fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1dfa8265570, count: -13