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 *381529 10806 0 0 0x4000000 0 syz-executor.6 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82546c81) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825ba753,ffffffff825cb98f,568,ffffffff8255cdc2) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8066d5e100,ffffffe8) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002cdc3470,ffff800000c21600,ffff80002cdc31d8,ffff80002cdc30d8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002cdc3470,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002cdc32d0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80685b4620,ffff80002cdc3470,1,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068bdc260,ffff80002cdc3470,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff800021635500,3,ffff80002cdc3470,1,ffff80002cdc3570) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff80002cdc35e0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcb1645a4590, 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(ffffffff82546c81) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825ba753,ffffffff825cb98f,568,ffffffff8255cdc2) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8066d5e100,ffffffe8) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002cdc3470,ffff800000c21600,ffff80002cdc31d8,ffff80002cdc30d8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002cdc3470,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002cdc32d0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80685b4620,ffff80002cdc3470,1,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068bdc260,ffff80002cdc3470,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff800021635500,3,ffff80002cdc3470,1,ffff80002cdc3570) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff80002cdc35e0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcb1645a4590, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002cdc2f00 rbx 0x28 rdx 0xffff800000c80700 rcx 0 rax 0xffff800021635500 r8 0 r9 0x8080808080808080 r10 0x4afefbfbd0e6a28f r11 0x3f40ca367c36f2ef r12 0 r13 0xffffffe8 r14 0 r15 0x1 rip 0xffffffff81929368 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002cdc2ef0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.6) pid=381529 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021634fc0,0xffff800021634a90 process=0xffff80002165efc0 user=0xffff80002cdbe000, vmspace=0xfffffd806c379ef0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 87058 61675 61265 0 2 0 syz-executor.3 87058 77952 61265 0 3 0x4000080 fsleep syz-executor.3 10806 291561 29030 0 2 0 syz-executor.6 *10806 381529 29030 0 7 0x4000000 syz-executor.6 97863 392283 15041 0 2 0 syz-executor.4 97863 380734 15041 0 3 0x4000080 fsleep syz-executor.4 51444 627 37892 0 2 0 syz-executor.2 51444 380194 37892 0 2 0x4000000 syz-executor.2 62920 93657 4017 0 3 0x80 nanoslp syz-executor.5 62920 7317 4017 0 3 0x4000080 ttyout syz-executor.5 62920 306987 4017 0 3 0x4000080 fsleep syz-executor.5 29030 310264 28945 0 2 0x482 syz-executor.6 92865 94955 28945 0 2 0x482 syz-executor.0 37892 437679 28945 0 3 0x82 nanoslp syz-executor.2 61265 463155 28945 0 3 0x82 nanoslp syz-executor.3 15041 151480 28945 0 2 0x482 syz-executor.4 66750 91492 0 0 3 0x14280 nfsidl nfsio 82442 83147 0 0 3 0x14280 nfsidl nfsio 97757 27591 0 0 3 0x14280 nfsidl nfsio 87863 113055 0 0 3 0x14280 nfsidl nfsio 45755 100607 0 0 3 0x14280 nfsidl nfsio 36743 133499 0 0 3 0x14280 nfsidl nfsio 82553 265018 28945 0 2 0x2 syz-executor.7 62053 276747 0 0 3 0x14200 bored sosplice 4017 368147 28945 0 3 0x82 nanoslp syz-executor.5 41945 476555 28945 0 2 0x482 syz-executor.1 28945 128202 60628 0 3 0x82 kqread syz-fuzzer 28945 9621 60628 0 2 0x4000002 syz-fuzzer 28945 249440 60628 0 3 0x4000082 thrsleep syz-fuzzer 28945 342426 60628 0 3 0x4000082 thrsleep syz-fuzzer 28945 272499 60628 0 3 0x4000082 thrsleep syz-fuzzer 28945 136340 60628 0 3 0x4000082 thrsleep syz-fuzzer 28945 333936 60628 0 3 0x4000082 thrsleep syz-fuzzer 28945 244386 60628 0 3 0x4000082 thrsleep syz-fuzzer 60628 345665 72916 0 3 0x10008a sigsusp ksh 72916 327535 79423 0 3 0x9a kqread sshd 63174 451156 1 0 3 0x100083 ttyin getty 79423 289938 1 0 3 0x88 kqread sshd 21168 334969 87967 73 3 0x100090 kqread syslogd 87967 78865 1 0 3 0x100082 netio syslogd 4335 446611 1 0 3 0x100080 kqread resolvd 13205 454645 15234 77 3 0x100092 kqread dhcpleased 45378 256379 15234 77 3 0x100092 kqread dhcpleased 15234 302474 1 0 3 0x80 kqread dhcpleased 36888 219817 0 0 3 0x14200 bored smr 66884 362160 0 0 2 0x14200 zerothread 78220 455094 0 0 3 0x14200 aiodoned aiodoned 33138 443240 0 0 3 0x14200 syncer update 55157 118574 0 0 3 0x14200 cleaner cleaner 32353 53096 0 0 3 0x14200 reaper reaper 11555 472524 0 0 3 0x14200 pgdaemon pagedaemon 65981 278439 0 0 3 0x14200 bored viomb 53267 96082 0 0 3 0x40014200 acpi0 acpi0 92551 200064 0 0 3 0x14200 bored softnet 55870 64430 0 0 3 0x14200 bored systqmp 50101 440754 0 0 3 0x14200 bored systq 21943 268299 0 0 2 0x40014200 softclock 1055 33855 0 0 3 0x40014200 idle0 1 96236 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 10205 6733K 7963K 78643K 22877 0 pcb 13 16K 18K 78643K 317 0 rtable 215 9K 11K 78643K 2604 0 ifaddr 83 18K 19K 78643K 1291 0 sysctl 2 0K 0K 78643K 2 0 counters 26 17K 17K 78643K 62 0 ioctlops 0 0K 4K 78643K 1031 0 iov 0 0K 16K 78643K 216 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1344 84K 84K 78643K 4474 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 20 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 278 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 15 53K 85K 78643K 3016 0 sigio 0 0K 0K 78643K 12 0 proc 58 55K 79K 78643K 935 0 subproc 104 6K 6K 78643K 273 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 81 0 in_multi 77 5K 6K 78643K 338 0 ether_multi 1 0K 0K 78643K 28 0 mrt 1 0K 0K 78643K 13 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 181 811K 811K 78643K 181 0 exec 0 0K 2K 78643K 1349 0 pfkey data 0 0K 1K 78643K 8 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 354 267K 269K 78643K 37440 0 UVM aobj 46 5K 5K 78643K 46 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 120 0 NDP 11 0K 1K 78643K 91 0 temp 133 4711K 6233K 78643K 27151 0 kqueue 12 18K 28K 78643K 236 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 356 0 353 5 4 1 3 0 8 0 rtentry 112 325 0 235 4 0 4 4 0 8 1 unpcb 136 2059 0 2046 19 16 3 6 0 8 2 syncache 296 9 0 9 2 2 0 1 0 8 0 tcpqe 32 17 0 17 2 2 0 1 0 8 0 tcpcb 736 853 0 849 45 41 4 13 0 8 3 arp 88 58 0 40 1 0 1 1 0 8 0 ipq 40 11 0 11 2 1 1 1 0 8 1 ipqe 40 26 0 26 2 1 1 1 0 8 1 inpcb 304 2129 0 2122 44 36 8 11 0 8 7 rttmr 72 3 0 3 1 1 0 1 0 8 0 ip6q 72 3 0 2 1 0 1 1 0 8 0 ip6af 40 5 0 4 1 0 1 1 0 8 0 nd6 48 76 0 55 1 0 1 1 0 8 0 pkpcb 40 19 0 19 3 3 0 1 0 8 0 kcovpl 48 21 0 13 1 0 1 1 0 8 0 ppxss 1152 6 0 6 2 2 0 1 0 8 0 pfstscr 40 11 0 10 2 1 1 1 0 8 0 pfrktable 1344 797 0 791 5 4 1 1 0 8 0 pftag 88 88 0 84 2 1 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 22 0 20 2 1 1 1 0 8 0 pfstate 320 11 0 10 2 1 1 1 0 8 0 pfrule 1360 421 0 400 4 2 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1255 0 865 39 13 26 31 0 8 0 art_table 32 1256 0 865 4 0 4 4 0 8 0 art_node 16 324 0 245 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 7 1 0 1 1 0 8 0 semapl 112 276 0 266 1 0 1 1 0 8 0 shmpl 112 43 0 0 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 5301 0 3868 91 0 91 91 0 8 0 ffsino 240 5301 0 3868 85 0 85 85 0 8 0 nchpl 144 9155 0 7531 62 0 62 62 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 34255 0 34254 2 1 1 2 0 8 0 vcpupl 1984 11 0 0 2 0 2 2 0 8 0 vmpool 528 23 0 12 4 3 1 1 0 8 0 pfiaddrpl 120 212 0 201 5 4 1 1 0 8 0 scxspl 216 27226 0 27226 13 11 2 8 0 8 2 plimitpl 152 271 0 256 1 0 1 1 0 8 0 sigapl 424 3295 0 3249 9 3 6 8 0 8 0 futexpl 64 32129 0 32126 1 0 1 1 0 8 0 knotepl 120 30020 0 29940 4 0 4 4 0 8 0 kqueuepl 184 588 0 580 9 5 4 4 0 8 3 pipepl 304 1485 0 1457 30 26 4 8 0 8 1 fdescpl 432 3261 0 3235 4 0 4 4 0 8 0 filepl 120 23092 0 22852 34 22 12 14 0 8 4 lockfpl 104 1225 0 1223 5 3 2 2 0 8 1 lockfspl 48 324 0 322 1 0 1 1 0 8 0 sessionpl 144 36 0 20 1 0 1 1 0 8 0 pgrppl 48 45 0 29 1 0 1 1 0 8 0 ucredpl 96 2719 0 2708 1 0 1 1 0 8 0 zombiepl 144 3249 0 3247 1 0 1 1 0 8 0 processpl 1000 3295 0 3247 8 1 7 8 0 8 0 procpl 672 7679 0 7618 13 7 6 8 0 8 0 sosppl 168 25 0 25 6 5 1 1 0 8 1 sockpl 448 4564 0 4541 93 82 11 18 0 8 8 mcl64k 65536 106 0 106 4 3 1 1 0 8 1 mcl16k 16384 28 0 28 7 6 1 1 0 8 1 mcl12k 12288 75 0 75 9 8 1 1 0 8 1 mcl9k 9216 56 0 56 6 5 1 1 0 8 1 mcl8k 8192 237 0 237 4 3 1 1 0 8 1 mcl4k 4096 424 0 423 2 1 1 1 0 8 0 mcl2k2 2112 29 0 29 7 6 1 1 0 8 1 mcl2k 2048 79929 0 79860 15 3 12 12 0 8 0 mtagpl 96 2808 0 1967 30 4 26 26 0 8 1 mbufpl 256 151518 0 150486 348 265 83 316 0 8 4 bufpl 288 8581 0 2172 458 0 458 458 0 8 0 anonpl 24 854727 0 837242 143 14 129 129 0 188 10 amapchunkpl 152 90014 0 89269 57 22 35 40 0 158 2 amappl16 200 8349 0 7701 54 10 44 44 0 8 8 amappl15 192 520 0 510 1 0 1 1 0 8 0 amappl14 184 6 0 3 1 0 1 1 0 8 0 amappl13 176 418 0 417 1 0 1 1 0 8 0 amappl12 168 350 0 347 3 2 1 1 0 8 0 amappl11 160 611 0 599 1 0 1 1 0 8 0 amappl10 152 781 0 777 1 0 1 1 0 8 0 amappl9 144 895 0 889 1 0 1 1 0 8 0 amappl8 136 901 0 823 3 0 3 3 0 8 0 amappl7 128 218 0 205 1 0 1 1 0 8 0 amappl6 120 673 0 648 2 1 1 2 0 8 0 amappl5 112 2965 0 2948 1 0 1 1 0 8 0 amappl4 104 2182 0 2147 2 1 1 2 0 8 0 amappl3 96 985 0 971 1 0 1 1 0 8 0 amappl2 88 1118 0 1071 3 1 2 3 0 8 0 amappl1 80 60276 0 59734 19 6 13 18 0 8 0 amappl 88 36682 0 36445 7 0 7 7 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 45 0 0 1 0 1 1 0 8 0 uaddrrnd 24 3284 0 3247 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3284 0 3247 1 0 1 1 0 8 0 vmmpekpl 168 29762 0 29711 3 0 3 3 0 8 0 vmmpepl 168 300142 0 297673 184 57 127 145 0 357 8 vmsppl 272 3283 0 3247 5 2 3 3 0 8 0 rwobjpl 24 75885 0 68317 49 1 48 48 0 8 1 pdppl 4096 6574 0 6505 260 185 75 75 0 8 6 pvpl 32 1537889 0 1516287 284 72 212 243 0 265 19 pmappl 216 3283 0 3247 3 0 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1469 0 609 31 4 27 31 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(ffffffff82546c81) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825ba753,ffffffff825cb98f,568,ffffffff8255cdc2) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8066d5e100,ffffffe8) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002cdc3470,ffff800000c21600,ffff80002cdc31d8,ffff80002cdc30d8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002cdc3470,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002cdc32d0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80685b4620,ffff80002cdc3470,1,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068bdc260,ffff80002cdc3470,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff800021635500,3,ffff80002cdc3470,1,ffff80002cdc3570) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff80002cdc35e0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcb1645a4590, 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(ffffffff82546c81) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff825ba753,ffffffff825cb98f,568,ffffffff8255cdc2) at __assert+0x25 sys/kern/subr_prf.c:161 m_align(fffffd8066d5e100,ffffffe8) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff80002cdc3470,ffff800000c21600,ffff80002cdc31d8,ffff80002cdc30d8) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(21700,ffff80002cdc3470,1) at bpfwrite+0x128 sys/net/bpf.c:644 spec_write(ffff80002cdc32d0) at spec_write+0xcb sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd80685b4620,ffff80002cdc3470,1,fffffd807f7d87e0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd8068bdc260,ffff80002cdc3470,1) at vn_write+0x19c sys/kern/vfs_vnops.c:414 dofilewritev(ffff800021635500,3,ffff80002cdc3470,1,ffff80002cdc3570) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys_pwrite sys/kern/vfs_syscalls.c:3354 [inline] sys_pad_pwrite(ffff800021635500,ffff80002cdc3518,ffff80002cdc3570) at sys_pad_pwrite+0x92 sys/kern/vfs_syscalls.c:3426 syscall(ffff80002cdc35e0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcb1645a4590, count: -13