panic: kernel diagnostic assertion "len >= 0 && !M_READONLY(m)" failed: file "/syzkaller/managers/main/kernel/sys/kern/uipc_mbuf.c", line 1384 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 14165 91528 0 0 0x4000000 0 syz-executor.5 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd80684b0b00,ffffffc6) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800029963dc0,ffff800000c35200,ffff800029963b28,ffff800029963a28) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff800029963dc0,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029963c20) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8074e80ac8,ffff800029963dc0,1,fffffd807f7d8960) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068cb8018,ffff800029963dc0,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000215efce0,3,ffff800029963dc0,1,ffff800029963ec0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800029963f30) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdcb197d3b80, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "len >= 0 && !M_READONLY(m)" failed: file "/syzkaller/managers/main/kernel/sys/kern/uipc_mbuf.c", line 1384 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd80684b0b00,ffffffc6) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800029963dc0,ffff800000c35200,ffff800029963b28,ffff800029963a28) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff800029963dc0,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029963c20) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8074e80ac8,ffff800029963dc0,1,fffffd807f7d8960) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068cb8018,ffff800029963dc0,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000215efce0,3,ffff800029963dc0,1,ffff800029963ec0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800029963f30) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdcb197d3b80, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800029963850 rbx 0x8 rdx 0xffff800000bb3b40 rcx 0 rax 0xffff8000215efce0 r8 0 r9 0x8080808080808080 r10 0x5378d24479d5a657 r11 0x2c91f98b7d2a7454 r12 0 r13 0xffffffc6 r14 0 r15 0x1 rip 0xffffffff824a53a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800029963840 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.5) pid=14165 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff8000215eefc0,0xffffffff829fc288 process=0xffff8000264fbb80 user=0xffff80002995e000, vmspace=0xfffffd806e9b1998 estcpu=33, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 68426 240056 62820 0 2 0 syz-executor.1 21460 396281 93280 0 3 0x80 nanoslp syz-executor.4 21460 212962 93280 0 3 0x4000080 fsleep syz-executor.4 91528 499619 11179 0 2 0 syz-executor.5 91528 92218 11179 0 2 0x4000000 syz-executor.5 *91528 14165 11179 0 7 0x4000000 syz-executor.5 29162 96919 13468 0 2 0 syz-executor.6 29162 247297 13468 0 3 0x4000080 kqread syz-executor.6 14923 490088 95594 0 2 0x482 syz-executor.7 13468 378989 95594 0 2 0x482 syz-executor.6 51494 250463 95594 0 2 0x2 syz-executor.2 93280 72293 95594 0 2 0x482 syz-executor.4 53106 79555 95594 0 2 0x482 syz-executor.3 11179 351667 95594 0 2 0x482 syz-executor.5 660 138531 95594 0 2 0x2 syz-executor.0 62820 406325 95594 0 2 0x482 syz-executor.1 95594 44379 28216 0 3 0x82 thrsleep syz-fuzzer 95594 104282 28216 0 2 0x4000482 syz-fuzzer 95594 244333 28216 0 3 0x4000082 thrsleep syz-fuzzer 95594 178780 28216 0 3 0x4000082 thrsleep syz-fuzzer 95594 182881 28216 0 3 0x4000082 thrsleep syz-fuzzer 95594 58236 28216 0 3 0x4000082 kqread syz-fuzzer 95594 91976 28216 0 3 0x4000082 thrsleep syz-fuzzer 95594 78815 28216 0 3 0x4000082 thrsleep syz-fuzzer 28216 406028 41327 0 3 0x10008a sigsusp ksh 41327 32363 72426 0 3 0x9a kqread sshd 10946 12970 1 0 3 0x100083 ttyin getty 72426 176548 1 0 3 0x88 kqread sshd 63926 23245 83843 73 3 0x100090 kqread syslogd 83843 430689 1 0 3 0x100082 netio syslogd 62029 410189 1 0 3 0x100080 kqread resolvd 14634 313618 99001 77 3 0x100092 kqread dhcpleased 99593 347530 99001 77 3 0x100092 kqread dhcpleased 99001 357902 1 0 3 0x80 kqread dhcpleased 96692 129030 0 0 3 0x14200 bored smr 14040 167442 0 0 2 0x14200 zerothread 8608 194217 0 0 3 0x14200 aiodoned aiodoned 81608 187213 0 0 3 0x14200 syncer update 91489 355318 0 0 3 0x14200 cleaner cleaner 52973 181976 0 0 3 0x14200 reaper reaper 58505 271509 0 0 3 0x14200 pgdaemon pagedaemon 80118 430009 0 0 3 0x14200 bored viomb 613 357854 0 0 3 0x40014200 acpi0 acpi0 93714 29369 0 0 3 0x14200 bored softnet 68421 90641 0 0 3 0x14200 bored systqmp 16909 302049 0 0 3 0x14200 bored systq 1934 451865 0 0 3 0x40014200 bored softclock 22342 35669 0 0 3 0x40014200 idle0 1 422690 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10173 6602K 7306K 78643K 12574 0 pcb 13 10K 12K 78643K 110 0 rtable 243 7K 7K 78643K 368 0 ifaddr 84 17K 18K 78643K 91 0 counters 27 17K 17K 78643K 27 0 ioctlops 0 0K 4K 78643K 88 0 iov 0 0K 12K 78643K 27 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1337 84K 84K 78643K 1505 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 8 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 169 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 14 49K 69K 78643K 388 0 sigio 0 0K 0K 78643K 8 0 proc 59 55K 71K 78643K 472 0 subproc 104 6K 6K 78643K 104 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 12 0 in_multi 99 6K 6K 78643K 105 0 ether_multi 1 0K 0K 78643K 1 0 mrt 1 0K 0K 78643K 7 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 37 175K 175K 78643K 37 0 exec 0 0K 2K 78643K 611 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 273 81K 82K 78643K 6019 0 UVM aobj 43 2K 2K 78643K 43 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 9 0 NDP 11 0K 2K 78643K 27 0 temp 127 4695K 4759K 78643K 5169 0 kqueue 13 20K 24K 78643K 42 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 37 0 34 1 0 1 1 0 8 0 rtentry 112 118 0 7 4 0 4 4 0 8 0 unpcb 136 166 0 153 3 0 3 3 0 8 2 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 64 0 64 1 1 0 1 0 8 0 tcpcb 736 79 0 75 5 3 2 5 0 8 1 arp 88 18 0 0 1 0 1 1 0 8 0 inpcb 304 311 0 304 13 4 9 11 0 8 8 rttmr 72 3 0 3 1 0 1 1 0 8 1 nd6 48 24 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 pfrktable 1344 1 0 0 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfstkey 112 2 0 2 1 1 0 1 0 8 0 pfstate 320 1 0 1 1 1 0 1 0 8 0 pfrule 1360 39 0 35 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 476 0 24 29 0 29 29 0 8 0 art_table 32 477 0 24 4 0 4 4 0 8 0 art_node 16 117 0 17 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semapl 112 167 0 157 1 0 1 1 0 8 0 shmpl 112 40 0 0 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1802 0 375 90 0 90 90 0 8 0 ffsino 240 1802 0 375 85 0 85 85 0 8 0 nchpl 144 2399 0 738 62 0 62 62 0 8 0 uvmvnodes 80 2126 0 0 44 0 44 44 0 8 0 vnodes 224 2126 0 0 126 0 126 126 0 8 0 namei 1024 8151 0 8149 2 1 1 2 0 8 0 scxspl 216 7420 0 7420 9 3 6 8 0 8 6 plimitpl 152 25 0 11 1 0 1 1 0 8 0 sigapl 424 663 0 625 5 0 5 5 0 8 0 futexpl 64 3380 0 3379 1 0 1 1 0 8 0 knotepl 120 10514 0 10431 3 0 3 3 0 8 0 kqueuepl 184 93 0 83 3 0 3 3 0 8 2 pipepl 304 149 0 121 3 0 3 3 0 8 0 fdescpl 432 650 0 625 4 0 4 4 0 8 0 filepl 120 3101 0 2862 12 0 12 12 0 8 4 lockfpl 104 238 0 236 2 1 1 2 0 8 0 lockfspl 48 119 0 117 1 0 1 1 0 8 0 sessionpl 144 23 0 7 1 0 1 1 0 8 0 pgrppl 48 23 0 7 1 0 1 1 0 8 0 ucredpl 96 92 0 82 1 0 1 1 0 8 0 zombiepl 144 625 0 623 1 0 1 1 0 8 0 processpl 1000 663 0 623 6 0 6 6 0 8 0 procpl 672 1142 0 1091 7 0 7 7 0 8 2 sockpl 448 514 0 491 19 6 13 17 0 8 10 mcl64k 65536 23 0 23 2 1 1 1 0 8 1 mcl16k 16384 18 0 18 1 0 1 1 0 8 1 mcl12k 12288 20 0 20 1 0 1 1 0 8 1 mcl9k 9216 6 0 6 1 0 1 1 0 8 1 mcl8k 8192 54 0 54 1 0 1 1 0 8 1 mcl4k 4096 47 0 47 1 0 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 76124 0 76072 12 4 8 11 0 8 0 mtagpl 96 320 0 38 9 1 8 8 0 8 0 mbufpl 256 123845 0 123342 35 0 35 35 0 8 0 bufpl 288 3947 0 148 272 0 272 272 0 8 0 anonpl 24 148818 0 131507 135 1 134 134 0 188 23 amapchunkpl 152 13682 0 12980 33 1 32 32 0 158 1 amappl16 200 1997 0 1409 45 1 44 44 0 8 12 amappl15 192 195 0 189 1 0 1 1 0 8 0 amappl14 184 79 0 74 1 0 1 1 0 8 0 amappl13 176 79 0 78 1 0 1 1 0 8 0 amappl12 168 14 0 10 1 0 1 1 0 8 0 amappl11 160 46 0 36 1 0 1 1 0 8 0 amappl10 152 100 0 94 1 0 1 1 0 8 0 amappl9 144 465 0 462 1 0 1 1 0 8 0 amappl8 136 612 0 564 2 0 2 2 0 8 0 amappl7 128 169 0 158 1 0 1 1 0 8 0 amappl6 120 185 0 165 2 1 1 2 0 8 0 amappl5 112 492 0 474 1 0 1 1 0 8 0 amappl4 104 831 0 802 2 1 1 2 0 8 0 amappl3 96 189 0 176 1 0 1 1 0 8 0 amappl2 88 523 0 476 3 1 2 3 0 8 0 amappl1 80 14696 0 14169 18 5 13 18 0 8 0 amappl 88 5583 0 5379 6 0 6 6 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 42 0 0 1 0 1 1 0 8 0 uaddrrnd 24 650 0 625 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 650 0 625 1 0 1 1 0 8 0 vmmpekpl 168 9367 0 9333 2 0 2 2 0 8 0 vmmpepl 168 64671 0 62403 139 11 128 139 0 357 20 vmsppl 272 649 0 625 2 0 2 2 0 8 0 rwobjpl 24 18944 0 15298 24 0 24 24 0 8 0 pdppl 4096 1306 0 1250 122 58 64 66 0 8 8 pvpl 32 375352 0 354138 258 15 243 258 0 265 61 pmappl 216 649 0 625 2 0 2 2 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 686 0 75 18 0 18 18 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd80684b0b00,ffffffc6) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800029963dc0,ffff800000c35200,ffff800029963b28,ffff800029963a28) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff800029963dc0,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029963c20) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8074e80ac8,ffff800029963dc0,1,fffffd807f7d8960) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068cb8018,ffff800029963dc0,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000215efce0,3,ffff800029963dc0,1,ffff800029963ec0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800029963f30) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdcb197d3b80, count: -13 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8254a5ed) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825bc195,ffffffff825d144c,568,ffffffff825624d9) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd80684b0b00,ffffffc6) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800029963dc0,ffff800000c35200,ffff800029963b28,ffff800029963a28) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(41700,ffff800029963dc0,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff800029963c20) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8074e80ac8,ffff800029963dc0,1,fffffd807f7d8960) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068cb8018,ffff800029963dc0,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff8000215efce0,3,ffff800029963dc0,1,ffff800029963ec0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff8000215efce0,ffff800029963e68,ffff800029963ec0) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff800029963f30) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdcb197d3b80, count: -13