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 *340854 98933 0 0 0x4000000 0 syz-executor.7 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82547276) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bae63,ffffffff825cabcb,568,ffffffff8255b781) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd806d534900,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002e849168,ffff800000bff800,ffff80002e848ec8,ffff80002e848dc8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002e849168,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002e848fc0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8067cbfa08,ffff80002e849168,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8071fac628,ffff80002e849168,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002169bce8,3,ffff80002e849168,0,ffff80002e849260) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002169bce8,ffff80002e849208,ffff80002e849260) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002e8492d0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc1490617c40, 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(ffffffff82547276) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bae63,ffffffff825cabcb,568,ffffffff8255b781) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd806d534900,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002e849168,ffff800000bff800,ffff80002e848ec8,ffff80002e848dc8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002e849168,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002e848fc0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8067cbfa08,ffff80002e849168,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8071fac628,ffff80002e849168,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002169bce8,3,ffff80002e849168,0,ffff80002e849260) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002169bce8,ffff80002e849208,ffff80002e849260) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002e8492d0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc1490617c40, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002e848bf0 rbx 0x8 rdx 0xffff800000bd6c40 rcx 0 rax 0xffff80002169bce8 r8 0 r9 0x8080808080808080 r10 0x291060a5f1a04775 r11 0x83611d534fd75418 r12 0 r13 0xffffffc7 r14 0 r15 0x1 rip 0xffffffff81e942b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e848be0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.7) pid=340854 stat=onproc flags process=0 proc=4000000 pri=82, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff80002169a008,0xffff80002169aa98 process=0xffff8000230ce028 user=0xffff80002e844000, vmspace=0xfffffd80689c6990 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 15766 278949 83479 0 3 0x80 fsleep syz-executor.6 15766 304501 83479 0 2 0x4000000 syz-executor.6 95943 467655 36092 0 3 0x80 fsleep syz-executor.5 95943 223755 36092 0 2 0x4000000 syz-executor.5 95943 379581 36092 0 2 0x4000000 syz-executor.5 98933 67335 99995 0 3 0x80 fsleep syz-executor.7 *98933 340854 99995 0 7 0x4000000 syz-executor.7 5467 233438 82379 0 2 0x480 syz-executor.2 5467 507263 82379 0 3 0x4000080 ttyout syz-executor.2 1799 323628 53765 0 2 0x480 syz-executor.3 1799 269911 53765 0 3 0x4000080 ttyout syz-executor.3 52494 291310 15708 0 2 0 syz-executor.4 52494 412907 15708 0 3 0x4000080 piperd syz-executor.4 52494 345957 15708 0 3 0x4000080 fsleep syz-executor.4 52494 16280 15708 0 2 0x4000000 syz-executor.4 56086 152435 90022 0 2 0x480 syz-executor.0 56086 72801 90022 0 3 0x4000080 bell syz-executor.0 15708 248476 47654 0 2 0x482 syz-executor.4 83479 136839 47654 0 2 0x482 syz-executor.6 53765 136185 47654 0 2 0x482 syz-executor.3 82379 70344 47654 0 2 0x482 syz-executor.2 61472 64799 0 0 3 0x14200 acct acct 36092 372083 47654 0 2 0x482 syz-executor.5 90022 265947 47654 0 2 0x482 syz-executor.0 42722 69726 0 0 3 0x14280 nfsidl nfsio 75411 11380 0 0 3 0x14280 nfsidl nfsio 30714 112911 0 0 3 0x14280 nfsidl nfsio 73875 37223 0 0 3 0x14280 nfsidl nfsio 69213 288787 0 0 3 0x14280 nfsidl nfsio 99309 253160 0 0 3 0x14280 nfsidl nfsio 57326 28639 0 0 3 0x14200 bored sosplice 99995 296984 47654 0 2 0x482 syz-executor.7 583 66645 47654 0 2 0x482 syz-executor.1 47654 381209 26577 0 3 0x82 thrsleep syz-fuzzer 47654 516537 26577 0 2 0x4000482 syz-fuzzer 47654 219967 26577 0 3 0x4000082 thrsleep syz-fuzzer 47654 474746 26577 0 3 0x4000082 thrsleep syz-fuzzer 47654 315522 26577 0 3 0x4000082 thrsleep syz-fuzzer 47654 141175 26577 0 3 0x4000082 kqread syz-fuzzer 47654 184459 26577 0 3 0x4000082 thrsleep syz-fuzzer 47654 379785 26577 0 3 0x4000082 thrsleep syz-fuzzer 47654 115927 26577 0 3 0x4000082 thrsleep syz-fuzzer 26577 316479 80557 0 3 0x10008a sigsusp ksh 80557 196872 58623 0 3 0x9a kqread sshd 81740 203796 1 0 3 0x100083 ttyin getty 58623 326651 1 0 3 0x88 kqread sshd 68634 419592 96398 73 3 0x100090 kqread syslogd 96398 294282 1 0 3 0x100082 netio syslogd 99887 433773 1 0 3 0x100080 kqread resolvd 5260 323645 11972 77 3 0x100092 kqread dhcpleased 58567 189568 11972 77 3 0x100092 kqread dhcpleased 11972 438162 1 0 3 0x80 kqread dhcpleased 89830 106773 0 0 3 0x14200 bored smr 69166 343315 0 0 2 0x14200 zerothread 26897 186585 0 0 3 0x14200 aiodoned aiodoned 46218 457738 0 0 3 0x14200 syncer update 88072 203271 0 0 3 0x14200 cleaner cleaner 89470 152522 0 0 3 0x14200 reaper reaper 75933 149450 0 0 3 0x14200 pgdaemon pagedaemon 36484 507810 0 0 3 0x14200 bored viomb 51465 353083 0 0 3 0x40014200 acpi0 acpi0 19731 397790 0 0 3 0x14200 bored softnet 38097 465570 0 0 3 0x14200 bored systqmp 46897 50375 0 0 3 0x14200 bored systq 50631 417560 0 0 2 0x40014200 softclock 26157 285990 0 0 3 0x40014200 idle0 1 260783 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 10195 6477K 6932K 78643K 18564 0 pcb 13 16K 18K 78643K 753 0 rtable 190 9K 14K 78643K 2671 0 ifaddr 76 18K 21K 78643K 1017 0 sysctl 2 0K 0K 78643K 2 0 counters 25 17K 17K 78643K 94 0 ioctlops 0 0K 4K 78643K 1194 0 iov 0 0K 24K 78643K 987 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1328 83K 84K 78643K 4067 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 77 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 483 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 17 61K 85K 78643K 5345 0 sigio 0 0K 0K 78643K 123 0 proc 60 55K 87K 78643K 1193 0 subproc 104 6K 6K 78643K 351 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 336 0 in_multi 76 5K 6K 78643K 506 0 ether_multi 1 0K 0K 78643K 78 0 mrt 1 0K 0K 78643K 16 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 235 1049K 1049K 78643K 235 0 exec 0 0K 2K 78643K 1633 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 380 313K 331K 78643K 65680 0 UVM aobj 131 7K 7K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 351 0 NDP 9 0K 1K 78643K 135 0 temp 124 4708K 4781K 78643K 43881 0 kqueue 12 18K 26K 78643K 375 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 340 0 337 4 3 1 3 0 8 0 rtentry 112 352 0 277 4 0 4 4 0 8 0 unpcb 136 3481 0 3468 28 27 1 9 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpcb 736 4666 0 4657 105 96 9 21 0 8 8 arp 88 57 0 43 1 0 1 1 0 8 0 ipq 40 10 0 10 3 3 0 1 0 8 0 ipqe 40 29 0 29 3 3 0 1 0 8 0 inpcb 304 7205 0 7197 77 70 7 16 0 8 6 rttmr 72 3 0 3 1 1 0 1 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 4 0 4 1 1 0 1 0 8 0 nd6 48 87 0 69 1 0 1 1 0 8 0 pkpcb 40 13 0 13 4 4 0 1 0 8 0 kcovpl 48 27 0 19 1 0 1 1 0 8 0 ppxss 1152 6 0 6 2 2 0 1 0 8 0 pfstscr 40 24 0 22 1 0 1 1 0 8 0 pfrktable 1344 702 0 694 2 0 2 2 0 8 0 pftag 88 16 0 12 2 1 1 1 0 8 0 pfqueue 264 35 0 35 1 1 0 1 0 8 0 pfstitem 24 18 0 14 1 0 1 1 0 8 0 pfstkey 112 62 0 58 1 0 1 1 0 8 0 pfstate 320 31 0 29 1 0 1 1 0 8 0 pfrule 1360 273 0 175 10 1 9 9 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1675 0 1373 38 14 24 29 0 8 1 art_table 32 1676 0 1373 4 0 4 4 0 8 0 art_node 16 351 0 286 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 7 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 481 0 471 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 8656 0 7214 91 0 91 91 0 8 0 ffsino 240 8656 0 7214 86 0 86 86 0 8 0 nchpl 144 16276 0 14651 62 0 62 62 0 8 0 uvmvnodes 80 4161 0 0 85 0 85 85 0 8 0 vnodes 224 4161 0 0 245 0 245 245 0 8 0 namei 1024 58504 0 58504 2 1 1 2 0 8 1 vcpupl 1984 16 0 0 2 0 2 2 0 8 0 vmpool 528 28 0 12 5 3 2 2 0 8 0 pfiaddrpl 120 206 0 200 2 1 1 1 0 8 0 scsiplug 72 3 0 3 1 1 0 1 0 8 0 scxspl 216 44764 0 44764 13 12 1 8 0 8 1 plimitpl 152 448 0 432 1 0 1 1 0 8 0 sigapl 424 5617 0 5568 8 1 7 8 0 8 0 futexpl 64 49409 0 49402 1 0 1 1 0 8 0 knotepl 120 52185 0 52105 14 10 4 12 0 8 0 kqueuepl 184 1328 0 1320 12 11 1 4 0 8 0 pipepl 304 916 0 887 25 19 6 8 0 8 3 fdescpl 432 5582 0 5554 4 0 4 4 0 8 0 filepl 120 39079 0 38831 58 48 10 17 0 8 2 lockfpl 104 948 0 945 3 2 1 2 0 8 0 lockfspl 48 290 0 287 1 0 1 1 0 8 0 sessionpl 144 42 0 26 1 0 1 1 0 8 0 pgrppl 48 112 0 96 1 0 1 1 0 8 0 ucredpl 96 5476 0 5466 1 0 1 1 0 8 0 zombiepl 144 5568 0 5567 1 0 1 1 0 8 0 processpl 1000 5617 0 5567 8 0 8 8 0 8 0 procpl 672 13370 0 13302 11 4 7 8 0 8 0 sosppl 168 37 0 37 8 8 0 1 0 8 0 sockpl 448 11049 0 11025 179 168 11 30 0 8 8 mcl64k 65536 301 0 301 7 6 1 1 0 8 1 mcl16k 16384 79 0 79 8 7 1 1 0 8 1 mcl12k 12288 213 0 213 7 6 1 1 0 8 1 mcl9k 9216 97 0 97 11 10 1 1 0 8 1 mcl8k 8192 287 0 287 7 6 1 1 0 8 1 mcl4k 4096 525 0 525 3 2 1 1 0 8 1 mcl2k2 2112 38 0 38 12 11 1 1 0 8 1 mcl2k 2048 85687 0 85635 26 10 16 17 0 8 8 mtagpl 96 1157 0 849 15 3 12 12 0 8 0 mbufpl 256 180043 0 179554 77 33 44 51 0 8 0 bufpl 288 12345 0 5940 458 0 458 458 0 8 0 anonpl 24 1499156 0 1479758 175 47 128 138 0 188 0 amapchunkpl 152 180661 0 179851 78 45 33 44 0 158 1 amappl16 200 15197 0 14516 75 37 38 49 0 8 0 amappl15 192 1087 0 1079 1 0 1 1 0 8 0 amappl14 184 616 0 612 1 0 1 1 0 8 0 amappl13 176 1913 0 1908 1 0 1 1 0 8 0 amappl12 168 185 0 177 1 0 1 1 0 8 0 amappl11 160 497 0 486 1 0 1 1 0 8 0 amappl10 152 856 0 851 1 0 1 1 0 8 0 amappl9 144 858 0 854 1 0 1 1 0 8 0 amappl8 136 1020 0 950 3 0 3 3 0 8 0 amappl7 128 210 0 201 1 0 1 1 0 8 0 amappl6 120 661 0 636 2 1 1 2 0 8 0 amappl5 112 4947 0 4932 1 0 1 1 0 8 0 amappl4 104 2290 0 2262 1 0 1 1 0 8 0 amappl3 96 1360 0 1344 1 0 1 1 0 8 0 amappl2 88 2800 0 2744 3 1 2 3 0 8 0 amappl1 80 100445 0 99865 18 5 13 18 0 8 0 amappl 88 64778 0 64514 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 5610 0 5566 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5610 0 5566 1 0 1 1 0 8 0 vmmpekpl 168 41191 0 41140 3 0 3 3 0 8 0 vmmpepl 168 512075 0 509387 231 109 122 157 0 357 0 vmsppl 272 5609 0 5566 4 1 3 3 0 8 0 rwobjpl 24 122604 0 116647 39 2 37 37 0 8 0 pdppl 4096 11226 0 11148 367 287 80 80 0 8 2 pvpl 32 2581973 0 2558174 302 97 205 242 0 265 0 pmappl 216 5609 0 5566 3 0 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1475 0 634 25 0 25 25 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(ffffffff82547276) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bae63,ffffffff825cabcb,568,ffffffff8255b781) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd806d534900,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002e849168,ffff800000bff800,ffff80002e848ec8,ffff80002e848dc8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002e849168,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002e848fc0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8067cbfa08,ffff80002e849168,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8071fac628,ffff80002e849168,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002169bce8,3,ffff80002e849168,0,ffff80002e849260) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002169bce8,ffff80002e849208,ffff80002e849260) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002e8492d0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc1490617c40, 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(ffffffff82547276) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bae63,ffffffff825cabcb,568,ffffffff8255b781) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd806d534900,ffffffc7) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002e849168,ffff800000bff800,ffff80002e848ec8,ffff80002e848dc8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002e849168,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002e848fc0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8067cbfa08,ffff80002e849168,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8071fac628,ffff80002e849168,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002169bce8,3,ffff80002e849168,0,ffff80002e849260) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002169bce8,ffff80002e849208,ffff80002e849260) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002e8492d0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc1490617c40, count: -13