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 *519612 46693 0 0 0x4000000 0 syz-executor.2 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254c243) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc0e6,ffffffff825cea0d,568,ffffffff8255f800) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8074590a00,ffffffbc) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002d5b3cb8,ffff800000bb0000,ffff80002d5b3a18,ffff80002d5b3918) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002d5b3cb8,1) at bpfwrite+0x128 sys/net/bpf.c:648 spec_write(ffff80002d5b3b10) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80740bd598,ffff80002d5b3cb8,1,fffffd807f7d8a20) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807e9e0d38,ffff80002d5b3cb8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000230c9a48,3,ffff80002d5b3cb8,0,ffff80002d5b3db0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff8000230c9a48,ffff80002d5b3d58,ffff80002d5b3db0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002d5b3e20) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf306c5e3990, 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(ffffffff8254c243) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc0e6,ffffffff825cea0d,568,ffffffff8255f800) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8074590a00,ffffffbc) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002d5b3cb8,ffff800000bb0000,ffff80002d5b3a18,ffff80002d5b3918) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002d5b3cb8,1) at bpfwrite+0x128 sys/net/bpf.c:648 spec_write(ffff80002d5b3b10) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80740bd598,ffff80002d5b3cb8,1,fffffd807f7d8a20) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807e9e0d38,ffff80002d5b3cb8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000230c9a48,3,ffff80002d5b3cb8,0,ffff80002d5b3db0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff8000230c9a48,ffff80002d5b3d58,ffff80002d5b3db0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002d5b3e20) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf306c5e3990, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002d5b3740 rbx 0 rdx 0xffff800000bb3c00 rcx 0 rax 0xffff8000230c9a48 r8 0 r9 0x8080808080808080 r10 0x8956b85b02fab802 r11 0x68ee1b1e8f65e0ca r12 0 r13 0xffffffbc r14 0 r15 0x1 rip 0xffffffff811d4e78 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002d5b3730 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.2) pid=519612 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=55, nice=20 forw=0xffffffffffffffff, list=0xffff8000230c9268,0xffffffff829d93e0 process=0xffff80002995d3b0 user=0xffff80002d5ae000, vmspace=0xfffffd806c058ab0 estcpu=5, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 46693 83851 52809 0 2 0 syz-executor.2 *46693 519612 52809 0 7 0x4000000 syz-executor.2 41060 505175 19582 0 2 0 syz-executor.0 97661 353822 55358 0 2 0 syz-executor.4 97661 292435 55358 0 2 0x4000000 syz-executor.4 97661 445925 55358 0 2 0x4000000 syz-executor.4 6084 228219 46326 0 2 0 syz-executor.6 6084 161748 46326 0 3 0x4000080 fsleep syz-executor.6 69579 510003 17491 0 3 0x3000 suspend syz-executor.5 69579 200679 17491 0 2 0x4081000 syz-executor.5 17491 200089 79604 0 2 0x482 syz-executor.5 97806 294403 79604 0 2 0x2 syz-executor.7 46326 285730 79604 0 2 0x482 syz-executor.6 55358 438149 79604 0 2 0x482 syz-executor.4 26032 366788 79604 0 2 0x2 syz-executor.1 24342 374487 79604 0 2 0x482 syz-executor.3 19582 235260 79604 0 2 0x2 syz-executor.0 52809 234509 79604 0 2 0x482 syz-executor.2 79604 463541 61655 0 3 0x82 thrsleep syz-fuzzer 79604 240109 61655 0 2 0x4000482 syz-fuzzer 79604 406168 61655 0 3 0x4000082 kqread syz-fuzzer 79604 406787 61655 0 3 0x4000082 thrsleep syz-fuzzer 79604 84991 61655 0 3 0x4000082 thrsleep syz-fuzzer 79604 523042 61655 0 3 0x4000082 thrsleep syz-fuzzer 79604 89169 61655 0 3 0x4000082 thrsleep syz-fuzzer 79604 90158 61655 0 3 0x4000082 thrsleep syz-fuzzer 61655 465188 29382 0 3 0x10008a sigsusp ksh 29382 381361 13096 0 3 0x9a kqread sshd 65793 249251 1 0 3 0x100083 ttyin getty 13096 255555 1 0 3 0x88 kqread sshd 17843 492106 69498 73 3 0x100090 kqread syslogd 69498 199990 1 0 3 0x100082 netio syslogd 60833 382738 1 0 3 0x100080 kqread resolvd 16537 42283 52944 77 3 0x100092 kqread dhcpleased 92189 961 52944 77 3 0x100092 kqread dhcpleased 52944 402717 1 0 3 0x80 kqread dhcpleased 3440 365004 0 0 3 0x14200 bored smr 37041 103031 0 0 2 0x14200 zerothread 83506 3292 0 0 3 0x14200 aiodoned aiodoned 15623 162138 0 0 3 0x14200 syncer update 4178 278601 0 0 3 0x14200 cleaner cleaner 17156 413463 0 0 3 0x14200 reaper reaper 98158 20218 0 0 3 0x14200 pgdaemon pagedaemon 52855 112394 0 0 3 0x14200 bored viomb 85860 289624 0 0 3 0x40014200 acpi0 acpi0 27799 404160 0 0 3 0x14200 bored softnet 20904 316140 0 0 3 0x14200 bored systqmp 55504 320104 0 0 3 0x14200 bored systq 98772 476336 0 0 2 0x40014200 softclock 66270 27224 0 0 3 0x40014200 idle0 1 354527 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 10168 6537K 6537K 78643K 11333 0 pcb 13 9K 9K 78643K 32 0 rtable 238 6K 7K 78643K 362 0 ifaddr 82 17K 17K 78643K 98 0 counters 27 17K 17K 78643K 30 0 ioctlops 0 0K 2K 78643K 41 0 iov 0 0K 14K 78643K 41 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1272 79K 80K 78643K 1333 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 12 0K 0K 78643K 15 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 15 53K 73K 78643K 240 0 sigio 0 0K 0K 78643K 4 0 proc 56 54K 79K 78643K 451 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 47 0 in_multi 99 6K 6K 78643K 99 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 43 201K 201K 78643K 43 0 exec 0 0K 2K 78643K 628 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 268 79K 94K 78643K 4205 0 UVM aobj 14 2K 2K 78643K 14 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 11 0K 2K 78643K 30 0 temp 125 4695K 4759K 78643K 4523 0 kqueue 12 18K 20K 78643K 26 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 47 0 44 1 0 1 1 0 8 0 rtentry 112 111 0 1 4 0 4 4 0 8 0 unpcb 136 127 0 109 3 0 3 3 0 8 2 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 97 0 97 1 1 0 1 0 8 0 tcpcb 736 39 0 25 2 0 2 2 0 8 0 arp 88 18 0 0 1 0 1 1 0 8 0 inpcb 304 140 0 131 5 3 2 4 0 8 1 nd6 48 24 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 452 0 0 29 0 29 29 0 8 0 art_table 32 453 0 0 4 0 4 4 0 8 0 art_node 16 110 0 10 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 12 0 2 1 0 1 1 0 8 0 shmpl 112 11 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1635 0 206 90 0 90 90 0 8 0 ffsino 240 1635 0 206 85 0 85 85 0 8 0 nchpl 144 2032 0 373 62 0 62 62 0 8 0 uvmvnodes 80 1763 0 0 36 0 36 36 0 8 0 vnodes 224 1763 0 0 104 0 104 104 0 8 0 namei 1024 6728 0 6727 2 1 1 2 0 8 0 scxspl 216 6085 0 6085 9 1 8 8 0 8 8 plimitpl 152 22 0 8 1 0 1 1 0 8 0 sigapl 424 525 0 486 5 0 5 5 0 8 0 futexpl 64 1349 0 1348 1 0 1 1 0 8 0 knotepl 120 9160 0 9080 3 0 3 3 0 8 0 kqueuepl 184 31 0 23 1 0 1 1 0 8 0 pipepl 304 142 0 114 3 0 3 3 0 8 0 fdescpl 432 512 0 486 4 0 4 4 0 8 0 filepl 120 2134 0 1889 10 0 10 10 0 8 2 lockfpl 104 16 0 12 1 0 1 1 0 8 0 lockfspl 48 10 0 6 1 0 1 1 0 8 0 sessionpl 144 23 0 7 1 0 1 1 0 8 0 pgrppl 48 23 0 7 1 0 1 1 0 8 0 ucredpl 96 197 0 187 1 0 1 1 0 8 0 zombiepl 144 487 0 485 1 0 1 1 0 8 0 processpl 1000 525 0 485 6 0 6 6 0 8 0 procpl 672 766 0 714 7 0 7 7 0 8 2 sockpl 448 314 0 284 13 2 11 11 0 8 7 mcl64k 65536 8 0 8 2 1 1 1 0 8 1 mcl16k 16384 4 0 4 1 0 1 1 0 8 1 mcl12k 12288 5 0 5 2 1 1 1 0 8 1 mcl8k 8192 17 0 17 2 1 1 1 0 8 1 mcl4k 4096 23 0 23 1 0 1 1 0 8 1 mcl2k 2048 75359 0 75309 13 5 8 11 0 8 0 mtagpl 96 7 0 4 2 1 1 1 0 8 0 mbufpl 256 121220 0 120943 21 1 20 20 0 8 0 bufpl 288 3699 0 140 255 0 255 255 0 8 0 anonpl 24 110216 0 93097 135 1 134 134 0 188 25 amapchunkpl 152 9772 0 9056 41 1 40 40 0 158 9 amappl16 200 1593 0 1024 43 5 38 42 0 8 6 amappl15 192 104 0 99 1 0 1 1 0 8 0 amappl14 184 38 0 32 1 0 1 1 0 8 0 amappl13 176 151 0 142 1 0 1 1 0 8 0 amappl12 168 14 0 9 1 0 1 1 0 8 0 amappl11 160 45 0 35 1 0 1 1 0 8 0 amappl10 152 20 0 18 1 0 1 1 0 8 0 amappl9 144 466 0 462 1 0 1 1 0 8 0 amappl8 136 587 0 539 2 0 2 2 0 8 0 amappl7 128 141 0 127 1 0 1 1 0 8 0 amappl6 120 202 0 184 2 1 1 2 0 8 0 amappl5 112 263 0 252 1 0 1 1 0 8 0 amappl4 104 806 0 781 2 1 1 2 0 8 0 amappl3 96 221 0 206 1 0 1 1 0 8 0 amappl2 88 581 0 534 3 1 2 3 0 8 0 amappl1 80 12381 0 11854 18 5 13 18 0 8 0 amappl 88 3777 0 3568 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 13 0 0 1 0 1 1 0 8 0 uaddrrnd 24 512 0 486 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 512 0 486 1 0 1 1 0 8 0 vmmpekpl 168 8601 0 8565 2 0 2 2 0 8 0 vmmpepl 168 52882 0 50583 128 4 124 124 0 357 23 vmsppl 272 511 0 486 4 2 2 3 0 8 0 rwobjpl 24 15817 0 12579 21 0 21 21 0 8 0 pdppl 4096 1030 0 972 108 48 60 68 0 8 2 pvpl 32 312964 0 291905 258 13 245 258 0 265 65 pmappl 216 511 0 486 2 0 2 2 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 635 0 63 17 0 17 17 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(ffffffff8254c243) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc0e6,ffffffff825cea0d,568,ffffffff8255f800) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8074590a00,ffffffbc) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002d5b3cb8,ffff800000bb0000,ffff80002d5b3a18,ffff80002d5b3918) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002d5b3cb8,1) at bpfwrite+0x128 sys/net/bpf.c:648 spec_write(ffff80002d5b3b10) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80740bd598,ffff80002d5b3cb8,1,fffffd807f7d8a20) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807e9e0d38,ffff80002d5b3cb8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000230c9a48,3,ffff80002d5b3cb8,0,ffff80002d5b3db0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff8000230c9a48,ffff80002d5b3d58,ffff80002d5b3db0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002d5b3e20) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf306c5e3990, 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(ffffffff8254c243) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc0e6,ffffffff825cea0d,568,ffffffff8255f800) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8074590a00,ffffffbc) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002d5b3cb8,ffff800000bb0000,ffff80002d5b3a18,ffff80002d5b3918) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002d5b3cb8,1) at bpfwrite+0x128 sys/net/bpf.c:648 spec_write(ffff80002d5b3b10) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80740bd598,ffff80002d5b3cb8,1,fffffd807f7d8a20) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd807e9e0d38,ffff80002d5b3cb8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000230c9a48,3,ffff80002d5b3cb8,0,ffff80002d5b3db0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff8000230c9a48,ffff80002d5b3d58,ffff80002d5b3db0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff80002d5b3e20) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf306c5e3990, count: -13