login: 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 *397450 65092 0 0 0 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82574ae4) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825eb323,ffffffff825605fb,568,ffffffff8258ec0b) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8072e72f00,ffffffd3) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021202a90,ffff800000b96e00,ffff8000212027f8,ffff8000212026f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021202a90,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212028f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a960e80,ffff800021202a90,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806ee85560,ffff800021202a90,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4540,3,ffff800021202a90,1,ffff800021202b90) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021202c00) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021202c00) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc5db0, 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(ffffffff82574ae4) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825eb323,ffffffff825605fb,568,ffffffff8258ec0b) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8072e72f00,ffffffd3) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021202a90,ffff800000b96e00,ffff8000212027f8,ffff8000212026f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021202a90,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212028f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a960e80,ffff800021202a90,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806ee85560,ffff800021202a90,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4540,3,ffff800021202a90,1,ffff800021202b90) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021202c00) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021202c00) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc5db0, count: -13 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800021202510 rbx 0xffff800020ce9bff rdx 0x3fd rcx 0 rax 0x94 r8 0x101010101010101 r9 0x8080808080808080 r10 0xdf952527bccbc970 r11 0x17be5e4927f9174e r12 0xffff800020ce9a00 r13 0 r14 0 r15 0x1 rip 0xffffffff812d1e98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021202500 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=397450 stat=onproc flags process=0 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5500,0xffffffff82b00788 process=0xffff8000ffff90a8 user=0xffff8000211fd000, vmspace=0xfffffd800871ae60 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *65092 397450 46278 0 7 0 syz-executor.0 46278 17786 11618 0 3 0x82 nanoslp syz-executor.0 11618 474618 99718 0 3 0x82 kqread syz-execprog 11618 25537 99718 0 3 0x4000082 nanoslp syz-execprog 11618 268158 99718 0 3 0x4000082 thrsleep syz-execprog 11618 103518 99718 0 3 0x4000082 thrsleep syz-execprog 11618 443295 99718 0 3 0x4000082 thrsleep syz-execprog 11618 260456 99718 0 3 0x4000082 nanoslp syz-execprog 11618 149803 99718 0 3 0x4000082 thrsleep syz-execprog 11618 92973 99718 0 3 0x4000082 thrsleep syz-execprog 99718 345547 84583 0 3 0x10008a sigsusp ksh 84583 476180 325 0 3 0x9a poll sshd 43499 348749 1 0 3 0x100083 ttyin getty 325 251577 1 0 3 0x88 poll sshd 55531 248313 73815 74 3 0x100092 bpf pflogd 73815 398072 1 0 3 0x80 netio pflogd 30089 331276 11611 73 3 0x100090 kqread syslogd 11611 174700 1 0 3 0x100082 netio syslogd 46590 107107 1 0 3 0x100080 kqread resolvd 48265 217194 57912 77 3 0x100092 kqread dhcpleased 27544 323406 57912 77 3 0x100092 kqread dhcpleased 57912 37136 1 0 3 0x80 kqread dhcpleased 89401 384145 0 0 3 0x14200 bored smr 28205 337723 0 0 3 0x14200 pgzero zerothread 31893 264091 0 0 3 0x14200 aiodoned aiodoned 62223 237517 0 0 3 0x14200 syncer update 64292 209803 0 0 3 0x14200 cleaner cleaner 2392 305943 0 0 3 0x14200 reaper reaper 36632 27666 0 0 3 0x14200 pgdaemon pagedaemon 74014 319332 0 0 3 0x14200 bored viomb 86567 517636 0 0 3 0x40014200 acpi0 acpi0 1788 252715 0 0 3 0x40014200 idle1 20896 130199 0 0 3 0x14200 bored softnet 88680 360139 0 0 3 0x14200 bored systqmp 86719 333352 0 0 3 0x14200 bored systq 48074 408473 0 0 3 0x40014200 bored softclock 29058 249149 0 0 7 0x40014200 idle0 1 106511 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 65092 (syz-executor.0) thread 0xffff8000ffff4540 (397450) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82ac6568) #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_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] #3 sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 #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 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 23 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 131 14K 15K 78643K 2474 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 3557 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 2 1 0 1 1 0 8 0 pfstkey 112 10 0 2 1 0 1 1 0 8 0 pfstate 320 10 0 2 1 0 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 1451 0 49 88 0 88 88 0 8 0 ffsino 272 1451 0 49 94 0 94 94 0 8 0 nchpl 144 1679 0 59 60 0 60 60 0 8 0 uvmvnodes 80 1462 0 0 30 0 30 30 0 8 0 vnodes 224 1462 0 0 86 0 86 86 0 8 0 namei 1024 5145 0 5145 3 1 2 2 0 8 2 percpumem 16 33 0 0 1 0 1 1 0 8 0 scxspl 216 5401 0 5401 10 9 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 64 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 3 1 2 2 0 8 1 fdescpl 496 333 0 316 4 0 4 4 0 8 1 filepl 152 1350 0 1279 4 0 4 4 0 8 1 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 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 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 57 0 0 8 1 7 8 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 128 0 0 7 0 7 7 0 8 0 bufpl 288 3565 0 146 245 0 245 245 0 8 0 anonpl 24 49061 0 45305 47 2 45 46 0 186 20 amapchunkpl 152 4980 0 4663 22 2 20 20 0 158 6 amappl16 200 137 0 84 5 1 4 4 0 8 0 amappl15 192 83 0 79 1 0 1 1 0 8 0 amappl14 184 1 0 1 1 0 1 1 0 8 1 amappl13 176 49 0 47 2 1 1 1 0 8 0 amappl12 168 18 0 16 2 1 1 1 0 8 0 amappl11 160 46 0 30 1 0 1 1 0 8 0 amappl10 152 22 0 19 1 0 1 1 0 8 0 amappl9 144 441 0 437 1 0 1 1 0 8 0 amappl8 136 429 0 409 1 0 1 1 0 8 0 amappl7 128 86 0 78 1 0 1 1 0 8 0 amappl6 120 191 0 171 2 0 2 2 0 8 1 amappl5 112 163 0 149 1 0 1 1 0 8 0 amappl4 104 701 0 675 2 0 2 2 0 8 1 amappl3 96 144 0 134 1 0 1 1 0 8 0 amappl2 88 470 0 427 3 0 3 3 0 8 1 amappl1 80 9658 0 9234 20 1 19 19 0 8 9 amappl 88 2142 0 2041 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 8044 0 8024 2 0 2 2 0 8 0 vmmpepl 168 31671 0 30542 97 6 91 91 0 357 40 vmsppl 368 332 0 316 3 0 3 3 0 8 1 rwobjpl 56 10776 0 8597 41 0 41 41 0 8 6 pdppl 4096 673 0 632 79 30 49 57 0 8 8 pvpl 32 215854 0 209176 257 7 250 250 0 265 192 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 36 15 0 15 15 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff82952ff0) 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 __mp_lock(ffffffff82ac6360) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82ac6360) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x1f acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffffffff82952ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: 7 ddb{0}> trace x86_ipi_db(ffffffff82952ff0) 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 __mp_lock(ffffffff82ac6360) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82ac6360) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x1f acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffffffff82952ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -8 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(ffffffff82574ae4) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825eb323,ffffffff825605fb,568,ffffffff8258ec0b) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8072e72f00,ffffffd3) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021202a90,ffff800000b96e00,ffff8000212027f8,ffff8000212026f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021202a90,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212028f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a960e80,ffff800021202a90,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806ee85560,ffff800021202a90,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4540,3,ffff800021202a90,1,ffff800021202b90) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021202c00) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021202c00) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc5db0, count: 2 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82574ae4) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825eb323,ffffffff825605fb,568,ffffffff8258ec0b) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8072e72f00,ffffffd3) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021202a90,ffff800000b96e00,ffff8000212027f8,ffff8000212026f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021202a90,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212028f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a960e80,ffff800021202a90,1,fffffd807f7d8900) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806ee85560,ffff800021202a90,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff4540,3,ffff800021202a90,1,ffff800021202b90) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff4540,ffff800021202b38,ffff800021202b90) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021202c00) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021202c00) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc5db0, count: -13 ddb{1}>