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 *385517 88655 0 0 0x4000000 0 syz-executor.2 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254be10) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bde19,ffffffff825cd12f,568,ffffffff8255e050) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807d61e700,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002b38fc58,ffff800000bb0400,ffff80002b38f9b8,ffff80002b38f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff80002b38fc58,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002b38fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80664387f0,ffff80002b38fc58,1,fffffd807f7d8780) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd80664aa450,ffff80002b38fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002652a2b0,3,ffff80002b38fc58,0,ffff80002b38fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002652a2b0,ffff80002b38fcf8,ffff80002b38fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002b38fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x929d8e00c80, 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(ffffffff8254be10) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bde19,ffffffff825cd12f,568,ffffffff8255e050) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807d61e700,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002b38fc58,ffff800000bb0400,ffff80002b38f9b8,ffff80002b38f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff80002b38fc58,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002b38fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80664387f0,ffff80002b38fc58,1,fffffd807f7d8780) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd80664aa450,ffff80002b38fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002652a2b0,3,ffff80002b38fc58,0,ffff80002b38fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002652a2b0,ffff80002b38fcf8,ffff80002b38fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002b38fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x929d8e00c80, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002b38f6e0 rbx 0x8 rdx 0xffff800000029580 rcx 0 rax 0xffff80002652a2b0 r8 0 r9 0x8080808080808080 r10 0x5c161e4ce5a16fdd r11 0x36175078349a027 r12 0 r13 0xffffffc7 r14 0 r15 0x1 rip 0xffffffff821b71a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002b38f6d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.2) pid=385517 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff80002652b510,0xffff80002652afe0 process=0xffff8000216613a8 user=0xffff80002b38a000, vmspace=0xfffffd807f017aa0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 31801 429470 83763 0 2 0 syz-executor.4 31801 417575 83763 0 2 0x4000000 syz-executor.4 12699 193906 55544 0 2 0 syz-executor.1 12699 394906 55544 0 3 0x4000080 fsleep syz-executor.1 19400 435628 10905 0 2 0 syz-executor.6 19400 266067 10905 0 3 0x4000080 fsleep syz-executor.6 88655 293436 32850 0 2 0 syz-executor.2 *88655 385517 32850 0 7 0x4000000 syz-executor.2 3313 342256 54270 0 2 0 syz-executor.5 3313 142382 54270 0 3 0x4000080 ttyout syz-executor.5 94135 481040 0 0 3 0x14200 bored sosplice 10905 409272 98647 0 3 0x82 nanoslp syz-executor.6 54270 445533 98647 0 3 0x82 nanoslp syz-executor.5 93865 114106 98647 0 2 0x482 syz-executor.7 90381 418071 98647 0 2 0x2 syz-executor.3 32850 85590 98647 0 3 0x82 nanoslp syz-executor.2 55544 20056 98647 0 3 0x82 nanoslp syz-executor.1 83763 69892 98647 0 3 0x82 nanoslp syz-executor.4 17059 444277 98647 0 2 0x2 syz-executor.0 98647 378757 41622 0 3 0x82 thrsleep syz-fuzzer 98647 195102 41622 0 3 0x4000082 nanoslp syz-fuzzer 98647 80476 41622 0 3 0x4000082 thrsleep syz-fuzzer 98647 158897 41622 0 3 0x4000082 kqread syz-fuzzer 98647 391603 41622 0 3 0x4000082 thrsleep syz-fuzzer 98647 303586 41622 0 3 0x4000082 thrsleep syz-fuzzer 98647 247123 41622 0 3 0x4000082 thrsleep syz-fuzzer 98647 230879 41622 0 3 0x4000082 thrsleep syz-fuzzer 41622 202496 88961 0 3 0x10008a sigsusp ksh 88961 51144 70091 0 3 0x9a kqread sshd 9605 360719 1 0 3 0x100083 ttyin getty 70091 158022 1 0 3 0x88 kqread sshd 48692 299545 20009 73 3 0x100090 kqread syslogd 20009 224310 1 0 3 0x100082 netio syslogd 88523 181032 1 0 3 0x100080 kqread resolvd 89673 487001 62269 77 3 0x100092 kqread dhcpleased 19322 76095 62269 77 3 0x100092 kqread dhcpleased 62269 172275 1 0 3 0x80 kqread dhcpleased 39720 32861 0 0 2 0x14200 smr 21887 236443 0 0 2 0x14200 zerothread 22058 417948 0 0 3 0x14200 aiodoned aiodoned 79458 438947 0 0 3 0x14200 syncer update 9834 315869 0 0 3 0x14200 cleaner cleaner 43512 296518 0 0 3 0x14200 reaper reaper 42769 36226 0 0 3 0x14200 pgdaemon pagedaemon 51986 32602 0 0 3 0x14200 bored viomb 24620 145060 0 0 3 0x40014200 acpi0 acpi0 26229 253582 0 0 3 0x14200 bored softnet 86451 508353 0 0 3 0x14200 bored systqmp 60292 80042 0 0 3 0x14200 bored systq 80639 217229 0 0 3 0x40014200 bored softclock 65724 36347 0 0 3 0x40014200 idle0 1 165543 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 10174 6592K 6721K 78643K 11718 0 pcb 13 10K 11K 78643K 57 0 rtable 216 6K 7K 78643K 353 0 ifaddr 75 16K 17K 78643K 104 0 counters 26 17K 17K 78643K 32 0 ioctlops 0 0K 2K 78643K 54 0 iov 0 0K 12K 78643K 110 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1272 79K 80K 78643K 1351 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 11 0K 0K 78643K 17 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 16 57K 81K 78643K 428 0 sigio 0 0K 0K 78643K 4 0 proc 56 54K 71K 78643K 460 0 subproc 104 6K 6K 78643K 104 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 5 0 in_multi 88 5K 6K 78643K 103 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 49 228K 228K 78643K 49 0 exec 0 0K 2K 78643K 726 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 289 78K 97K 78643K 6573 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 0 0K 0K 78643K 22 0 NDP 10 0K 1K 78643K 32 0 temp 120 4691K 4755K 78643K 5980 0 kqueue 12 18K 24K 78643K 46 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 136 0 133 3 0 3 3 0 8 2 rtentry 112 111 0 12 4 0 4 4 0 8 0 unpcb 136 923 0 910 7 0 7 7 0 8 6 syncache 296 7 0 7 2 2 0 1 0 8 0 tcpqe 32 401 0 401 1 1 0 1 0 8 0 tcpcb 736 262 0 258 8 0 8 8 0 8 7 arp 88 18 0 2 1 0 1 1 0 8 0 inpcb 304 533 0 524 11 2 9 11 0 8 8 ip6q 72 2 0 1 1 0 1 1 0 8 0 ip6af 40 3 0 2 1 0 1 1 0 8 0 nd6 48 24 0 3 1 0 1 1 0 8 0 pkpcb 40 38 0 38 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1152 5 0 5 1 1 0 1 0 8 0 pfstscr 40 6 0 6 1 0 1 1 0 8 1 pfstkey 112 6 0 6 1 0 1 1 0 8 1 pfstate 320 3 0 3 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 453 0 44 29 0 29 29 0 8 1 art_table 32 454 0 44 4 0 4 4 0 8 0 art_node 16 110 0 20 1 0 1 1 0 8 0 semupl 112 4 0 4 1 0 1 1 0 8 1 semapl 112 12 0 3 1 0 1 1 0 8 0 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1828 0 401 90 0 90 90 0 8 0 ffsino 240 1828 0 401 85 0 85 85 0 8 0 nchpl 144 2507 0 845 62 0 62 62 0 8 0 uvmvnodes 80 1999 0 0 41 0 41 41 0 8 0 vnodes 224 1999 0 0 118 0 118 118 0 8 0 namei 1024 8318 0 8317 2 1 1 2 0 8 0 vmpool 528 6 0 6 1 0 1 1 0 8 1 scxspl 216 7572 0 7572 10 2 8 8 0 8 8 plimitpl 152 25 0 10 1 0 1 1 0 8 0 sigapl 424 704 0 663 6 1 5 6 0 8 0 futexpl 64 3178 0 3176 1 0 1 1 0 8 0 knotepl 120 12605 0 12525 4 0 4 4 0 8 0 kqueuepl 184 131 0 122 4 0 4 4 0 8 3 pipepl 304 231 0 203 5 0 5 5 0 8 2 fdescpl 432 690 0 663 4 0 4 4 0 8 0 filepl 120 4545 0 4302 15 0 15 15 0 8 7 lockfpl 104 118 0 115 1 0 1 1 0 8 0 lockfspl 48 28 0 25 1 0 1 1 0 8 0 sessionpl 144 23 0 7 1 0 1 1 0 8 0 pgrppl 48 27 0 11 1 0 1 1 0 8 0 ucredpl 96 189 0 179 1 0 1 1 0 8 0 zombiepl 144 664 0 663 1 0 1 1 0 8 0 processpl 1000 704 0 663 6 0 6 6 0 8 0 procpl 672 1209 0 1156 6 0 6 6 0 8 0 sosppl 168 6 0 6 1 0 1 1 0 8 1 sockpl 448 1630 0 1605 37 21 16 30 0 8 12 mcl64k 65536 8 0 8 1 0 1 1 0 8 1 mcl16k 16384 5 0 5 1 1 0 1 0 8 0 mcl12k 12288 26 0 26 1 0 1 1 0 8 1 mcl9k 9216 6 0 6 1 0 1 1 0 8 1 mcl8k 8192 29 0 29 2 1 1 1 0 8 1 mcl4k 4096 40 0 40 2 1 1 1 0 8 1 mcl2k2 2112 7 0 7 1 0 1 1 0 8 1 mcl2k 2048 77481 0 77412 20 10 10 19 0 8 0 mtagpl 96 79 0 3 3 1 2 2 0 8 0 mbufpl 256 124611 0 124272 24 0 24 24 0 8 0 bufpl 288 4106 0 150 283 0 283 283 0 8 0 anonpl 24 150402 0 132029 115 0 115 115 0 188 2 amapchunkpl 152 16582 0 15791 43 4 39 42 0 158 7 amappl16 200 1379 0 785 32 0 32 32 0 8 0 amappl15 192 210 0 199 1 0 1 1 0 8 0 amappl14 184 42 0 37 1 0 1 1 0 8 0 amappl13 176 80 0 78 1 0 1 1 0 8 0 amappl12 168 49 0 46 2 1 1 1 0 8 0 amappl11 160 118 0 104 1 0 1 1 0 8 0 amappl10 152 18 0 15 1 0 1 1 0 8 0 amappl9 144 376 0 371 1 0 1 1 0 8 0 amappl8 136 586 0 545 2 0 2 2 0 8 0 amappl7 128 153 0 144 1 0 1 1 0 8 0 amappl6 120 229 0 208 2 1 1 2 0 8 0 amappl5 112 701 0 685 1 0 1 1 0 8 0 amappl4 104 905 0 876 2 1 1 2 0 8 0 amappl3 96 245 0 234 1 0 1 1 0 8 0 amappl2 88 530 0 487 3 1 2 3 0 8 0 amappl1 80 15399 0 14843 18 5 13 18 0 8 0 amappl 88 6154 0 5924 7 0 7 7 0 92 1 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 696 0 669 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 696 0 669 1 0 1 1 0 8 0 vmmpekpl 168 9815 0 9774 3 0 3 3 0 8 0 vmmpepl 168 67537 0 65113 132 7 125 132 0 357 17 vmsppl 272 695 0 669 3 1 2 3 0 8 0 rwobjpl 24 19028 0 15521 22 0 22 22 0 8 0 pdppl 4096 1398 0 1338 102 38 64 72 0 8 4 pvpl 32 380063 0 357536 242 14 228 242 0 265 44 pmappl 216 695 0 669 2 0 2 2 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 696 0 76 18 0 18 18 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(ffffffff8254be10) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bde19,ffffffff825cd12f,568,ffffffff8255e050) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807d61e700,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002b38fc58,ffff800000bb0400,ffff80002b38f9b8,ffff80002b38f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff80002b38fc58,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002b38fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80664387f0,ffff80002b38fc58,1,fffffd807f7d8780) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd80664aa450,ffff80002b38fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002652a2b0,3,ffff80002b38fc58,0,ffff80002b38fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002652a2b0,ffff80002b38fcf8,ffff80002b38fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002b38fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x929d8e00c80, 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(ffffffff8254be10) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bde19,ffffffff825cd12f,568,ffffffff8255e050) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807d61e700,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002b38fc58,ffff800000bb0400,ffff80002b38f9b8,ffff80002b38f8b8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff80002b38fc58,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002b38fab0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80664387f0,ffff80002b38fc58,1,fffffd807f7d8780) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd80664aa450,ffff80002b38fc58,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002652a2b0,3,ffff80002b38fc58,0,ffff80002b38fd50) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002652a2b0,ffff80002b38fcf8,ffff80002b38fd50) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002b38fdc0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x929d8e00c80, count: -13