Hello,
syzbot found the following issue on:
HEAD commit: b807ad8bb125 make bpf_movein align the packet payload.
git tree: openbsd
console output:
https://syzkaller.appspot.com/x/log.txt?x=1261e984700000
kernel config:
https://syzkaller.appspot.com/x/.config?x=fe55924c11e64b0a
dashboard link:
https://syzkaller.appspot.com/bug?extid=6f29d23eca959c5a9705
Unfortunately, I don't have any reproducer for this issue yet.
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+6f29d2...@syzkaller.appspotmail.com
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
*391647 98914 0 0 0x4000000 0 syz-executor.4
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440
panic(ffffffff8254be5b) at panic+0x161 sys/kern/subr_prf.c:202
__assert(ffffffff825bbf89,ffffffff825cdd9d,568,ffffffff8255ec6a) at __assert+0x25 sys/kern/subr_prf.c:161
m_align(fffffd80684fe900,ffffffeb) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385
bpf_movein(ffff800027f335c8,ffff800000bf8800,ffff800027f33328,ffff800027f33228) at bpf_movein+0x25e sys/net/bpf.c:228
bpfwrite(41700,ffff800027f335c8,1) at bpfwrite+0x128 sys/net/bpf.c:648
spec_write(ffff800027f33420) at spec_write+0xcb sys/kern/spec_vnops.c:309
VOP_WRITE(fffffd8073332b08,ffff800027f335c8,1,fffffd807f7d8480) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_write(fffffd8067d9f978,ffff800027f335c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414
dofilewritev(ffff80002161ea80,3,ffff800027f335c8,0,ffff800027f336c0) at dofilewritev+0x19c sys/kern/sys_generic.c:380
sys_write(ffff80002161ea80,ffff800027f33668,ffff800027f336c0) at sys_write+0x83 sys/kern/sys_generic.c:300
syscall(ffff800027f33730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xa8b00ac8f10, 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(ffffffff8254be5b) at panic+0x161 sys/kern/subr_prf.c:202
__assert(ffffffff825bbf89,ffffffff825cdd9d,568,ffffffff8255ec6a) at __assert+0x25 sys/kern/subr_prf.c:161
m_align(fffffd80684fe900,ffffffeb) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385
bpf_movein(ffff800027f335c8,ffff800000bf8800,ffff800027f33328,ffff800027f33228) at bpf_movein+0x25e sys/net/bpf.c:228
bpfwrite(41700,ffff800027f335c8,1) at bpfwrite+0x128 sys/net/bpf.c:648
spec_write(ffff800027f33420) at spec_write+0xcb sys/kern/spec_vnops.c:309
VOP_WRITE(fffffd8073332b08,ffff800027f335c8,1,fffffd807f7d8480) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_write(fffffd8067d9f978,ffff800027f335c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414
dofilewritev(ffff80002161ea80,3,ffff800027f335c8,0,ffff800027f336c0) at dofilewritev+0x19c sys/kern/sys_generic.c:380
sys_write(ffff80002161ea80,ffff800027f33668,ffff800027f336c0) at sys_write+0x83 sys/kern/sys_generic.c:300
syscall(ffff800027f33730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xa8b00ac8f10, count: -13
ddb> show registers
rdi 0
rsi 0x1
rbp 0xffff800027f33050
rbx 0x30
rdx 0xffff800000bc2600
rcx 0
rax 0xffff80002161ea80
r8 0
r9 0x8080808080808080
r10 0xdafc4fff50aac5fd
r11 0x9493992ae9870271
r12 0
r13 0xffffffeb
r14 0
r15 0x1
rip 0xffffffff8172f728 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800027f33040
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor.4) pid=391647 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff800028b6c2b0,0xffffffff829b39d0
process=0xffff800024aedb88 user=0xffff800027f2e000, vmspace=0xfffffd807f018660
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
56883 457330 10465 0 2 0 syz-executor.0
56883 430643 10465 0 3 0x4000080 fifow syz-executor.0
56883 255451 10465 0 3 0x4000080 fsleep syz-executor.0
56883 284320 10465 0 3 0x4000080 fsleep syz-executor.0
66330 243483 38732 0 2 0x480 syz-executor.1
66330 466084 38732 0 3 0x4000080 fsleep syz-executor.1
98914 421931 26585 0 2 0 syz-executor.4
*98914 391647 26585 0 7 0x4000000 syz-executor.4
88255 454814 634 0 2 0x480 syz-executor.7
88255 325926 634 0 3 0x4000080 netcon syz-executor.7
88255 37642 634 0 3 0x4000080 netcon syz-executor.7
88255 479718 634 0 3 0x4000080 fsleep syz-executor.7
39354 247315 67188 0 2 0x2 syz-executor.3
10465 324652 67188 0 3 0x82 nanoslp syz-executor.0
634 105485 67188 0 2 0x482 syz-executor.7
27603 268716 0 0 3 0x14280 nfsidl nfsio
36244 16737 0 0 3 0x14280 nfsidl nfsio
78324 373873 0 0 3 0x14280 nfsidl nfsio
24826 63336 0 0 3 0x14280 nfsidl nfsio
81087 113383 0 0 3 0x14280 nfsidl nfsio
98694 17758 0 0 3 0x14280 nfsidl nfsio
49964 271063 0 0 3 0x14200 bored sosplice
16454 375348 67188 0 2 0x2 syz-executor.6
53847 272912 67188 0 2 0x482 syz-executor.5
26585 515405 67188 0 3 0x82 nanoslp syz-executor.4
38732 391484 67188 0 2 0x482 syz-executor.1
89665 427791 67188 0 2 0x482 syz-executor.2
67188 331006 23099 0 3 0x82 thrsleep syz-fuzzer
67188 372167 23099 0 3 0x4000082 nanoslp syz-fuzzer
67188 424195 23099 0 3 0x4000082 thrsleep syz-fuzzer
67188 2373 23099 0 3 0x4000082 kqread syz-fuzzer
67188 182217 23099 0 3 0x4000082 thrsleep syz-fuzzer
67188 35798 23099 0 3 0x4000082 thrsleep syz-fuzzer
67188 356756 23099 0 3 0x4000082 thrsleep syz-fuzzer
67188 429971 23099 0 3 0x4000082 thrsleep syz-fuzzer
67188 206945 23099 0 3 0x4000082 thrsleep syz-fuzzer
23099 486287 1425 0 3 0x10008a sigsusp ksh
1425 411083 80406 0 3 0x9a poll sshd
21538 104676 1 0 3 0x100083 ttyin getty
80406 519700 1 0 3 0x88 poll sshd
92153 44724 21279 73 3 0x100090 kqread syslogd
21279 200516 1 0 3 0x100082 netio syslogd
75286 264191 1 0 3 0x100080 kqread resolvd
46612 294112 510 77 3 0x100092 kqread dhcpleased
43197 32440 510 77 3 0x100092 kqread dhcpleased
510 164747 1 0 3 0x80 kqread dhcpleased
31943 380432 0 0 3 0x14200 bored smr
29745 214436 0 0 2 0x14200 zerothread
1383 103860 0 0 3 0x14200 aiodoned aiodoned
87561 230387 0 0 3 0x14200 syncer update
19808 254644 0 0 3 0x14200 cleaner cleaner
31627 378 0 0 3 0x14200 reaper reaper
19262 210304 0 0 3 0x14200 pgdaemon pagedaemon
27823 103146 0 0 3 0x14200 bored viomb
83237 441508 0 0 3 0x40014200 acpi0 acpi0
94628 366994 0 0 3 0x14200 bored softnet
58912 409040 0 0 3 0x14200 bored systqmp
52300 396248 0 0 3 0x14200 bored systq
7172 311557 0 0 2 0x40014200 softclock
67204 469251 0 0 3 0x40014200 idle0
1 355720 0 0 3 0x80082 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 10195 6597K 7504K 78643K 15688 0
pcb 13 12K 14K 78643K 213 0
rtable 270 13K 16K 78643K 742 0
ifaddr 87 18K 19K 78643K 288 0
sysctl 2 0K 0K 78643K 2 0
counters 27 17K 17K 78643K 44 0
ioctlops 0 0K 4K 78643K 518 0
iov 0 0K 16K 78643K 151 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 4 0
vnodes 1347 84K 84K 78643K 3019 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 9K 78643K 24 0
VM map 2 0K 0K 78643K 2 0
sem 12 0K 0K 78643K 200 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 14 49K 77K 78643K 1186 0
sigio 0 0K 0K 78643K 48 0
proc 61 55K 71K 78643K 643 0
subproc 104 6K 6K 78643K 169 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 37 0
in_multi 99 6K 6K 78643K 166 0
ether_multi 1 0K 0K 78643K 10 0
mrt 0 0K 0K 78643K 6 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 151 678K 678K 78643K 151 0
exec 0 0K 2K 78643K 953 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 317 211K 1057K 78643K 15686 0
UVM aobj 93 3K 3K 78643K 95 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 18 0
NDP 11 0K 1K 78643K 54 0
temp 129 4699K 4763K 78643K 14127 0
kqueue 10 14K 20K 78643K 72 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 226 0 223 5 2 3 3 0 8 2
rtentry 112 179 0 66 4 0 4 4 0 8 0
unpcb 136 1232 0 1217 11 10 1 9 0 8 0
syncache 296 11 0 11 3 3 0 1 0 8 0
tcpqe 32 1 0 1 1 1 0 1 0 8 0
tcpcb 736 199 0 192 9 7 2 8 0 8 0
arp 88 31 0 13 1 0 1 1 0 8 0
inpcb 304 847 0 838 11 5 6 6 0 8 5
nd6 48 43 0 16 1 0 1 1 0 8 0
kcovpl 48 13 0 5 1 0 1 1 0 8 0
ppxss 1152 3 0 3 1 0 1 1 0 8 1
pfstscr 40 6 0 5 1 0 1 1 0 8 0
pfrktable 1344 76 0 65 3 1 2 2 0 8 0
pftag 88 1 0 0 1 0 1 1 0 8 0
pfstitem 24 8 0 6 1 0 1 1 0 8 0
pfstkey 112 12 0 10 1 0 1 1 0 8 0
pfstate 320 6 0 5 1 0 1 1 0 8 0
pfrule 1360 131 0 115 3 1 2 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 696 0 226 30 0 30 30 0 8 0
art_table 32 697 0 226 4 0 4 4 0 8 0
art_node 16 178 0 75 1 0 1 1 0 8 0
sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0
semapl 112 198 0 188 1 0 1 1 0 8 0
shmpl 112 92 0 2 4 1 3 3 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 3074 0 1636 91 0 91 91 0 8 0
ffsino 240 3074 0 1636 85 0 85 85 0 8 0
nchpl 144 4763 0 3137 63 0 63 63 0 8 0
uvmvnodes 80 4609 0 0 95 0 95 95 0 8 0
vnodes 224 4609 0 0 272 0 272 272 0 8 0
namei 1024 19480 0 19478 2 1 1 2 0 8 0
vcpupl 1984 9 0 0 2 0 2 2 0 8 0
vmpool 528 12 0 3 1 0 1 1 0 8 0
pfiaddrpl 120 31 0 18 2 1 1 1 0 8 0
scxspl 216 14448 0 14448 10 9 1 8 0 8 1
plimitpl 152 139 0 125 1 0 1 1 0 8 0
sigapl 424 1468 0 1423 7 1 6 6 0 8 0
futexpl 64 11908 0 11904 1 0 1 1 0 8 0
knotepl 112 722 0 648 3 0 3 3 0 8 0
kqueuepl 184 322 0 314 5 3 2 4 0 8 1
pipepl 304 249 0 220 8 5 3 8 0 8 0
fdescpl 432 1448 0 1423 4 0 4 4 0 8 0
filepl 120 11247 0 10999 27 13 14 20 0 8 6
lockfpl 104 561 0 558 2 1 1 2 0 8 0
lockfspl 48 86 0 83 1 0 1 1 0 8 0
sessionpl 144 28 0 12 1 0 1 1 0 8 0
pgrppl 48 48 0 32 1 0 1 1 0 8 0
ucredpl 96 1455 0 1445 1 0 1 1 0 8 0
zombiepl 144 1423 0 1421 1 0 1 1 0 8 0
processpl 1000 1468 0 1421 7 0 7 7 0 8 0
procpl 672 3119 0 3056 8 1 7 7 0 8 1
sosppl 168 11 0 11 2 2 0 1 0 8 0
sockpl 448 2307 0 2280 52 41 11 30 0 8 7
mcl64k 65536 93 0 93 2 1 1 1 0 8 1
mcl16k 16384 18 0 18 3 2 1 1 0 8 1
mcl12k 12288 51 0 51 2 1 1 1 0 8 1
mcl9k 9216 17 0 17 3 2 1 1 0 8 1
mcl8k 8192 80 0 80 2 1 1 1 0 8 1
mcl4k 4096 133 0 133 2 1 1 1 0 8 1
mcl2k2 2112 10 0 10 3 2 1 1 0 8 1
mcl2k 2048 77141 0 77025 19 3 16 16 0 8 0
mtagpl 96 234 0 63 6 1 5 5 0 8 0
mbufpl 256 129506 0 129119 49 17 32 48 0 8 5
bufpl 288 6181 0 143 432 0 432 432 0 8 0
anonpl 24 375250 0 358051 144 24 120 141 0 188 3
amapchunkpl 152 364979 0 364210 4899 4737 162 4423 0 158 129
amappl16 200 3599 0 2986 46 12 34 46 0 8 0
amappl15 192 393 0 384 1 0 1 1 0 8 0
amappl14 184 45 0 42 1 0 1 1 0 8 0
amappl13 176 112 0 110 1 0 1 1 0 8 0
amappl12 168 204 0 200 1 0 1 1 0 8 0
amappl11 160 208 0 196 1 0 1 1 0 8 0
amappl10 152 27 0 25 1 0 1 1 0 8 0
amappl9 144 829 0 821 1 0 1 1 0 8 0
amappl8 136 676 0 622 2 0 2 2 0 8 0
amappl7 128 153 0 143 1 0 1 1 0 8 0
amappl6 120 580 0 559 2 1 1 2 0 8 0
amappl5 112 992 0 978 1 0 1 1 0 8 0
amappl4 104 1162 0 1131 2 0 2 2 0 8 0
amappl3 96 460 0 447 1 0 1 1 0 8 0
amappl2 88 796 0 750 3 1 2 3 0 8 0
amappl1 80 28757 0 28215 19 6 13 18 0 8 0
amappl 88 15135 0 14907 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 94 0 2 2 0 2 2 0 8 0
uaddrrnd 24 1460 0 1426 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 1460 0 1426 1 0 1 1 0 8 0
vmmpekpl 168 14627 0 14574 3 0 3 3 0 8 0
vmmpepl 168 138564 0 136207 131 8 123 126 0 357 7
vmsppl 272 1459 0 1426 4 1 3 3 0 8 0
rwobjpl 24 37966 0 31724 38 0 38 38 0 8 0
pdppl 4096 2926 0 2861 153 80 73 73 0 8 8
pvpl 32 744663 0 723727 240 43 197 238 0 265 7
pmappl 216 1459 0 1426 3 0 3 3 0 8 0
extentpl 40 58 0 38 1 0 1 1 0 8 0
phpool 112 945 0 158 23 0 23 23 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(ffffffff8254be5b) at panic+0x161 sys/kern/subr_prf.c:202
__assert(ffffffff825bbf89,ffffffff825cdd9d,568,ffffffff8255ec6a) at __assert+0x25 sys/kern/subr_prf.c:161
m_align(fffffd80684fe900,ffffffeb) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385
bpf_movein(ffff800027f335c8,ffff800000bf8800,ffff800027f33328,ffff800027f33228) at bpf_movein+0x25e sys/net/bpf.c:228
bpfwrite(41700,ffff800027f335c8,1) at bpfwrite+0x128 sys/net/bpf.c:648
spec_write(ffff800027f33420) at spec_write+0xcb sys/kern/spec_vnops.c:309
VOP_WRITE(fffffd8073332b08,ffff800027f335c8,1,fffffd807f7d8480) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_write(fffffd8067d9f978,ffff800027f335c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414
dofilewritev(ffff80002161ea80,3,ffff800027f335c8,0,ffff800027f336c0) at dofilewritev+0x19c sys/kern/sys_generic.c:380
sys_write(ffff80002161ea80,ffff800027f33668,ffff800027f336c0) at sys_write+0x83 sys/kern/sys_generic.c:300
syscall(ffff800027f33730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xa8b00ac8f10, 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(ffffffff8254be5b) at panic+0x161 sys/kern/subr_prf.c:202
__assert(ffffffff825bbf89,ffffffff825cdd9d,568,ffffffff8255ec6a) at __assert+0x25 sys/kern/subr_prf.c:161
m_align(fffffd80684fe900,ffffffeb) at m_align+0x1a0 sys/kern/uipc_mbuf.c:1385
bpf_movein(ffff800027f335c8,ffff800000bf8800,ffff800027f33328,ffff800027f33228) at bpf_movein+0x25e sys/net/bpf.c:228
bpfwrite(41700,ffff800027f335c8,1) at bpfwrite+0x128 sys/net/bpf.c:648
spec_write(ffff800027f33420) at spec_write+0xcb sys/kern/spec_vnops.c:309
VOP_WRITE(fffffd8073332b08,ffff800027f335c8,1,fffffd807f7d8480) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_write(fffffd8067d9f978,ffff800027f335c8,0) at vn_write+0x152 sys/kern/vfs_vnops.c:414
dofilewritev(ffff80002161ea80,3,ffff800027f335c8,0,ffff800027f336c0) at dofilewritev+0x19c sys/kern/sys_generic.c:380
sys_write(ffff80002161ea80,ffff800027f33668,ffff800027f336c0) at sys_write+0x83 sys/kern/sys_generic.c:300
syscall(ffff800027f33730) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xa8b00ac8f10, count: -13
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.