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 267649 70451 0 0 0 0 syz-executor.0 *193149 70451 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(fffffd8076a02600,ffffffd0) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002129a018,ffff800000ba4800,ffff800021299d78,ffff800021299c78) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002129a018,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff800021299e70) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80756af790,ffff80002129a018,1,fffffd807f7d88a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8073732428,ffff80002129a018,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002134aa90,3,ffff80002129a018,0,ffff80002129a110) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_write(ffff80002134aa90,ffff80002129a0b8,ffff80002129a110) at sys_write+0x83 sys/kern/sys_generic.c:300 syscall(ffff80002129a180) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002129a180) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x39e60b39350, 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(fffffd8076a02600,ffffffd0) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002129a018,ffff800000ba4800,ffff800021299d78,ffff800021299c78) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002129a018,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff800021299e70) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80756af790,ffff80002129a018,1,fffffd807f7d88a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8073732428,ffff80002129a018,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002134aa90,3,ffff80002129a018,0,ffff80002129a110) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_write(ffff80002134aa90,ffff80002129a0b8,ffff80002129a110) at sys_write+0x83 sys/kern/sys_generic.c:300 syscall(ffff80002129a180) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002129a180) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x39e60b39350, count: -13 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800021299a90 rbx 0xffff800020ce9bff rdx 0x3fd rcx 0 rax 0x94 r8 0x101010101010101 r9 0x8080808080808080 r10 0xc85950d0d8bdc720 r11 0xc2e6cc6358ab7cf2 r12 0xffff800020ce9a00 r13 0 r14 0 r15 0x1 rip 0xffffffff812d1e98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021299a80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=193149 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=57, nice=20 forw=0xffffffffffffffff, list=0xffff80002134ad30,0xffff80002134a560 process=0xffff8000213431f8 user=0xffff800021295000, vmspace=0xfffffd806a90b010 estcpu=7, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 36055 243769 34584 0 2 0x40 syz-executor.3 87165 227885 74082 0 2 0x40 syz-executor.1 29200 368808 39736 0 2 0x100000 sh 37295 88008 1865 0 2 0x100002 sh 70451 267649 66584 0 7 0 syz-executor.0 *70451 193149 66584 0 7 0x4000000 syz-executor.0 51331 322836 42788 0 2 0x2 arp 39736 98082 89839 0 3 0x10008a sigsusp sh 80361 458017 26298 0 2 0x100000 sh 42788 41982 26693 0 3 0x10008a sigsusp sh 26298 77491 92108 0 3 0x10008a sigsusp sh 34584 186041 60548 0 3 0x82 ppwait syz-executor.3 1865 245309 60548 0 3 0x82 wait syz-executor.5 74082 147355 60548 0 3 0x82 ppwait syz-executor.1 92108 231307 60548 0 3 0x82 wait syz-executor.7 89839 345918 60548 0 3 0x82 wait syz-executor.6 26693 107803 60548 0 3 0x82 wait syz-executor.4 20504 274697 60548 0 2 0x2 syz-executor.2 66584 380728 60548 0 3 0x82 nanoslp syz-executor.0 60548 169410 80525 0 3 0x82 thrsleep syz-execprog 60548 309260 80525 0 3 0x4000082 nanoslp syz-execprog 60548 336620 80525 0 3 0x4000082 thrsleep syz-execprog 60548 42750 80525 0 3 0x4000082 kqread syz-execprog 60548 11158 80525 0 3 0x4000082 thrsleep syz-execprog 60548 36004 80525 0 3 0x4000082 thrsleep syz-execprog 60548 19947 80525 0 2 0x4000002 syz-execprog 60548 459059 80525 0 3 0x4000082 thrsleep syz-execprog 60548 420395 80525 0 3 0x4000082 thrsleep syz-execprog 80525 314708 29821 0 3 0x10008a sigsusp ksh 29821 258535 19034 0 3 0x9a poll sshd 40908 447754 1 0 3 0x100083 ttyin getty 19034 235648 1 0 3 0x88 poll sshd 83265 177470 60124 74 3 0x100092 bpf pflogd 60124 521088 1 0 3 0x80 netio pflogd 9522 512310 91689 73 3 0x100090 kqread syslogd 91689 255341 1 0 3 0x100082 netio syslogd 5409 95089 1 0 3 0x100080 kqread resolvd 88584 498573 20021 77 3 0x100092 kqread dhcpleased 54230 401312 20021 77 3 0x100092 kqread dhcpleased 20021 337310 1 0 3 0x80 kqread dhcpleased 90022 440273 0 0 3 0x14200 bored smr 9823 120008 0 0 2 0x14200 zerothread 54307 326942 0 0 3 0x14200 aiodoned aiodoned 96285 25228 0 0 3 0x14200 syncer update 29320 261197 0 0 3 0x14200 cleaner cleaner 66411 9579 0 0 3 0x14200 reaper reaper 989 60144 0 0 3 0x14200 pgdaemon pagedaemon 63361 232725 0 0 3 0x14200 bored viomb 44739 101099 0 0 3 0x40014200 acpi0 acpi0 62521 96385 0 0 3 0x40014200 idle1 65162 359380 0 0 3 0x14200 bored softnet 5639 161967 0 0 3 0x14200 bored systqmp 96011 311755 0 0 3 0x14200 bored systq 9245 44709 0 0 3 0x40014200 bored softclock 44956 359095 0 0 3 0x40014200 idle0 1 187943 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 70451 (syz-executor.0) thread 0xffff80002134aa90 (193149) 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_write+0x83 sys/kern/sys_generic.c:300 #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 10178 6538K 6538K 78643K 11268 0 pcb 13 8K 8K 78643K 13 0 rtable 146 4K 4K 78643K 220 0 ifaddr 74 14K 14K 78643K 78 0 counters 56 35K 35K 78643K 56 0 ioctlops 0 0K 4K 78643K 1481 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 20 73K 93K 78643K 109 0 proc 67 87K 124K 78643K 464 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 39 2K 2K 78643K 39 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 604 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 222 74K 75K 78643K 2917 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 16 0K 0K 78643K 16 0 temp 57 4683K 4745K 78643K 4095 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 23 0 20 1 0 1 1 0 8 0 rtentry 112 65 0 1 2 0 2 2 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 14 0 0 1 0 1 1 0 8 0 inpcb 304 58 0 52 1 0 1 1 0 8 0 nd6 48 6 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 6 2 1 1 1 0 8 0 pfstkey 112 11 0 6 2 1 1 1 0 8 0 pfstate 320 11 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 209 0 0 14 0 14 14 0 8 0 art_table 32 210 0 0 2 0 2 2 0 8 0 art_node 16 64 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1479 0 49 90 0 90 90 0 8 0 ffsino 272 1479 0 49 96 0 96 96 0 8 0 nchpl 144 1728 0 59 62 0 62 62 0 8 0 uvmvnodes 80 1490 0 0 31 0 31 31 0 8 0 vnodes 224 1490 0 0 88 0 88 88 0 8 0 namei 1024 5744 0 5744 3 1 2 2 0 8 2 percpumem 16 40 0 0 1 0 1 1 0 8 0 scxspl 216 5556 0 5556 15 14 1 8 0 8 1 plimitpl 152 24 0 9 1 0 1 1 0 8 0 sigapl 424 415 0 368 6 0 6 6 0 8 0 futexpl 64 1 0 1 1 0 1 1 0 8 1 knotepl 112 100 0 0 3 0 3 3 0 8 0 kqueuepl 216 6 0 0 1 0 1 1 0 8 0 pipepl 336 134 0 106 4 1 3 3 0 8 0 fdescpl 496 401 0 368 5 0 5 5 0 8 0 filepl 152 1480 0 1346 6 0 6 6 0 8 0 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 26 0 9 1 0 1 1 0 8 0 pgrppl 48 26 0 9 1 0 1 1 0 8 0 ucredpl 96 69 0 57 1 0 1 1 0 8 0 zombiepl 144 368 0 368 2 1 1 1 0 8 1 processpl 1064 415 0 368 4 0 4 4 0 8 0 procpl 672 424 0 368 6 0 6 6 0 8 0 sockpl 480 116 0 92 5 1 4 4 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 58 0 0 8 1 7 8 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 227 0 0 14 0 14 14 0 8 0 bufpl 288 3627 0 151 249 0 249 249 0 8 0 anonpl 24 55671 0 50318 50 4 46 46 0 186 11 amapchunkpl 152 6800 0 6317 24 1 23 23 0 158 1 amappl16 200 205 0 131 6 1 5 5 0 8 1 amappl15 192 92 0 85 1 0 1 1 0 8 0 amappl14 184 8 0 6 1 0 1 1 0 8 0 amappl13 176 86 0 80 2 1 1 1 0 8 0 amappl12 168 11 0 9 2 1 1 1 0 8 0 amappl11 160 54 0 39 1 0 1 1 0 8 0 amappl10 152 31 0 27 1 0 1 1 0 8 0 amappl9 144 446 0 441 1 0 1 1 0 8 0 amappl8 136 542 0 511 2 0 2 2 0 8 0 amappl7 128 113 0 101 1 0 1 1 0 8 0 amappl6 120 228 0 205 2 0 2 2 0 8 0 amappl5 112 181 0 168 1 0 1 1 0 8 0 amappl4 104 807 0 775 2 0 2 2 0 8 0 amappl3 96 155 0 145 1 0 1 1 0 8 0 amappl2 88 523 0 477 3 0 3 3 0 8 1 amappl1 80 10734 0 10184 19 0 19 19 0 8 5 amappl 88 2524 0 2356 4 0 4 4 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 401 0 368 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 401 0 368 1 0 1 1 0 8 0 vmmpekpl 168 8351 0 8328 2 0 2 2 0 8 0 vmmpepl 168 37798 0 36045 93 1 92 92 0 357 9 vmsppl 368 400 0 368 4 0 4 4 0 8 0 rwobjpl 56 11958 0 9519 41 0 41 41 0 8 4 pdppl 4096 809 0 736 103 20 83 83 0 8 10 pvpl 32 235132 0 226117 254 2 252 252 0 265 172 pmappl 248 400 0 368 3 0 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 597 0 26 17 0 17 17 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 end of kernel end trace frame: 0x7f7fffff6d10, count: 12 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 end of kernel end trace frame: 0x7f7fffff6d10, count: -3 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(fffffd8076a02600,ffffffd0) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002129a018,ffff800000ba4800,ffff800021299d78,ffff800021299c78) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002129a018,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff800021299e70) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80756af790,ffff80002129a018,1,fffffd807f7d88a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8073732428,ffff80002129a018,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002134aa90,3,ffff80002129a018,0,ffff80002129a110) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_write(ffff80002134aa90,ffff80002129a0b8,ffff80002129a110) at sys_write+0x83 sys/kern/sys_generic.c:300 syscall(ffff80002129a180) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002129a180) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x39e60b39350, 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(fffffd8076a02600,ffffffd0) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002129a018,ffff800000ba4800,ffff800021299d78,ffff800021299c78) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff80002129a018,1) at bpfwrite+0x169 sys/net/bpf.c:648 spec_write(ffff800021299e70) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80756af790,ffff80002129a018,1,fffffd807f7d88a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8073732428,ffff80002129a018,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff80002134aa90,3,ffff80002129a018,0,ffff80002129a110) at dofilewritev+0x19c sys/kern/sys_generic.c:380 sys_write(ffff80002134aa90,ffff80002129a0b8,ffff80002129a110) at sys_write+0x83 sys/kern/sys_generic.c:300 syscall(ffff80002129a180) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002129a180) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x39e60b39350, count: -13