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 *461008 76867 0 0 0 0K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82579a90) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825ec6cc,ffffffff82560ab1,568,ffffffff8258f284) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd806d18bf00,ffffffd8) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000212221b8,ffff800000ba5800,ffff800021221f18,ffff800021221e18) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff8000212221b8,1) at bpfwrite+0x169 sys/net/bpf.c:644 spec_write(ffff800021222010) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a97fcc0,ffff8000212221b8,1,fffffd807f7d8840) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806ee8eee0,ffff8000212221b8,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002117fa40,3,ffff8000212221b8,0,ffff8000212222b0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002117fa40,ffff800021222258,ffff8000212222b0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800021222320) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021222320) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffda0d0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "len >= 0 && !M_READONLY(m)" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/uipc_mbuf.c", line 1384 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82579a90) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825ec6cc,ffffffff82560ab1,568,ffffffff8258f284) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd806d18bf00,ffffffd8) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000212221b8,ffff800000ba5800,ffff800021221f18,ffff800021221e18) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff8000212221b8,1) at bpfwrite+0x169 sys/net/bpf.c:644 spec_write(ffff800021222010) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a97fcc0,ffff8000212221b8,1,fffffd807f7d8840) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806ee8eee0,ffff8000212221b8,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002117fa40,3,ffff8000212221b8,0,ffff8000212222b0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002117fa40,ffff800021222258,ffff8000212222b0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800021222320) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021222320) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffda0d0, count: -13 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800021221c30 rbx 0xffffffff828ecbff cpu_info_full_primary+0x2bff rdx 0x3fd rcx 0 rax 0x94 r8 0x101010101010101 r9 0x8080808080808080 r10 0xf438738fe98bdd8a r11 0x420a457ad6ef2cfd r12 0xffffffff828eca00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff82237da8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021221c20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=461008 stat=onproc flags process=0 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff80002117efc0,0xffffffff82af1e70 process=0xffff8000ffffa998 user=0xffff80002121d000, vmspace=0xfffffd807effe170 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *76867 461008 35022 0 7 0 syz-executor.0 35022 483890 40648 0 3 0x82 nanoslp syz-executor.0 40648 475655 93427 0 3 0x82 thrsleep syz-execprog 40648 295286 93427 0 3 0x4000082 nanoslp syz-execprog 40648 181005 93427 0 3 0x4000082 thrsleep syz-execprog 40648 146324 93427 0 3 0x4000082 thrsleep syz-execprog 40648 221204 93427 0 3 0x4000082 thrsleep syz-execprog 40648 43414 93427 0 3 0x4000082 kqread syz-execprog 40648 12190 93427 0 3 0x4000082 nanoslp syz-execprog 40648 336307 93427 0 3 0x4000082 thrsleep syz-execprog 40648 423255 93427 0 3 0x4000082 thrsleep syz-execprog 93427 345247 62554 0 3 0x10008a sigsusp ksh 62554 292549 64296 0 3 0x9a kqread sshd 30353 356292 1 0 3 0x100083 ttyin getty 64296 194040 1 0 3 0x88 kqread sshd 71028 91678 64739 74 3 0x100092 bpf pflogd 64739 53861 1 0 3 0x80 netio pflogd 73706 445760 68314 73 3 0x100090 kqread syslogd 68314 73110 1 0 3 0x100082 netio syslogd 10423 200274 1 0 3 0x100080 kqread resolvd 82570 40094 16919 77 3 0x100092 kqread dhcpleased 47467 400333 16919 77 3 0x100092 kqread dhcpleased 16919 176281 1 0 3 0x80 kqread dhcpleased 37944 513673 0 0 3 0x14200 bored smr 60495 441874 0 0 3 0x14200 pgzero zerothread 71560 485853 0 0 3 0x14200 aiodoned aiodoned 81292 241414 0 0 3 0x14200 syncer update 7501 11826 0 0 3 0x14200 cleaner cleaner 46357 109891 0 0 3 0x14200 reaper reaper 22565 258476 0 0 3 0x14200 pgdaemon pagedaemon 53946 73429 0 0 3 0x14200 bored viomb 1868 281327 0 0 3 0x40014200 acpi0 acpi0 23161 492915 0 0 7 0x40014200 idle1 66532 25174 0 0 3 0x14200 bored softnet 24066 282312 0 0 3 0x14200 bored systqmp 10099 383972 0 0 3 0x14200 bored systq 51644 476929 0 0 3 0x40014200 bored softclock 23866 400964 0 0 3 0x40014200 idle0 1 223563 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 76867 (syz-executor.0) thread 0xffff80002117fa40 (461008) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82ac44c8) #0 witness_lock+0x44d #1 vn_write+0x42 sys/kern/vfs_vnops.c:399 #2 dofilewritev+0x19c sys/kern/sys_generic.c:381 #3 sys_write+0x83 sys/kern/sys_generic.c:301 #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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10156 6522K 6522K 78643K 11246 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 3 8K 12K 78643K 18 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 2471 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 4686K 4749K 78643K 3452 0 kqueue 12 18K 18K 78643K 25 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> 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 1 0 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 0 1 0 1 1 0 8 0 pfstkey 112 10 0 0 1 0 1 1 0 8 0 pfstate 320 10 0 0 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 2 0 2 2 0 8 2 percpumem 16 33 0 0 1 0 1 1 0 8 0 scxspl 216 5217 0 5217 2 1 1 2 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 120 62 0 0 2 0 2 2 0 8 0 kqueuepl 216 21 0 13 1 0 1 1 0 8 0 pipepl 336 106 0 99 1 0 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 7 0 4 1 0 1 1 0 8 0 lockfspl 48 5 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 1 0 1 1 0 8 1 processpl 1064 347 0 316 3 0 3 3 0 8 0 procpl 672 355 0 316 4 0 4 4 0 8 0 sockpl 480 90 0 66 4 0 4 4 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 80 0 0 10 0 10 10 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 132 0 0 9 0 9 9 0 8 0 bufpl 288 3561 0 142 245 0 245 245 0 8 0 anonpl 24 48990 0 45295 49 4 45 46 0 186 19 amapchunkpl 152 4843 0 4526 21 1 20 20 0 158 6 amappl16 200 123 0 68 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 50 0 48 1 0 1 1 0 8 0 amappl12 168 8 0 7 2 1 1 1 0 8 0 amappl11 160 50 0 34 1 0 1 1 0 8 0 amappl10 152 24 0 19 1 0 1 1 0 8 0 amappl9 144 437 0 435 1 0 1 1 0 8 0 amappl8 136 429 0 408 1 0 1 1 0 8 0 amappl7 128 90 0 79 1 0 1 1 0 8 0 amappl6 120 187 0 168 2 0 2 2 0 8 1 amappl5 112 169 0 155 1 0 1 1 0 8 0 amappl4 104 693 0 670 2 0 2 2 0 8 1 amappl3 96 147 0 136 1 0 1 1 0 8 0 amappl2 88 470 0 428 3 0 3 3 0 8 2 amappl1 80 9720 0 9285 19 0 19 19 0 8 10 amappl 88 2137 0 2035 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 8032 0 8012 2 0 2 2 0 8 1 vmmpepl 168 31528 0 30395 91 0 91 91 0 357 41 vmsppl 368 332 0 316 3 0 3 3 0 8 1 rwobjpl 56 10813 0 8621 41 0 41 41 0 8 6 pdppl 4096 673 0 632 67 10 57 57 0 8 16 pvpl 32 215557 0 208905 261 0 261 261 0 265 203 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 540 0 13 16 0 16 16 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82579a90) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff825ec6cc,ffffffff82560ab1,568,ffffffff8258f284) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd806d18bf00,ffffffd8) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff8000212221b8,ffff800000ba5800,ffff800021221f18,ffff800021221e18) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff8000212221b8,1) at bpfwrite+0x169 sys/net/bpf.c:644 spec_write(ffff800021222010) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd806a97fcc0,ffff8000212221b8,1,fffffd807f7d8840) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806ee8eee0,ffff8000212221b8,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002117fa40,3,ffff8000212221b8,0,ffff8000212222b0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff80002117fa40,ffff800021222258,ffff8000212222b0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800021222320) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021222320) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffda0d0, count: -13 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020ce8ff0) 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(ffff800020ce8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800020ce8ff0) 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(ffff800020ce8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -5 ddb{1}>