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 *473484 77900 0 0 0x4000000 0 syz-executor.7 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(fffffd806b6fb300,ffffffce) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000297655c8,ffff800000c29000,ffff800029765328,ffff800029765228) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff8000297655c8,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029765420) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8073ddfdb0,ffff8000297655c8,1,fffffd807f7d8720) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807536f3c0,ffff8000297655c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002160c548,3,ffff8000297655c8,0,ffff8000297656c0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002160c548,ffff800029765668,ffff8000297656c0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800029765730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8afeac69960, 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(fffffd806b6fb300,ffffffce) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000297655c8,ffff800000c29000,ffff800029765328,ffff800029765228) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff8000297655c8,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029765420) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8073ddfdb0,ffff8000297655c8,1,fffffd807f7d8720) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807536f3c0,ffff8000297655c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002160c548,3,ffff8000297655c8,0,ffff8000297656c0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002160c548,ffff800029765668,ffff8000297656c0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800029765730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8afeac69960, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800029765050 rbx 0x10 rdx 0xffff800000bdf0c0 rcx 0 rax 0xffff80002160c548 r8 0 r9 0x8080808080808080 r10 0xc89eef7bd67b64ed r11 0x358f239f8431f951 r12 0 r13 0xffffffce r14 0 r15 0x1 rip 0xffffffff821b71a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800029765040 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.7) pid=473484 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff80002160cd28,0xffffffff82a4a390 process=0xffff80002166fba8 user=0xffff800029760000, vmspace=0xfffffd8068536440 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 77900 182524 85009 0 2 0 syz-executor.7 *77900 473484 85009 0 7 0x4000000 syz-executor.7 59520 328112 51216 0 3 0x80 nanoslp syz-executor.3 59520 23548 51216 0 3 0x4000080 fsleep syz-executor.3 40729 294757 28494 0 2 0 syz-executor.5 40729 434007 28494 0 3 0x4000080 lockf syz-executor.5 40729 297511 28494 0 3 0x4000080 lockf syz-executor.5 65322 176079 41544 0 2 0x480 syz-executor.6 65322 55379 41544 0 3 0x4000080 kqread syz-executor.6 65322 211798 41544 0 3 0x4000080 fsleep syz-executor.6 27956 246474 23490 0 2 0x482 syz-executor.4 3601 265338 0 0 3 0x14200 acct acct 51216 182787 23490 0 2 0x482 syz-executor.3 85009 479673 23490 0 3 0x82 nanoslp syz-executor.7 41544 463731 23490 0 2 0x482 syz-executor.6 28494 286564 23490 0 2 0x482 syz-executor.5 19254 381095 23490 0 2 0x482 syz-executor.0 45704 410959 1 0 3 0x100083 ttyin getty 41497 157324 23490 0 2 0x482 syz-executor.2 70832 506220 23490 0 2 0x2 syz-executor.1 54906 231215 0 0 3 0x14280 nfsidl nfsio 54570 20427 0 0 3 0x14280 nfsidl nfsio 50897 220792 0 0 3 0x14280 nfsidl nfsio 19538 435918 0 0 3 0x14280 nfsidl nfsio 11098 105098 0 0 3 0x14280 nfsidl nfsio 14196 408116 0 0 3 0x14280 nfsidl nfsio 79862 368004 0 0 3 0x14280 nfsidl nfsio 67944 72556 0 0 3 0x14280 nfsidl nfsio 6044 345319 0 0 3 0x14280 nfsidl nfsio 63664 13953 0 0 3 0x14280 nfsidl nfsio 11906 275815 0 0 3 0x14280 nfsidl nfsio 68137 37742 0 0 3 0x14280 nfsidl nfsio 58571 53450 0 0 3 0x14280 nfsidl nfsio 31569 458454 0 0 3 0x14280 nfsidl nfsio 11954 164912 0 0 3 0x14280 nfsidl nfsio 52949 241010 0 0 3 0x14280 nfsidl nfsio 86010 343660 0 0 3 0x14280 nfsidl nfsio 20197 107045 0 0 3 0x14280 nfsidl nfsio 47530 176594 0 0 3 0x14280 nfsidl nfsio 44612 404501 0 0 3 0x14280 nfsidl nfsio 13227 421976 0 0 3 0x14200 bored sosplice 23490 442741 36080 0 3 0x82 thrsleep syz-fuzzer 23490 310561 36080 0 2 0x4000482 syz-fuzzer 23490 184872 36080 0 3 0x4000082 thrsleep syz-fuzzer 23490 386843 36080 0 3 0x4000082 thrsleep syz-fuzzer 23490 140678 36080 0 3 0x4000082 kqread syz-fuzzer 23490 166775 36080 0 3 0x4000082 thrsleep syz-fuzzer 23490 65748 36080 0 3 0x4000082 thrsleep syz-fuzzer 23490 370221 36080 0 3 0x4000082 thrsleep syz-fuzzer 23490 316490 36080 0 3 0x4000082 thrsleep syz-fuzzer 36080 206011 88031 0 3 0x10008a sigsusp ksh 88031 115685 96494 0 3 0x9a kqread sshd 96494 464466 1 0 3 0x88 kqread sshd 6501 374485 12278 73 3 0x100090 kqread syslogd 12278 192478 1 0 3 0x100082 netio syslogd 11561 225891 1 0 3 0x100080 kqread resolvd 16869 79623 25248 77 3 0x100092 kqread dhcpleased 74996 295032 25248 77 3 0x100092 kqread dhcpleased 25248 214934 1 0 3 0x80 kqread dhcpleased 4210 143355 0 0 3 0x14200 bored smr 58739 118628 0 0 2 0x14200 zerothread 96046 476674 0 0 3 0x14200 aiodoned aiodoned 1853 405421 0 0 3 0x14200 syncer update 93031 141498 0 0 3 0x14200 cleaner cleaner 74537 371640 0 0 3 0x14200 reaper reaper 37630 175110 0 0 3 0x14200 pgdaemon pagedaemon 51926 479640 0 0 3 0x14200 bored viomb 15750 8028 0 0 3 0x40014200 acpi0 acpi0 22791 217458 0 0 3 0x14200 bored softnet 50755 29161 0 0 3 0x14200 bored systqmp 40404 372353 0 0 3 0x14200 bored systq 20583 155526 0 0 2 0x40014200 softclock 80556 319842 0 0 3 0x40014200 idle0 1 427908 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 10203 6564K 7017K 78643K 31152 0 pcb 13 16K 18K 78643K 1962 0 rtable 228 10K 11K 78643K 3283 0 ifaddr 91 21K 23K 78643K 1307 0 sysctl 2 0K 0K 78643K 4 0 counters 27 17K 17K 78643K 233 0 ioctlops 0 0K 4K 78643K 3425 0 iov 0 0K 18K 78643K 1386 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1589 99K 99K 78643K 10129 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 13K 78643K 99 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 2821 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 14 49K 73K 78643K 13572 0 sigio 0 0K 0K 78643K 229 0 proc 60 55K 71K 78643K 2800 0 subproc 104 6K 6K 78643K 897 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 513 0 in_multi 95 6K 7K 78643K 1443 0 ether_multi 1 0K 0K 78643K 158 0 mrt 75 4K 4K 78643K 177 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 169 758K 758K 78643K 169 0 exec 0 0K 2K 78643K 3678 0 pfkey data 0 0K 0K 78643K 4 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 422 674K 681K 78643K 163501 0 UVM aobj 131 7K 7K 78643K 152 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 725 0 NDP 15 0K 1K 78643K 428 0 temp 134 4697K 6233K 78643K 170450 0 kqueue 13 20K 26K 78643K 916 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 2463 0 2460 24 19 5 5 0 8 4 rtentry 112 1009 0 914 4 0 4 4 0 8 0 unpcb 136 6555 0 6542 77 76 1 9 0 8 0 syncache 296 37 0 37 10 10 0 1 0 8 0 tcpqe 32 35 0 35 1 1 0 1 0 8 0 tcpcb 736 5663 0 5646 177 169 8 14 0 8 6 arp 88 147 0 129 1 0 1 1 0 8 0 ipq 40 44 0 43 5 4 1 1 0 8 0 ipqe 40 1732 0 1731 5 4 1 1 0 8 0 inpcb 304 13193 0 13186 168 162 6 16 0 8 5 rttmr 72 26 0 26 8 7 1 1 0 8 1 ip6q 72 4 0 4 2 2 0 1 0 8 0 ip6af 40 8 0 8 2 2 0 1 0 8 0 nd6 48 305 0 283 1 0 1 1 0 8 0 pkpcb 40 114 0 114 11 11 0 1 0 8 0 kcovpl 48 69 0 61 1 0 1 1 0 8 0 ppxss 1152 36 0 36 9 9 0 1 0 8 0 pfosfp 40 4 0 3 1 0 1 1 0 8 0 pfosfpen 112 4 0 3 1 0 1 1 0 8 0 pfrke_plain 168 4 0 4 1 1 0 1 0 8 0 pfrktable 1344 56 0 52 1 0 1 1 0 8 0 pfrule 1360 32 0 25 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 4446 0 4051 58 31 27 30 0 8 2 art_table 32 4447 0 4051 4 0 4 4 0 8 0 art_node 16 1008 0 924 1 0 1 1 0 8 0 semupl 112 7 0 7 1 1 0 1 0 8 0 semapl 112 2817 0 2807 1 0 1 1 0 8 0 shmpl 112 149 0 21 5 1 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 19540 0 18055 94 0 94 94 0 8 0 ffsino 240 19540 0 18055 88 0 88 88 0 8 0 nchpl 144 38077 0 36448 63 1 62 63 0 8 0 uvmvnodes 80 6785 0 0 139 0 139 139 0 8 0 vnodes 224 6785 0 0 400 0 400 400 0 8 0 namei 1024 149830 0 149829 3 2 1 2 0 8 0 vcpupl 1984 173 0 0 22 0 22 22 0 8 0 vmpool 528 206 0 33 14 2 12 12 0 8 0 pfiaddrpl 120 18 0 11 1 0 1 1 0 8 0 scsiplug 72 9 0 9 3 3 0 1 0 8 0 scxspl 216 112703 0 112703 20 19 1 8 0 8 1 plimitpl 152 1515 0 1499 1 0 1 1 0 8 0 sigapl 424 13742 0 13682 8 0 8 8 0 8 0 futexpl 64 138552 0 138550 4 3 1 1 0 8 0 knotepl 120 117212 0 117131 17 14 3 10 0 8 0 kqueuepl 184 5025 0 5016 74 70 4 7 0 8 3 pipepl 304 2647 0 2619 73 70 3 12 0 8 0 fdescpl 432 13706 0 13681 4 0 4 4 0 8 0 filepl 120 105702 0 105461 152 138 14 18 0 8 6 lockfpl 104 3607 0 3602 11 10 1 2 0 8 0 lockfspl 48 1095 0 1092 1 0 1 1 0 8 0 sessionpl 144 87 0 71 1 0 1 1 0 8 0 pgrppl 48 109 0 93 1 0 1 1 0 8 0 ucredpl 96 12526 0 12513 1 0 1 1 0 8 0 zombiepl 144 13682 0 13679 1 0 1 1 0 8 0 processpl 1000 13742 0 13679 11 2 9 9 0 8 0 procpl 672 33691 0 33614 32 24 8 9 0 8 0 sosppl 168 114 0 114 22 22 0 1 0 8 0 sockpl 448 22335 0 22312 409 398 11 32 0 8 8 mcl64k 65536 529 0 529 29 28 1 1 0 8 1 mcl16k 16384 121 0 121 31 30 1 1 0 8 1 mcl12k 12288 490 0 490 29 28 1 1 0 8 1 mcl9k 9216 296 0 296 33 33 0 5 0 8 0 mcl8k 8192 891 0 891 23 22 1 1 0 8 1 mcl4k 4096 1448 0 1448 20 19 1 1 0 8 1 mcl2k2 2112 85 0 85 31 31 0 1 0 8 0 mcl2k 2048 103043 0 102996 31 24 7 12 0 8 0 mtagpl 96 2570 0 2303 25 18 7 11 0 8 0 mbufpl 256 269736 0 269239 743 708 35 418 0 8 3 bufpl 288 26469 0 19684 485 0 485 485 0 8 0 anonpl 24 3913344 0 3896854 397 217 180 200 0 188 42 amapchunkpl 152 417193 0 416433 227 183 44 64 0 158 10 amappl16 200 43708 0 42950 256 207 49 66 0 8 8 amappl15 192 4810 0 4802 1 0 1 1 0 8 0 amappl14 184 727 0 724 1 0 1 1 0 8 0 amappl13 176 2389 0 2384 1 0 1 1 0 8 0 amappl12 168 1145 0 1138 1 0 1 1 0 8 0 amappl11 160 581 0 569 1 0 1 1 0 8 0 amappl10 152 892 0 891 1 0 1 1 0 8 0 amappl9 144 1210 0 1206 1 0 1 1 0 8 0 amappl8 136 4261 0 4172 4 0 4 4 0 8 0 amappl7 128 2816 0 2803 1 0 1 1 0 8 0 amappl6 120 1096 0 1074 2 1 1 2 0 8 0 amappl5 112 12941 0 12928 1 0 1 1 0 8 0 amappl4 104 3086 0 3054 2 0 2 2 0 8 0 amappl3 96 3369 0 3354 1 0 1 1 0 8 0 amappl2 88 3629 0 3572 3 1 2 3 0 8 0 amappl1 80 239601 0 239065 20 7 13 18 0 8 0 amappl 88 161745 0 161487 7 0 7 7 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 151 0 21 3 0 3 3 0 8 0 uaddrrnd 24 13912 0 13714 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 13912 0 13714 2 0 2 2 0 8 0 vmmpekpl 168 90780 0 90702 4 0 4 4 0 8 0 vmmpepl 168 1255673 0 1252711 401 245 156 174 0 357 9 vmsppl 272 13911 0 13714 16 2 14 14 0 8 0 rwobjpl 24 298782 0 290122 64 10 54 54 0 8 0 pdppl 4096 27830 0 27601 945 708 237 239 0 8 8 pvpl 32 6553405 0 6533076 701 390 311 335 0 265 101 pmappl 216 13911 0 13714 13 1 12 12 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 3160 0 2143 43 7 36 40 0 8 4 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(fffffd806b6fb300,ffffffce) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000297655c8,ffff800000c29000,ffff800029765328,ffff800029765228) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff8000297655c8,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029765420) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8073ddfdb0,ffff8000297655c8,1,fffffd807f7d8720) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807536f3c0,ffff8000297655c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002160c548,3,ffff8000297655c8,0,ffff8000297656c0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002160c548,ffff800029765668,ffff8000297656c0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800029765730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8afeac69960, 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(fffffd806b6fb300,ffffffce) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000297655c8,ffff800000c29000,ffff800029765328,ffff800029765228) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff8000297655c8,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029765420) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8073ddfdb0,ffff8000297655c8,1,fffffd807f7d8720) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807536f3c0,ffff8000297655c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002160c548,3,ffff8000297655c8,0,ffff8000297656c0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002160c548,ffff800029765668,ffff8000297656c0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800029765730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8afeac69960, count: -13