uvm_fault: m_copyback

0 views
Skip to first unread message

syzbot

unread,
Aug 8, 2020, 12:48:16 PM8/8/20
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a395eaf7 Greatly simplify snmpe_parsevarbinds. except for ..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=10c950d6900000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=947e89e06ac3fec187d0

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+947e89...@syzkaller.appspotmail.com

uvm_fault(0xffffffff8277aa10, 0xffffffff82679710, 0, 2) -> e
kernel: page fault trap, code=0
Stopped at m_copyback+0x119: addq $0x1,0x8(%rcx,%rbx,8)
ddb{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
kernel page fault
uvm_fault(0xffffffff8277aa10, 0xffffffff82679710, 0, 2) -> e
m_copyback(ffff800023109720,138,0,ffff8000231098e4,2) at m_copyback+0x119 m_get sys/sys/percpu.h:125 [inline]
m_copyback(ffff800023109720,138,0,ffff8000231098e4,2) at m_copyback+0x119 sys/kern/uipc_mbuf.c:756
end trace frame: 0xffff8000231099a0, count: 0
ddb{0}> trace
m_copyback(ffff800023109720,138,0,ffff8000231098e4,2) at m_copyback+0x119 m_get sys/sys/percpu.h:125 [inline]
m_copyback(ffff800023109720,138,0,ffff8000231098e4,2) at m_copyback+0x119 sys/kern/uipc_mbuf.c:756
pflog_mtap(ffff800000044900,ffff8000231099c8,fffffd806a035600) at pflog_mtap+0x446 sys/net/if_pflog.c:389
pflog_packet(ffff800023109ac8,0,ffff800000ac0548,0,ffffffff82879b30,0) at pflog_packet+0x3a4
pf_test(18,1,ffff800000adc000,ffff800023109d98) at pf_test+0xfc5 sys/net/pf.c:7226
ip6_input_if(ffff800023109d98,ffff800023109da4,29,0,ffff800000adc000) at ip6_input_if+0x945 sys/netinet6/ip6_input.c:300
ipv6_input(ffff800000adc000,fffffd806a035600) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171
tun_dev_write(5d00,ffff80002310a088,ffff800020eed000,2) at tun_dev_write+0x204 sys/net/if_tun.c:868
spec_write(ffff800023109ee0) at spec_write+0xd4 sys/kern/spec_vnops.c:309
VOP_WRITE(fffffd80716d54e8,ffff80002310a088,11,fffffd807f7bf900) at VOP_WRITE+0xc6 sys/kern/vfs_vops.c:268
vn_write(fffffd80670cc3a8,ffff80002310a088,0) at vn_write+0x14e sys/kern/vfs_vnops.c:414
dofilewritev(ffff800020eb0ee8,f0,ffff80002310a088,0,ffff80002310a170) at dofilewritev+0x1ab sys/kern/sys_generic.c:365
sys_write(ffff800020eb0ee8,ffff80002310a120,ffff80002310a170) at sys_write+0x83 sys/kern/sys_generic.c:285
syscall(ffff80002310a1f0) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002310a1f0) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:570
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x5cc6a5ef330, count: -14
ddb{0}> show registers
rdi 0
rsi 0x65b3f acpi_pdirpa+0x519a7
rbp 0xffff800023109700
rbx 0xffffffffffff8f99
rdx 0x65b3e acpi_pdirpa+0x519a6
rcx 0xffffffff826b1a40 mbstat_boot_boot_cpumem
rax 0
r8 0x2
r9 0xffffffff81e7a848 pf_translate_a+0x1a8
r10 0x1
r11 0x2b5850239bbd4547
r12 0xfffffd80712c1900
r13 0x108
r14 0x30
r15 0xffff800023109900
rip 0xffffffff81142cf9 m_copyback+0x119
cs 0x8
rflags 0x10246 __ALIGN_SIZE+0xf246
rsp 0xffff800023109640
ss 0x10
m_copyback+0x119: addq $0x1,0x8(%rcx,%rbx,8)
ddb{0}> show proc
PROC (syz-executor.0) pid=509135 stat=onproc
flags process=10<SUGID> proc=4000000<THREAD>
pri=32, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff800020eb0c70,0xffffffff82888178
process=0xffff800020eb2bd8 user=0xffff800023105000, vmspace=0xfffffd807effe2e0
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
96302 118603 74223 60928 7 0x10 syz-executor.0
*96302 509135 74223 60928 7 0x4000010 syz-executor.0
55711 478208 52483 0 2 0 syz-executor.1
55711 263928 52483 0 3 0x4000080 kqread syz-executor.1
21251 366527 0 0 3 0x14200 bored sosplice
52483 330785 89727 0 3 0x82 nanosleep syz-executor.1
74223 118893 89727 0 3 0x82 nanosleep syz-executor.0
89727 455575 74916 0 3 0x82 thrsleep syz-fuzzer
89727 73478 74916 0 3 0x4000082 thrsleep syz-fuzzer
89727 224912 74916 0 3 0x4000082 thrsleep syz-fuzzer
89727 373346 74916 0 3 0x4000082 thrsleep syz-fuzzer
89727 453817 74916 0 3 0x4000082 thrsleep syz-fuzzer
89727 519753 74916 0 3 0x4000082 thrsleep syz-fuzzer
89727 26040 74916 0 3 0x4000082 thrsleep syz-fuzzer
89727 341371 74916 0 3 0x4000082 kqread syz-fuzzer
74916 230213 80195 0 3 0x10008a pause ksh
80195 176302 22321 0 3 0x92 select sshd
73533 178261 1 0 3 0x100083 ttyin getty
22321 364726 1 0 3 0x80 select sshd
98975 47837 32954 74 3 0x100092 bpf pflogd
32954 179290 1 0 3 0x80 netio pflogd
14877 377361 40526 73 3 0x100090 kqread syslogd
40526 422687 1 0 3 0x100082 netio syslogd
27790 255573 1 77 3 0x100090 poll dhclient
21339 137980 1 0 3 0x80 poll dhclient
28969 43463 0 0 3 0x14200 bored smr
72841 415012 0 0 2 0x14200 zerothread
18079 93889 0 0 3 0x14200 aiodoned aiodoned
89501 228846 0 0 3 0x14200 syncer update
41153 449164 0 0 3 0x14200 cleaner cleaner
25871 62649 0 0 3 0x14200 reaper reaper
79344 495085 0 0 3 0x14200 pgdaemon pagedaemon
72286 162020 0 0 3 0x14200 bored crynlk
94844 342970 0 0 3 0x14200 bored crypto
14409 181438 0 0 3 0x40014200 acpi0 acpi0
28756 190345 0 0 3 0x40014200 idle1
54087 122462 0 0 3 0x14200 bored softnet
99906 333877 0 0 3 0x14200 bored systqmp
14479 202485 0 0 3 0x14200 bored systq
56672 10252 0 0 3 0x40014200 bored softclock
95811 467422 0 0 3 0x40014200 idle0
1 135431 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 96302 (syz-executor.0) thread 0xffff800020eb0ee8 (509135)
exclusive rwlock netlock r = 0 (0xffffffff827435e0)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1164
#1 tun_dev_write+0x1f9 sys/net/if_tun.c:867
#2 spec_write+0xd4 sys/kern/spec_vnops.c:309
#3 VOP_WRITE+0xc6 sys/kern/vfs_vops.c:268
#4 vn_write+0x14e sys/kern/vfs_vnops.c:414
#5 dofilewritev+0x1ab sys/kern/sys_generic.c:365
#6 sys_write+0x83 sys/kern/sys_generic.c:285
#7 syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#7 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:570
#8 Xsyscall+0x128
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff8289f9d8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1164
#1 vn_write+0x42 sys/kern/vfs_vnops.c:399
#2 dofilewritev+0x1ab sys/kern/sys_generic.c:365
#3 sys_write+0x83 sys/kern/sys_generic.c:285
#4 syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#4 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:570
#5 Xsyscall+0x128
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9472 6397K 6526K 78643K 10582 0
pcb 13 8K 8K 78643K 25 0
rtable 110 4K 5K 78643K 206 0
ifaddr 45 10K 10K 78643K 46 0
sysctl 2 0K 0K 78643K 2 0
counters 43 33K 33K 78643K 43 0
ioctlops 0 0K 4K 78643K 1476 0
mount 1 1K 1K 78643K 1 0
vnodes 1219 77K 77K 78643K 1228 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 5K 78643K 3 0
VM map 2 1K 1K 78643K 2 0
sem 7 0K 0K 78643K 7 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1824 197K 290K 78643K 13058 0
file desc 6 17K 25K 78643K 78 0
proc 60 63K 95K 78643K 449 0
subproc 32 2K 2K 78643K 34 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 4 0
in_multi 33 2K 2K 78643K 36 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 43 201K 201K 78643K 43 0
exec 0 0K 2K 78643K 358 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 137 24K 24K 78643K 985 0
UVM aobj 11 6K 6K 78643K 11 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 6 0
NDP 6 0K 0K 78643K 10 0
temp 80 3960K 4024K 78643K 2148 0
kqueue 3 4K 8K 78643K 5 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
arp 64 6 0 0 1 0 1 1 0 8 0
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 88 19 0 17 1 0 1 1 0 8 0
rtentry 112 45 0 1 2 0 2 2 0 8 0
unpcb 120 73 0 63 1 0 1 1 0 8 0
syncache 272 4 0 4 1 1 0 1 0 8 0
tcpqe 32 182 0 182 2 2 0 1 0 8 0
tcpcb 592 31 0 27 1 0 1 1 0 8 0
inpcb 296 95 0 88 1 0 1 1 0 8 0
nd6 48 6 0 0 1 0 1 1 0 8 0
pfosfp 40 846 0 423 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfrktable 1344 3 0 1 1 0 1 1 0 8 0
pfstitem 24 12 0 1 1 0 1 1 0 8 0
pfstkey 112 12 0 1 1 0 1 1 0 8 0
pfstate 328 12 0 1 1 0 1 1 0 8 0
pfrule 1360 23 0 15 2 0 2 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 188 0 0 12 0 12 12 0 8 0
art_table 32 189 0 0 2 0 2 2 0 8 0
art_node 16 44 0 4 1 0 1 1 0 8 0
sysvmsgpl 40 6 0 1 1 0 1 1 0 8 0
semapl 112 5 0 0 1 0 1 1 0 8 0
shmpl 112 8 0 0 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1479 0 74 88 0 88 88 0 8 0
ffsino 272 1479 0 74 94 0 94 94 0 8 0
nchpl 144 1763 0 158 60 0 60 60 0 8 0
uvmvnodes 72 1525 0 0 28 0 28 28 0 8 0
vnodes 208 1525 0 0 81 0 81 81 0 8 0
namei 1024 4653 0 4653 2 1 1 1 0 8 1
percpumem 16 32 0 0 1 0 1 1 0 8 0
pfiaddrpl 120 1 0 0 1 0 1 1 0 8 0
scxspl 200 5264 0 5264 9 8 1 7 0 8 1
plimitpl 152 17 0 9 1 0 1 1 0 8 0
sigapl 424 294 0 261 4 0 4 4 0 8 0
futexpl 56 734 0 734 2 1 1 1 0 8 1
knotepl 112 64 0 44 1 0 1 1 0 8 0
kqueuepl 152 44 0 18 2 0 2 2 0 8 0
pipepl 304 106 0 95 4 1 3 3 0 8 2
fdescpl 496 278 0 261 3 0 3 3 0 8 0
filepl 152 1484 0 1380 8 1 7 7 0 8 2
lockfpl 104 21 0 20 1 0 1 1 0 8 0
lockfspl 48 7 0 6 1 0 1 1 0 8 0
sessionpl 120 18 0 7 1 0 1 1 0 8 0
pgrppl 48 20 0 9 1 0 1 1 0 8 0
ucredpl 96 122 0 111 1 0 1 1 0 8 0
zombiepl 144 261 0 261 1 0 1 1 0 8 1
processpl 1008 294 0 261 5 0 5 5 0 8 0
procpl 632 439 0 397 5 0 5 5 0 8 1
sosppl 144 2 0 2 1 1 0 1 0 8 0
sockpl 400 187 0 168 5 1 4 4 0 8 2
mcl12k 12288 1 0 0 1 0 1 1 0 8 0
mcl9k 9216 1 0 0 1 0 1 1 0 8 0
mcl4k 4096 4 0 0 1 0 1 1 0 8 0
mcl2k 2048 179 0 0 22 0 22 22 0 8 0
mtagpl 96 3 0 0 1 0 1 1 0 8 0
mbufpl 256 180 0 0 11 0 11 11 0 8 0
bufpl 280 3532 0 181 240 0 240 240 0 8 0
anonpl 16 46937 0 30465 70 3 67 68 0 124 0
amapchunkpl 152 1539 0 1263 14 2 12 13 0 158 0
amappl16 192 1289 0 523 41 2 39 39 0 8 0
amappl15 184 1 0 0 1 0 1 1 0 8 0
amappl14 176 22 0 18 1 0 1 1 0 8 0
amappl13 168 33 0 31 1 0 1 1 0 8 0
amappl12 160 11 0 8 1 0 1 1 0 8 0
amappl11 152 55 0 39 1 0 1 1 0 8 0
amappl10 144 35 0 27 1 0 1 1 0 8 0
amappl9 136 363 0 362 1 0 1 1 0 8 0
amappl8 128 129 0 88 2 0 2 2 0 8 0
amappl7 120 276 0 269 1 0 1 1 0 8 0
amappl6 112 129 0 113 1 0 1 1 0 8 0
amappl5 104 349 0 334 1 0 1 1 0 8 0
amappl4 96 285 0 262 1 0 1 1 0 8 0
amappl3 88 74 0 64 1 0 1 1 0 8 0
amappl2 80 1295 0 1219 3 1 2 3 0 8 0
amappl1 72 17374 0 16895 24 14 10 19 0 8 0
amappl 80 718 0 637 2 0 2 2 0 84 0
dma4096 4096 1 0 1 1 1 0 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 64 10 0 0 1 0 1 1 0 8 0
uaddrrnd 24 278 0 261 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 278 0 261 1 0 1 1 0 8 0
vmmpekpl 168 6527 0 6494 2 0 2 2 0 8 0
vmmpepl 168 42671 0 40591 116 24 92 110 0 357 1
vmsppl 368 277 0 261 2 0 2 2 0 8 0
pdppl 4096 563 0 522 6 0 6 6 0 8 0
pvpl 32 164173 0 143893 186 21 165 177 0 265 1
pmappl 232 277 0 261 2 1 1 2 0 8 0
extentpl 40 53 0 36 1 0 1 1 0 8 0
phpool 112 252 0 5 8 0 8 8 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
m_copyback(ffff800023109720,138,0,ffff8000231098e4,2) at m_copyback+0x119 m_get sys/sys/percpu.h:125 [inline]
m_copyback(ffff800023109720,138,0,ffff8000231098e4,2) at m_copyback+0x119 sys/kern/uipc_mbuf.c:756
pflog_mtap(ffff800000044900,ffff8000231099c8,fffffd806a035600) at pflog_mtap+0x446 sys/net/if_pflog.c:389
pflog_packet(ffff800023109ac8,0,ffff800000ac0548,0,ffffffff82879b30,0) at pflog_packet+0x3a4
pf_test(18,1,ffff800000adc000,ffff800023109d98) at pf_test+0xfc5 sys/net/pf.c:7226
ip6_input_if(ffff800023109d98,ffff800023109da4,29,0,ffff800000adc000) at ip6_input_if+0x945 sys/netinet6/ip6_input.c:300
ipv6_input(ffff800000adc000,fffffd806a035600) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171
tun_dev_write(5d00,ffff80002310a088,ffff800020eed000,2) at tun_dev_write+0x204 sys/net/if_tun.c:868
spec_write(ffff800023109ee0) at spec_write+0xd4 sys/kern/spec_vnops.c:309
VOP_WRITE(fffffd80716d54e8,ffff80002310a088,11,fffffd807f7bf900) at VOP_WRITE+0xc6 sys/kern/vfs_vops.c:268
vn_write(fffffd80670cc3a8,ffff80002310a088,0) at vn_write+0x14e sys/kern/vfs_vnops.c:414
dofilewritev(ffff800020eb0ee8,f0,ffff80002310a088,0,ffff80002310a170) at dofilewritev+0x1ab sys/kern/sys_generic.c:365
sys_write(ffff800020eb0ee8,ffff80002310a120,ffff80002310a170) at sys_write+0x83 sys/kern/sys_generic.c:285
syscall(ffff80002310a1f0) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002310a1f0) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:570
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x5cc6a5ef330, count: -14
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
ddb{1}> trace
x86_ipi_db(ffff800020d80ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
nanotime(ffff800021ef25a8) at nanotime+0x11a BINTIME_TO_TIMESPEC sys/sys/time.h:230 [inline]
nanotime(ffff800021ef25a8) at nanotime+0x11a sys/kern/kern_tc.c:278
clock_gettime(ffff800020eb0c70,0,ffff800021ef25a8) at clock_gettime+0x9d sys/kern/kern_time.c:116
sys_clock_gettime(ffff800020eb0c70,ffff800021ef2610,ffff800021ef2660) at sys_clock_gettime+0x4c sys/kern/kern_time.c:165
syscall(ffff800021ef26e0) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021ef26e0) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:570
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffc4a80, count: -8


---
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.
Reply all
Reply to author
Forward
0 new messages