panic: kernel diagnostic assertion "len >= 0 && !M_READONLY(m)" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/uipc_mbuf.c", line 1384 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *443229 21185 0 0 0 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82572ea9) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825e9d35,ffffffff8255b72b,568,ffffffff82589a8e) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807f00e600,ffffffbe) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000211fdf08,ffff800000ba4800,ffff8000211fdbe8,ffff8000211fdae8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff8000211fdf08,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000211fdce0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8069d85e88,ffff8000211fdf08,1,fffffd807f7d8840) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e535e50,ffff8000211fdf08,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4000,3,ffff8000211fdf08,1,ffff8000211fe010) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys_pwritev sys/kern/vfs_syscalls.c:3383 [inline] sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys/kern/vfs_syscalls.c:3439 syscall(ffff8000211fe080) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211fe080) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcb730, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: kernel diagnostic assertion "len >= 0 && !M_READONLY(m)" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/uipc_mbuf.c", line 1384 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82572ea9) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825e9d35,ffffffff8255b72b,568,ffffffff82589a8e) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807f00e600,ffffffbe) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000211fdf08,ffff800000ba4800,ffff8000211fdbe8,ffff8000211fdae8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff8000211fdf08,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000211fdce0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8069d85e88,ffff8000211fdf08,1,fffffd807f7d8840) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e535e50,ffff8000211fdf08,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4000,3,ffff8000211fdf08,1,ffff8000211fe010) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys_pwritev sys/kern/vfs_syscalls.c:3383 [inline] sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys/kern/vfs_syscalls.c:3439 syscall(ffff8000211fe080) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211fe080) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcb730, count: -13 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000211fd900 rbx 0xffff800020ce9bff rdx 0x3fd rcx 0 rax 0x94 r8 0x101010101010101 r9 0x8080808080808080 r10 0x91fc3275cc5cc079 r11 0x372e61b8ea2935d0 r12 0xffff800020ce9a00 r13 0 r14 0 r15 0x1 rip 0xffffffff824d4738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000211fd8f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=443229 stat=onproc flags process=0 proc=0 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5ce0,0xffffffff82b60628 process=0xffff8000ffff98f8 user=0xffff8000211f9000, vmspace=0xfffffd807efffcf0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *21185 443229 86554 0 7 0 syz-executor.0 86554 312330 92206 0 3 0x82 nanoslp syz-executor.0 92206 69080 27475 0 3 0x82 nanoslp syz-execprog 92206 237741 27475 0 3 0x4000082 nanoslp syz-execprog 92206 216183 27475 0 3 0x4000082 thrsleep syz-execprog 92206 195328 27475 0 3 0x4000082 thrsleep syz-execprog 92206 385586 27475 0 3 0x4000082 thrsleep syz-execprog 92206 90973 27475 0 3 0x4000082 thrsleep syz-execprog 92206 200319 27475 0 3 0x4000082 kqread syz-execprog 92206 444753 27475 0 3 0x4000082 thrsleep syz-execprog 27475 141563 24701 0 3 0x10008a sigsusp ksh 24701 372043 3033 0 3 0x9a poll sshd 89724 398671 1 0 3 0x100083 ttyin getty 3033 384379 1 0 3 0x88 poll sshd 59064 428354 93645 74 3 0x100092 bpf pflogd 93645 334980 1 0 3 0x80 netio pflogd 20506 14063 16783 73 3 0x100090 kqread syslogd 16783 43646 1 0 3 0x100082 netio syslogd 90566 449667 1 0 3 0x100080 kqread resolvd 47533 375004 38391 77 3 0x100092 kqread dhcpleased 99845 325418 38391 77 3 0x100092 kqread dhcpleased 38391 229334 1 0 3 0x80 kqread dhcpleased 38228 262311 0 0 3 0x14200 bored smr 7457 153111 0 0 3 0x14200 pgzero zerothread 4325 56056 0 0 3 0x14200 aiodoned aiodoned 21611 315902 0 0 3 0x14200 syncer update 6771 373686 0 0 3 0x14200 cleaner cleaner 70674 182353 0 0 3 0x14200 reaper reaper 25253 27424 0 0 3 0x14200 pgdaemon pagedaemon 66968 298013 0 0 3 0x14200 bored viomb 76206 304071 0 0 3 0x40014200 acpi0 acpi0 76871 114236 0 0 3 0x40014200 idle1 44867 381577 0 0 3 0x14200 bored softnet 93431 114608 0 0 3 0x14200 bored systqmp 22361 464147 0 0 3 0x14200 bored systq 82774 104610 0 0 3 0x40014200 bored softclock 49407 99818 0 0 7 0x40014200 idle0 1 37991 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 21185 (syz-executor.0) thread 0xffff8000ffff4000 (443229) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82b5a628) #0 witness_lock+0x44d #1 vn_write+0x42 sys/kern/vfs_vnops.c:399 #2 dofilewritev+0x19c sys/kern/sys_generic.c:380 #3 sys_pad_pwritev+0xb9 sys_pwritev sys/kern/vfs_syscalls.c:3383 [inline] #3 sys_pad_pwritev+0xb9 sys/kern/vfs_syscalls.c:3439 #4 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #4 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #5 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10157 6522K 6522K 78643K 11247 0 pcb 13 8K 8K 78643K 13 0 rtable 84 2K 3K 78643K 142 0 ifaddr 37 9K 9K 78643K 40 0 counters 42 33K 33K 78643K 42 0 ioctlops 0 0K 4K 78643K 1480 0 iov 1 12K 12K 78643K 1 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1168 73K 73K 78643K 1181 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 4 9K 13K 78643K 20 0 proc 67 87K 99K 78643K 310 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 22 1K 1K 78643K 22 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 25 122K 122K 78643K 25 0 exec 0 0K 2K 78643K 481 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 135 15K 15K 78643K 2457 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 7 0K 0K 78643K 7 0 temp 29 4682K 4745K 78643K 3520 0 kqueue 10 14K 14K 78643K 10 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 19 0 16 1 0 1 1 0 8 0 rtentry 112 34 0 1 1 0 1 1 0 8 0 unpcb 136 35 0 20 1 0 1 1 0 8 0 syncache 296 5 0 5 2 1 1 1 0 8 1 tcpcb 736 8 0 5 1 0 1 1 0 8 0 arp 120 4 0 0 1 0 1 1 0 8 0 inpcb 304 36 0 30 1 0 1 1 0 8 0 nd6 48 3 0 0 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 10 0 6 2 1 1 1 0 8 0 pfstkey 112 10 0 6 2 1 1 1 0 8 0 pfstate 320 10 0 6 2 1 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 145 0 0 10 0 10 10 0 8 0 art_table 32 146 0 0 2 0 2 2 0 8 0 art_node 16 33 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1452 0 49 88 0 88 88 0 8 0 ffsino 272 1452 0 49 94 0 94 94 0 8 0 nchpl 144 1680 0 59 61 0 61 61 0 8 0 uvmvnodes 80 1463 0 0 30 0 30 30 0 8 0 vnodes 224 1463 0 0 87 0 87 87 0 8 0 namei 1024 5146 0 5146 3 1 2 2 0 8 2 percpumem 16 33 0 0 1 0 1 1 0 8 0 scxspl 216 5475 0 5475 45 44 1 8 0 8 1 plimitpl 152 17 0 9 1 0 1 1 0 8 0 sigapl 424 347 0 316 5 0 5 5 0 8 1 knotepl 112 50 0 0 2 0 2 2 0 8 0 kqueuepl 216 6 0 0 1 0 1 1 0 8 0 pipepl 336 106 0 99 2 1 1 1 0 8 0 fdescpl 496 333 0 316 4 0 4 4 0 8 1 filepl 152 1351 0 1280 4 0 4 4 0 8 1 lockfpl 104 8 0 6 1 0 1 1 0 8 0 lockfspl 48 5 0 3 1 0 1 1 0 8 0 sessionpl 144 19 0 9 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 69 0 57 1 0 1 1 0 8 0 zombiepl 144 316 0 316 2 1 1 1 0 8 1 processpl 1064 347 0 316 3 0 3 3 0 8 0 procpl 672 354 0 316 4 0 4 4 0 8 0 sockpl 480 90 0 66 5 1 4 4 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 75 0 0 10 0 10 10 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 138 0 0 8 0 8 8 0 8 0 bufpl 288 3567 0 147 245 0 245 245 0 8 0 anonpl 24 48870 0 45125 52 6 46 46 0 186 20 amapchunkpl 152 4991 0 4674 21 1 20 20 0 158 6 amappl16 200 137 0 82 5 1 4 4 0 8 0 amappl15 192 83 0 79 1 0 1 1 0 8 0 amappl14 184 2 0 1 1 0 1 1 0 8 0 amappl13 176 49 0 47 2 1 1 1 0 8 0 amappl12 168 23 0 21 2 1 1 1 0 8 0 amappl11 160 45 0 31 1 0 1 1 0 8 0 amappl10 152 22 0 19 1 0 1 1 0 8 0 amappl9 144 436 0 434 1 0 1 1 0 8 0 amappl8 136 435 0 415 1 0 1 1 0 8 0 amappl7 128 85 0 78 1 0 1 1 0 8 0 amappl6 120 188 0 169 2 0 2 2 0 8 0 amappl5 112 164 0 151 1 0 1 1 0 8 0 amappl4 104 700 0 674 2 0 2 2 0 8 1 amappl3 96 146 0 134 1 0 1 1 0 8 0 amappl2 88 471 0 426 3 0 3 3 0 8 1 amappl1 80 9687 0 9259 21 2 19 19 0 8 9 amappl 88 2123 0 2020 4 0 4 4 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 333 0 316 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 333 0 316 1 0 1 1 0 8 0 vmmpekpl 168 8024 0 8005 2 0 2 2 0 8 0 vmmpepl 168 31684 0 30555 95 4 91 91 0 357 41 vmsppl 368 332 0 316 3 0 3 3 0 8 1 rwobjpl 56 10800 0 8615 41 0 41 41 0 8 6 pdppl 4096 673 0 632 77 20 57 57 0 8 16 pvpl 32 215720 0 209036 269 7 262 262 0 265 205 pmappl 248 332 0 316 2 0 2 2 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 552 0 25 16 0 16 16 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff82994ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffffffff82994ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: 10 ddb{0}> trace x86_ipi_db(ffffffff82994ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffffffff82994ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -5 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82572ea9) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825e9d35,ffffffff8255b72b,568,ffffffff82589a8e) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807f00e600,ffffffbe) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000211fdf08,ffff800000ba4800,ffff8000211fdbe8,ffff8000211fdae8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff8000211fdf08,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000211fdce0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8069d85e88,ffff8000211fdf08,1,fffffd807f7d8840) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e535e50,ffff8000211fdf08,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4000,3,ffff8000211fdf08,1,ffff8000211fe010) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys_pwritev sys/kern/vfs_syscalls.c:3383 [inline] sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys/kern/vfs_syscalls.c:3439 syscall(ffff8000211fe080) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211fe080) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcb730, count: 2 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82572ea9) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825e9d35,ffffffff8255b72b,568,ffffffff82589a8e) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd807f00e600,ffffffbe) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000211fdf08,ffff800000ba4800,ffff8000211fdbe8,ffff8000211fdae8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff8000211fdf08,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000211fdce0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8069d85e88,ffff8000211fdf08,1,fffffd807f7d8840) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e535e50,ffff8000211fdf08,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4000,3,ffff8000211fdf08,1,ffff8000211fe010) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys_pwritev sys/kern/vfs_syscalls.c:3383 [inline] sys_pad_pwritev(ffff8000ffff4000,ffff8000211fdfb8,ffff8000211fe010) at sys_pad_pwritev+0xb9 sys/kern/vfs_syscalls.c:3439 syscall(ffff8000211fe080) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000211fe080) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcb730, count: -13