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 371023 70867 0 0 0 0 syz-executor.0 *370516 70867 0 0 0x4000000 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(fffffd806f2e1600,ffffffc5) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021204690,ffff800000ba4000,ffff8000212043f8,ffff8000212042f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021204690,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212044f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a964be0,ffff800021204690,1,fffffd807f7d8a80) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e534e50,ffff800021204690,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff6540,3,ffff800021204690,1,ffff800021204790) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021204800) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021204800) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x26956738ad0, 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(fffffd806f2e1600,ffffffc5) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021204690,ffff800000ba4000,ffff8000212043f8,ffff8000212042f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021204690,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212044f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a964be0,ffff800021204690,1,fffffd807f7d8a80) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e534e50,ffff800021204690,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff6540,3,ffff800021204690,1,ffff800021204790) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021204800) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021204800) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x26956738ad0, count: -13 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800021204110 rbx 0xffff800020ce9bff rdx 0x3fd rcx 0 rax 0x94 r8 0x101010101010101 r9 0x8080808080808080 r10 0x17ffe1dc0e6303cd r11 0x921269a3e7d0a8fb r12 0xffff800020ce9a00 r13 0 r14 0 r15 0x1 rip 0xffffffff812d1e98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021204100 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=370516 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff67e0,0xffffffff82b00788 process=0xffff8000ffff8008 user=0xffff8000211ff000, vmspace=0xfffffd800871a450 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 70867 371023 622 0 7 0 syz-executor.0 *70867 370516 622 0 7 0x4000000 syz-executor.0 622 383275 925 0 3 0x82 nanoslp syz-executor.0 925 451377 97589 0 3 0x82 thrsleep syz-execprog 925 240038 97589 0 3 0x4000082 nanoslp syz-execprog 925 121277 97589 0 3 0x4000082 thrsleep syz-execprog 925 75962 97589 0 3 0x4000082 nanoslp syz-execprog 925 420919 97589 0 3 0x4000082 thrsleep syz-execprog 925 362924 97589 0 3 0x4000082 thrsleep syz-execprog 925 83485 97589 0 3 0x4000082 thrsleep syz-execprog 925 82179 97589 0 3 0x4000082 kqread syz-execprog 925 258085 97589 0 3 0x4000082 thrsleep syz-execprog 97589 113512 25578 0 3 0x10008a sigsusp ksh 25578 182779 75965 0 3 0x9a poll sshd 97542 281352 1 0 3 0x100083 ttyin getty 75965 349727 1 0 3 0x88 poll sshd 86274 477726 69915 74 3 0x100092 bpf pflogd 69915 84823 1 0 3 0x80 netio pflogd 25412 413556 72343 73 3 0x100090 kqread syslogd 72343 470272 1 0 3 0x100082 netio syslogd 48789 184045 1 0 3 0x100080 kqread resolvd 74588 140931 12895 77 3 0x100092 kqread dhcpleased 56701 512227 12895 77 3 0x100092 kqread dhcpleased 12895 219634 1 0 3 0x80 kqread dhcpleased 87070 92338 0 0 3 0x14200 bored smr 67285 292136 0 0 2 0x14200 zerothread 32870 157306 0 0 3 0x14200 aiodoned aiodoned 62107 275194 0 0 3 0x14200 syncer update 66488 494866 0 0 3 0x14200 cleaner cleaner 34109 183525 0 0 3 0x14200 reaper reaper 24006 363874 0 0 3 0x14200 pgdaemon pagedaemon 33632 3206 0 0 3 0x14200 bored viomb 96972 197009 0 0 3 0x40014200 acpi0 acpi0 98811 517573 0 0 3 0x40014200 idle1 74736 420634 0 0 3 0x14200 bored softnet 14376 91968 0 0 3 0x14200 bored systqmp 11225 18728 0 0 3 0x14200 bored systq 20510 63620 0 0 3 0x40014200 bored softclock 47195 280129 0 0 3 0x40014200 idle0 1 451534 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 70867 (syz-executor.0) thread 0xffff8000ffff6540 (370516) 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 21 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 143 15K 15K 78643K 2473 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 3591 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 11 0 2 1 0 1 1 0 8 0 pfstkey 112 11 0 2 1 0 1 1 0 8 0 pfstate 320 11 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 144 0 0 9 0 9 9 0 8 0 art_table 32 145 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 5404 0 5404 10 8 2 8 0 8 2 plimitpl 152 17 0 9 1 0 1 1 0 8 0 sigapl 424 347 0 316 5 0 5 5 0 8 1 futexpl 64 1 0 1 1 0 1 1 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 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 356 0 316 4 0 4 4 0 8 0 sockpl 480 90 0 66 5 1 4 4 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 62 0 0 8 1 7 8 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 120 0 0 7 0 7 7 0 8 0 bufpl 288 3566 0 146 245 0 245 245 0 8 0 anonpl 24 49123 0 45178 50 4 46 46 0 186 21 amapchunkpl 152 4935 0 4597 20 0 20 20 0 158 6 amappl16 200 145 0 87 6 1 5 5 0 8 0 amappl15 192 85 0 80 1 0 1 1 0 8 0 amappl14 184 4 0 3 1 0 1 1 0 8 0 amappl13 176 51 0 48 2 1 1 1 0 8 0 amappl12 168 7 0 6 2 1 1 1 0 8 0 amappl11 160 49 0 34 1 0 1 1 0 8 0 amappl10 152 23 0 20 1 0 1 1 0 8 0 amappl9 144 439 0 436 1 0 1 1 0 8 0 amappl8 136 435 0 410 2 0 2 2 0 8 0 amappl7 128 94 0 84 1 0 1 1 0 8 0 amappl6 120 182 0 164 2 0 2 2 0 8 1 amappl5 112 162 0 149 1 0 1 1 0 8 0 amappl4 104 700 0 679 2 0 2 2 0 8 1 amappl3 96 145 0 135 1 0 1 1 0 8 0 amappl2 88 481 0 437 3 0 3 3 0 8 1 amappl1 80 9675 0 9246 20 2 18 18 0 8 9 amappl 88 2139 0 2027 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 8047 0 8027 2 0 2 2 0 8 0 vmmpepl 168 31840 0 30674 96 5 91 91 0 357 40 vmsppl 368 332 0 316 3 0 3 3 0 8 1 rwobjpl 56 10812 0 8614 41 0 41 41 0 8 6 pdppl 4096 673 0 632 77 20 57 57 0 8 16 pvpl 32 216096 0 209205 268 7 261 261 0 265 201 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 548 0 26 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 end of kernel end trace frame: 0x7f7ffffcfe00, count: 9 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 end of kernel end trace frame: 0x7f7ffffcfe00, count: -6 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(fffffd806f2e1600,ffffffc5) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021204690,ffff800000ba4000,ffff8000212043f8,ffff8000212042f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021204690,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212044f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a964be0,ffff800021204690,1,fffffd807f7d8a80) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e534e50,ffff800021204690,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff6540,3,ffff800021204690,1,ffff800021204790) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021204800) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021204800) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x26956738ad0, 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(fffffd806f2e1600,ffffffc5) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800021204690,ffff800000ba4000,ffff8000212043f8,ffff8000212042f8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800021204690,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff8000212044f0) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a964be0,ffff800021204690,1,fffffd807f7d8a80) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806e534e50,ffff800021204690,1) at vn_write+0x1a1 sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000ffff6540,3,ffff800021204690,1,ffff800021204790) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000ffff6540,ffff800021204738,ffff800021204790) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800021204800) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021204800) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x26956738ad0, count: -13 ddb{1}>