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 * 53083 95706 0 0 0x4000000 0K syz-executor.5 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(fffffd8067e64700,ffffffca) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800028cf85f8,ffff800000ce5400,ffff800028cf8358,ffff800028cf8258) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800028cf85f8,11) at bpfwrite+0x169 sys/net/bpf.c:644 spec_write(ffff800028cf8450) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8065a3cb70,ffff800028cf85f8,11,fffffd807f7d8720) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806c4e96a0,ffff800028cf85f8,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff800021142fc8,3,ffff800028cf85f8,0,ffff800028cf86f0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff800021142fc8,ffff800028cf8698,ffff800028cf86f0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800028cf8760) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800028cf8760) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdc848338480, 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(fffffd8067e64700,ffffffca) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800028cf85f8,ffff800000ce5400,ffff800028cf8358,ffff800028cf8258) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800028cf85f8,11) at bpfwrite+0x169 sys/net/bpf.c:644 spec_write(ffff800028cf8450) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8065a3cb70,ffff800028cf85f8,11,fffffd807f7d8720) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806c4e96a0,ffff800028cf85f8,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff800021142fc8,3,ffff800028cf85f8,0,ffff800028cf86f0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff800021142fc8,ffff800028cf8698,ffff800028cf86f0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800028cf8760) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800028cf8760) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdc848338480, count: -13 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800028cf8070 rbx 0xffffffff828ecbff cpu_info_full_primary+0x2bff rdx 0xffff800000be20c0 rcx 0 rax 0xffff800021142fc8 r8 0 r9 0x8080808080808080 r10 0x6f67cd2e4b915480 r11 0x4e1e4ddcbd969e59 r12 0xffffffff828eca00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff82237da8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800028cf8060 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.5) pid=53083 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021142d28,0xffff800021142a98 process=0xffff80002e39e9b0 user=0xffff800028cf3000, vmspace=0xfffffd805b3dccf8 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 82723 524272 38490 0 2 0 syz-executor.6 82723 204300 38490 0 2 0x4000000 syz-executor.6 66510 353590 48997 0 2 0 syz-executor.0 66510 334998 48997 0 3 0x4000080 fsleep syz-executor.0 61809 163716 32853 0 2 0 syz-executor.7 61809 280258 32853 0 3 0x4000080 fsleep syz-executor.7 63982 488074 28358 0 2 0 syz-executor.4 63982 337106 28358 0 3 0x4000080 fsleep syz-executor.4 96694 203857 39426 0 2 0 syz-executor.1 96694 263127 39426 0 3 0x4000080 fsleep syz-executor.1 93461 99198 52181 0 2 0 syz-executor.3 93461 346186 52181 0 3 0x4000080 fsleep syz-executor.3 47577 393869 25467 0 2 0 syz-executor.2 95706 292034 37916 0 2 0 syz-executor.5 *95706 53083 37916 0 7 0x4000000 syz-executor.5 38490 14552 91847 0 2 0x482 syz-executor.6 83921 467077 0 0 3 0x14200 acct acct 25467 388075 91847 0 2 0x482 syz-executor.2 37916 127974 91847 0 2 0x482 syz-executor.5 28358 393427 91847 0 2 0x482 syz-executor.4 39426 376028 91847 0 2 0x482 syz-executor.1 32853 28494 91847 0 2 0x482 syz-executor.7 52181 381063 91847 0 2 0x482 syz-executor.3 48997 72574 91847 0 2 0x482 syz-executor.0 87853 263888 0 0 3 0x14200 bored sosplice 91847 303243 29039 0 3 0x82 thrsleep syz-fuzzer 91847 62879 29039 0 3 0x4000082 thrsleep syz-fuzzer 91847 68085 29039 0 3 0x4000082 thrsleep syz-fuzzer 91847 2277 29039 0 3 0x4000082 thrsleep syz-fuzzer 91847 286998 29039 0 3 0x4000082 thrsleep syz-fuzzer 91847 367960 29039 0 3 0x4000082 thrsleep syz-fuzzer 91847 472956 29039 0 3 0x4000082 thrsleep syz-fuzzer 91847 36026 29039 0 3 0x4000082 kqread syz-fuzzer 91847 355473 29039 0 3 0x4000082 thrsleep syz-fuzzer 29039 197138 9273 0 3 0x10008a sigsusp ksh 9273 86132 48554 0 3 0x9a kqread sshd 79464 11349 1 0 3 0x100083 ttyin getty 48554 377123 1 0 3 0x88 kqread sshd 7508 40823 56791 74 3 0x100092 bpf pflogd 56791 235591 1 0 3 0x80 netio pflogd 533 360270 2730 73 3 0x100090 kqread syslogd 2730 70466 1 0 3 0x100082 netio syslogd 56787 187064 1 0 3 0x100080 kqread resolvd 71069 330190 35794 77 3 0x100092 kqread dhcpleased 82649 326106 35794 77 3 0x100092 kqread dhcpleased 35794 352250 1 0 3 0x80 kqread dhcpleased 37981 286968 0 0 3 0x14200 bored smr 92127 106796 0 0 2 0x14200 zerothread 40940 418118 0 0 3 0x14200 aiodoned aiodoned 4603 513075 0 0 3 0x14200 syncer update 55955 419832 0 0 3 0x14200 cleaner cleaner 69596 251504 0 0 3 0x14200 reaper reaper 58277 288576 0 0 3 0x14200 pgdaemon pagedaemon 74759 68804 0 0 3 0x14200 bored viomb 11637 276194 0 0 3 0x40014200 acpi0 acpi0 63222 326254 0 0 7 0x40014200 idle1 869 86166 0 0 3 0x14200 bored softnet 9479 425316 0 0 3 0x14200 bored systqmp 56406 381792 0 0 3 0x14200 bored systq 95544 141509 0 0 2 0x40014200 softclock 33343 453925 0 0 3 0x40014200 idle0 1 216833 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 95706 (syz-executor.5) thread 0xffff800021142fc8 (53083) 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 10213 6585K 7658K 78643K 34716 0 pcb 13 18K 22K 78643K 893 0 rtable 245 19K 21K 78643K 2228 0 ifaddr 97 21K 22K 78643K 820 0 sysctl 2 0K 0K 78643K 2 0 counters 58 35K 36K 78643K 236 0 ioctlops 0 0K 4K 78643K 2887 0 iov 0 0K 16K 78643K 1400 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1473 92K 92K 78643K 14925 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 13K 78643K 59 0 VM map 2 1K 1K 78643K 2 0 sem 10 2K 3K 78643K 55 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 18 65K 85K 78643K 20249 0 sigio 1 0K 0K 78643K 95 0 proc 72 87K 124K 78643K 1701 0 subproc 104 6K 7K 78643K 550 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 531 0 in_multi 99 6K 7K 78643K 715 0 ether_multi 1 0K 0K 78643K 109 0 mrt 2 0K 0K 78643K 129 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 163 731K 731K 78643K 163 0 exec 0 0K 2K 78643K 1970 0 pfkey data 0 0K 1K 78643K 5 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 540 324K 336K 78643K 244304 0 UVM aobj 99 8K 8K 78643K 116 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1873 0 NDP 13 0K 2K 78643K 184 0 temp 148 4735K 4853K 78643K 136109 0 kqueue 12 18K 28K 78643K 683 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 461 0 458 2 1 1 2 0 8 0 rtentry 112 560 0 457 4 1 3 4 0 8 0 unpcb 136 6321 0 6306 59 58 1 9 0 8 0 syncache 296 56 0 56 10 10 0 1 0 8 0 tcpqe 32 58 0 58 6 6 0 1 0 8 0 tcpcb 736 10373 0 10158 190 168 22 22 0 8 0 arp 120 92 0 74 1 0 1 1 0 8 0 inpcb 304 15268 0 15261 134 117 17 17 0 8 16 rttmr 72 50 0 50 4 4 0 1 0 8 0 nd6 48 133 0 105 1 0 1 1 0 8 0 pkpcb 40 34 0 34 9 9 0 1 0 8 0 kcovpl 48 42 0 34 1 0 1 1 0 8 0 ppxss 1248 31 0 30 1 0 1 1 0 8 0 pfstscr 40 95 0 95 7 7 0 1 0 8 0 pffrag 232 59 0 48 4 3 1 1 0 482 0 pffrnode 88 58 0 48 4 3 1 1 0 8 0 pffrent 40 369 0 358 4 3 1 1 0 8 0 pfosfp 40 1459 0 1456 5 4 1 5 0 8 0 pfosfpen 112 1459 0 1442 21 20 1 21 0 8 0 pfrktable 1344 199 0 192 4 3 1 2 0 8 0 pftag 88 42 0 35 1 0 1 1 0 8 0 pfstitem 24 87 0 85 1 0 1 1 0 8 0 pfstkey 112 269 0 267 2 1 1 2 0 8 0 pfstate 320 175 0 173 6 5 1 6 0 8 0 pfrule 1360 400 0 352 7 2 5 5 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2435 0 1972 43 13 30 32 0 8 0 art_table 32 2436 0 1972 5 1 4 5 0 8 0 art_node 16 559 0 468 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 16 2 1 1 1 0 8 0 semupl 112 6 0 6 1 1 0 1 0 8 0 semapl 112 39 0 31 1 0 1 1 0 8 0 shmpl 112 113 0 17 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 33842 0 32392 92 0 92 92 0 8 0 ffsino 272 33842 0 32392 98 0 98 98 0 8 0 nchpl 144 58071 0 56444 63 0 63 63 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 183331 0 183331 2 1 1 2 0 8 1 percpumem 16 130 0 89 1 0 1 1 0 8 0 vcpupl 2048 50 0 0 7 0 7 7 0 8 0 vmpool 560 70 0 20 5 1 4 4 0 8 0 pfiaddrpl 120 61 0 48 1 0 1 1 0 8 0 scsiplug 72 8 0 8 2 2 0 1 0 8 0 scxspl 216 204089 0 204089 19 18 1 8 0 8 1 plimitpl 152 569 0 554 1 0 1 1 0 8 0 sigapl 424 20515 0 20468 8 2 6 8 0 8 0 futexpl 64 147578 0 147573 1 0 1 1 0 8 0 knotepl 120 412 0 0 11 3 8 11 0 8 0 kqueuepl 216 1430 0 1422 11 10 1 5 0 8 0 pipepl 336 1863 0 1835 52 44 8 9 0 8 5 fdescpl 496 20479 0 20448 5 1 4 5 0 8 0 filepl 152 102994 0 102753 142 121 21 22 0 8 11 lockfpl 104 3197 0 3195 5 4 1 2 0 8 0 lockfspl 48 1236 0 1234 1 0 1 1 0 8 0 sessionpl 144 58 0 41 1 0 1 1 0 8 0 pgrppl 48 72 0 55 1 0 1 1 0 8 0 ucredpl 96 12311 0 12297 1 0 1 1 0 8 0 zombiepl 144 20468 0 20468 2 1 1 1 0 8 1 processpl 1064 20515 0 20468 5 0 5 5 0 8 0 procpl 672 46879 0 46817 17 11 6 8 0 8 0 srpgc 96 46 0 46 5 5 0 1 0 8 0 sosppl 168 197 0 197 28 27 1 1 0 8 1 sockpl 480 22095 0 22068 299 270 29 34 0 8 24 mcl64k 65536 26 0 0 3 0 3 3 0 8 0 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 16 0 0 2 0 2 2 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 689 0 0 24 0 24 24 0 8 0 mtagpl 96 1771 0 0 37 0 37 37 0 8 0 mbufpl 256 2117 0 0 106 0 106 106 0 8 0 bufpl 288 31895 0 25559 453 0 453 453 0 8 0 anonpl 24 6023828 0 6010289 299 202 97 126 0 186 0 amapchunkpl 152 583202 0 582463 86 55 31 40 0 158 1 amappl16 200 89907 0 89556 379 359 20 48 0 8 0 amappl15 192 5128 0 5119 1 0 1 1 0 8 0 amappl14 184 2323 0 2311 1 0 1 1 0 8 0 amappl13 176 4070 0 4063 1 0 1 1 0 8 0 amappl12 168 1882 0 1873 1 0 1 1 0 8 0 amappl11 160 2793 0 2775 1 0 1 1 0 8 0 amappl10 152 1878 0 1863 1 0 1 1 0 8 0 amappl9 144 1917 0 1914 1 0 1 1 0 8 0 amappl8 136 5021 0 4778 10 1 9 9 0 8 0 amappl7 128 3396 0 3385 1 0 1 1 0 8 0 amappl6 120 1762 0 1727 3 1 2 2 0 8 0 amappl5 112 16244 0 16224 1 0 1 1 0 8 0 amappl4 104 6772 0 6727 5 3 2 2 0 8 0 amappl3 96 5897 0 5879 1 0 1 1 0 8 0 amappl2 88 5752 0 5688 3 0 3 3 0 8 0 amappl1 80 350476 0 349868 19 5 14 19 0 8 0 amappl 88 242957 0 242666 8 1 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 115 0 17 2 0 2 2 0 8 0 uaddrrnd 24 20549 0 20468 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 20549 0 20468 1 0 1 1 0 8 0 vmmpekpl 168 120241 0 120168 4 0 4 4 0 8 0 vmmpepl 168 1936419 0 1933643 308 181 127 134 0 357 5 vmsppl 368 20548 0 20468 9 1 8 8 0 8 0 rwobjpl 56 452014 0 444426 137 27 110 112 0 8 0 pdppl 4096 41105 0 40986 521 402 119 121 0 8 0 pvpl 32 10893554 0 10875277 476 313 163 262 0 265 0 pmappl 248 20548 0 20468 7 1 6 6 0 8 1 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1621 0 633 30 1 29 29 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(fffffd8067e64700,ffffffca) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385 bpf_movein(ffff800028cf85f8,ffff800000ce5400,ffff800028cf8358,ffff800028cf8258) at bpf_movein+0x25e sys/net/bpf.c:228 bpfwrite(31700,ffff800028cf85f8,11) at bpfwrite+0x169 sys/net/bpf.c:644 spec_write(ffff800028cf8450) at spec_write+0xd4 sys/kern/spec_vnops.c:309 VOP_WRITE(fffffd8065a3cb70,ffff800028cf85f8,11,fffffd807f7d8720) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245 vn_write(fffffd806c4e96a0,ffff800028cf85f8,0) at vn_write+0x157 sys/kern/vfs_vnops.c:414 dofilewritev(ffff800021142fc8,3,ffff800028cf85f8,0,ffff800028cf86f0) at dofilewritev+0x19c sys/kern/sys_generic.c:381 sys_write(ffff800021142fc8,ffff800028cf8698,ffff800028cf86f0) at sys_write+0x83 sys/kern/sys_generic.c:301 syscall(ffff800028cf8760) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800028cf8760) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdc848338480, 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