Hello,
syzbot found the following issue on:
HEAD commit: e8eeea37c7e6 Return EPERM if uvm_map_immutable hits a MAP_..
git tree: openbsd
console output:
https://syzkaller.appspot.com/x/log.txt?x=13b92c70580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7058272de1526588
dashboard link:
https://syzkaller.appspot.com/bug?extid=580ddcc906e61f1b9dad
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/f157aac6cca5/disk-e8eeea37.raw.xz
bsd.gdb:
https://storage.googleapis.com/syzbot-assets/47933417a14f/bsd-e8eeea37.gdb.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/bd7534f4b057/kernel-e8eeea37.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+580ddc...@syzkaller.appspotmail.com
login: uvm_fault(0xfffffd806bebc5b8, 0x13060, 0, 2) -> e
kernel: page fault trap, code=2
Stopped at copyout+0x57: repe movsq (%rsi),%es:(%rdi)
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*243589 98280 0 0 0x4000000 0 syz-executor
379337 38266 0 0x14000 0x200 1 softnet0
copyout() at copyout+0x57
syscall(ffff80003c4cd750) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80003c4cd750) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xe98a2645660, count: 12
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: uvm_fault(0xfffffd806bebc5b8, 0x13060, 0, 2) -> e
ddb{0}> trace
copyout() at copyout+0x57
syscall(ffff80003c4cd750) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80003c4cd750) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xe98a2645660, count: -3
ddb{0}> show registers
rdi 0x13060 mp_pdirpa+0x205a
rsi 0xffff80003c4cd540
rbp 0xffff80003c4cd670
rbx 0xfffff67b
rdx 0xffff80003c4c8000
rcx 0x4
rax 0x20
r8 0x7f7fffffc000
r9 0
r10 0x76b0b96e1925d25b
r11 0xffffffff81e2c580 copy_fault
r12 0x3
r13 0x16
r14 0xffff80003c4cd750
r15 0xffff80003c4cd540
rip 0xffffffff81e2c4a7 copyout+0x57
cs 0x8
rflags 0x50202 acpi_pdirpa+0x3c073
rsp 0xffff80003c4cd3b0
ss 0x10
copyout+0x57: repe movsq (%rsi),%es:(%rdi)
ddb{0}> show proc
PROC (syz-executor) tid=243589 pid=98280 tcnt=2 stat=onproc
flags process=0 proc=4000000<THREAD>
runpri=50, usrpri=50, slppri=32, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
forw=0xffffffffffffffff, list=0xffff80003c45ea78,0xffffffff8397b330
process=0xffff80003c457360 user=0xffff80003c4c8000, vmspace=0xfffffd806bebc5b8
estcpu=36, cpticks=3, pctcpu=0.0, user=0, sys=3, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
98280 172182 6257 0 2 0 syz-executor
*98280 243589 6257 0 7 0x4000000 syz-executor
16349 378318 51999 0 2 0 syz-executor
8325 121503 90741 0 2 0 syz-executor
8325 438414 90741 0 3 0x4000080 fsleep syz-executor
8325 73414 90741 0 2 0x4000000 syz-executor
12677 252667 92053 0 2 0 syz-executor
12677 399788 92053 0 3 0x4000080 fsleep syz-executor
12187 343859 25388 0 2 0x10 syz-executor
12187 355571 25388 0 3 0x4000090 fsleep syz-executor
12187 128109 25388 0 3 0x4000090 fsleep syz-executor
49016 524157 60682 0 2 0 syz-executor
49016 443792 60682 0 3 0x4000080 fsleep syz-executor
49016 101419 60682 0 3 0x4000080 fsleep syz-executor
83792 34224 1 0 3 0x100083 ttyin getty
64559 99368 0 0 3 0x14280 nfsidl nfsio
87928 461786 0 0 3 0x14280 nfsidl nfsio
89947 367019 0 0 3 0x14280 nfsidl nfsio
2597 244002 0 0 3 0x14280 nfsidl nfsio
47707 490450 0 0 3 0x14280 nfsidl nfsio
87268 405345 0 0 3 0x14280 nfsidl nfsio
64258 38325 0 0 3 0x14280 nfsidl nfsio
44607 349972 0 0 3 0x14280 nfsidl nfsio
8615 228612 0 0 3 0x14280 nfsidl nfsio
97438 444745 0 0 3 0x14280 nfsidl nfsio
80679 513670 0 0 3 0x14280 nfsidl nfsio
84571 7381 0 0 3 0x14280 nfsidl nfsio
19845 65331 0 0 3 0x14280 nfsidl nfsio
93099 59154 0 0 3 0x14280 nfsidl nfsio
63389 210745 0 0 3 0x14280 nfsidl nfsio
13429 303280 0 0 3 0x14280 nfsidl nfsio
54938 518834 0 0 3 0x14280 nfsidl nfsio
13567 303370 0 0 3 0x14280 nfsidl nfsio
78185 187611 0 0 3 0x14280 nfsidl nfsio
32770 42119 0 0 3 0x14280 nfsidl nfsio
67689 377964 0 0 3 0x14200 bored sosplice
90741 231523 75386 0 2 0x2 syz-executor
51999 306571 75386 0 2 0x482 syz-executor
25388 79105 75386 0 2 0x2 syz-executor
44498 216006 75386 0 2 0x482 syz-executor
46420 241641 75386 0 3 0x82 wait syz-executor
92053 438744 75386 0 3 0x82 nanoslp syz-executor
6257 94989 75386 0 2 0x482 syz-executor
60682 312436 75386 0 3 0x82 nanoslp syz-executor
75386 120363 87156 0 3 0x82 kqread syz-executor
87156 410424 84621 0 3 0x10008a sigsusp ksh
84621 23452 52275 0 3 0x98 kqread sshd-session
52275 224577 58544 0 3 0x92 kqread sshd-session
58544 115270 1 0 3 0x88 kqread sshd
78696 180856 87852 74 3 0x1100092 bpf pflogd
87852 491707 1 0 3 0x80 sbwait pflogd
28187 350343 62127 73 3 0x1100090 kqread syslogd
62127 503336 1 0 3 0x100082 sbwait syslogd
58220 390268 1 0 3 0x100080 kqread resolvd
73276 136637 43420 77 3 0x100092 kqread dhcpleased
10866 176287 43420 77 3 0x100092 kqread dhcpleased
43420 105747 1 0 3 0x80 kqread dhcpleased
83938 393815 0 0 3 0x14200 bored smr
60681 79808 0 0 2 0x14200 zerothread
71661 80208 0 0 3 0x14200 aiodoned aiodoned
22817 356596 0 0 3 0x14200 syncer update
63319 438358 0 0 3 0x14200 cleaner cleaner
35260 117017 0 0 2 0x14200 reaper
27473 419799 0 0 3 0x14200 pgdaemon pagedaemon
92115 313453 0 0 3 0x14200 bored viomb
55994 312792 0 0 3 0x40014200 acpi0 acpi0
31929 456826 0 0 3 0x40014200 idle1
8953 55362 0 0 3 0x14200 bored softnet3
41769 24724 0 0 3 0x14200 bored softnet2
34553 100951 0 0 3 0x14200 bored softnet1
38266 379337 0 0 7 0x14200 softnet0
53911 81121 0 0 3 0x14200 bored systqmp
85548 181136 0 0 3 0x14200 bored systq
10539 118672 0 0 3 0x14200 tmoslp softclockmp
30146 245287 0 0 2 0x40014200 softclock
77852 150371 0 0 3 0x40014200 idle0
1 94365 0 0 3 0x82 wait init
0 0 -1 0 3 0x10010200 scheduler swapper
ddb{0}> show all locks
CPU 1:
exclusive mutex softnet0 r = 0 (0xffff80000002c028)
#0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5bb sys/kern/subr_witness.c:1160
#1 mtx_enter_try+0x178 sys/kern/kern_lock.c:-1
#2 mtx_enter+0x60 sys/kern/kern_lock.c:239
#3 msleep+0x183 sys/kern/kern_synch.c:250
#4 taskq_next_work+0x8e sys/kern/kern_task.c:399
#5 taskq_thread+0x1d5 sys/kern/kern_task.c:439
#6 proc_trampoline+0x10
Process 8325 (syz-executor) thread 0xffff80003c45e7e8 (73414)
exclusive rwlock vmmaplk r = 0 (0xfffffd8009eda2e0)
#0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5bb sys/kern/subr_witness.c:1160
#1 rw_do_enter_write+0x3ea sys/kern/kern_rwlock.c:316
#2 vm_map_lock_ln+0x12e sys/uvm/uvm_map.c:5250
#3 uvmfault_lookup+0xe8 sys/uvm/uvm_fault.c:1854
#4 uvm_fault_check+0x987 uvmfault_amapcopy sys/uvm/uvm_fault.c:235 [inline]
#4 uvm_fault_check+0x987 sys/uvm/uvm_fault.c:772
#5 uvm_fault+0x106 sys/uvm/uvm_fault.c:666
#6 upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:188
#7 usertrap+0x2d8 sys/arch/amd64/amd64/trap.c:436
#8 recall_trap+0x8
Process 35260 (reaper) thread 0xffff8000ffffcf68 (117017)
exclusive rwlock kmmaplk r = 0 (0xffffffff8397ffa0)
#0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5bb sys/kern/subr_witness.c:1160
#1 rw_do_enter_write+0x3ea sys/kern/kern_rwlock.c:316
#2 vm_map_lock_ln+0x12e sys/uvm/uvm_map.c:5250
#3 uvm_unmap+0x81 sys/uvm/uvm_map.c:1792
#4 km_free+0x87 sys/uvm/uvm_km.c:831
#5 uvm_uarea_free+0x4f sys/uvm/uvm_glue.c:285
#6 reaper+0x1fe sys/kern/kern_exit.c:467
#7 proc_trampoline+0x10
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10236 11070K 11768K 166960K 12165 0
pcb 18 13K 13K 166960K 97 0
rtable 344 11K 11K 166960K 760 0
pf 36 18K 21K 166960K 100 0
ifaddr 43 7K 8K 166960K 71 0
ifgroup 55 2K 2K 166960K 114 0
sysctl 3 1K 1K 166960K 5 0
counters 64 36K 37K 166960K 118 0
ioctlops 0 0K 4K 166960K 1622 0
iov 0 0K 12K 166960K 32 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1427 90K 90K 166960K 1811 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 10K 14K 166960K 16 0
VM map 2 1K 1K 166960K 2 0
sem 12 0K 0K 166960K 24 0
dirhash 12 2K 2K 166960K 15 0
ACPI 1692 195K 286K 166960K 12470 0
file desc 17 61K 93K 166960K 612 0
sigio 0 0K 0K 166960K 6 0
proc 72 91K 116K 166960K 591 0
subproc 72 4K 4K 166960K 72 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
ip_moptions 0 0K 0K 166960K 69 0
in_multi 98 7K 7K 166960K 127 0
ether_multi 1 0K 0K 166960K 6 0
mrt 2 0K 0K 166960K 6 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 223 996K 996K 166960K 223 0
exec 0 0K 1K 166960K 475 0
fusefs mount 1 32K 32K 166960K 1 0
pfkey data 0 0K 0K 166960K 1 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 242 160K 170K 166960K 7546 0
UVM aobj 24 4K 4K 166960K 27 0
pinsyscall 42 84K 104K 166960K 1742 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
ip6_options 0 0K 1K 166960K 25 0
NDP 12 0K 2K 166960K 43 0
temp 80 8692K 8760K 166960K 25808 0
kqueue 14 22K 36K 166960K 102 0
SYN cache 2 16K 16K 166960K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 26 0 0 1 0 1 1 0 8 0
rtpcb 120 194 0 191 3 2 1 3 0 8 0
rtentry 176 195 0 35 8 0 8 8 0 8 0
unpcb 144 565 0 542 5 3 2 5 0 8 1
syncache 336 4 0 4 1 1 0 1 0 8 0
tcpcb 808 350 0 346 14 7 7 8 0 8 6
arp 128 84 0 1 3 0 3 3 0 8 0
inpcb 384 821 0 813 23 14 9 14 0 8 8
nd6 144 27 0 3 1 0 1 1 0 8 0
pkpcb 40 5 0 5 2 1 1 1 0 8 1
kcovpl 48 8 0 0 1 0 1 1 0 8 0
ppxss 1192 16 0 16 1 0 1 1 0 8 1
pppxif 1504 6 0 6 1 0 1 1 0 8 1
pffrag 232 4 0 2 1 0 1 1 0 482 0
pffrnode 88 4 0 2 1 0 1 1 0 8 0
pffrent 40 7 0 5 1 0 1 1 0 8 0
pfosfp 40 1428 0 1005 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfanchor 1288 1 0 0 1 0 1 1 0 8 0
pftag 88 2 0 1 2 1 1 1 0 8 0
pfstitem 24 52 0 1 1 0 1 1 0 8 0
pfstkey 128 52 0 1 2 0 2 2 0 8 0
pfstate 384 52 0 1 6 0 6 6 0 8 0
pfrule 1344 26 0 19 2 1 1 2 0 8 0
rttmr 136 1 0 1 1 0 1 1 0 8 1
art_heap8 4096 2 0 0 2 0 2 2 0 8 0
art_heap4 256 580 0 150 31 2 29 30 0 8 1
art_table 32 582 0 150 4 0 4 4 0 8 0
art_node 16 192 0 106 1 0 1 1 0 8 0
sysvmsgpl 40 1 0 1 1 1 0 1 0 8 0
semapl 112 20 0 10 1 0 1 1 0 8 0
shmpl 112 24 0 3 1 0 1 1 0 8 0
dirhash 1024 19 0 2 3 0 3 3 0 8 0
dino2pl 256 2424 0 916 95 0 95 95 0 8 0
ffsino 288 2424 0 916 109 0 109 109 0 8 0
nchpl 144 3320 0 1629 64 0 64 64 0 8 0
rtmask 32 5 0 5 2 1 1 1 0 8 1
uvmvnodes 80 2807 0 0 58 0 58 58 0 8 0
vnodes 216 2807 0 0 156 0 156 156 0 8 0
namei 1024 11315 0 11314 2 1 1 1 0 8 0
percpumem 16 74 0 27 1 0 1 1 0 8 0
kstatmem 264 54 0 30 2 0 2 2 0 8 0
scsiplug 72 1 0 1 1 0 1 1 0 8 1
scxspl 216 10287 0 10287 6 5 1 4 1 8 1
plimitpl 152 136 0 117 1 0 1 1 0 8 0
sigapl 424 947 0 876 9 0 9 9 0 8 0
futexpl 64 7524 0 7518 1 0 1 1 0 8 0
knotepl 120 532 0 0 16 0 16 16 0 8 0
kqueuepl 224 304 0 293 9 4 5 5 0 8 4
pipepl 336 178 0 151 6 0 6 6 0 8 3
fdescpl 520 907 0 876 3 0 3 3 0 8 0
filepl 160 5876 0 5649 25 8 17 18 0 8 6
lockfpl 104 228 0 225 1 0 1 1 0 8 0
lockfspl 48 71 0 68 1 0 1 1 0 8 0
sessionpl 144 24 0 15 1 0 1 1 0 8 0
pgrppl 48 34 0 17 1 0 1 1 0 8 0
ucredpl 104 703 0 687 1 0 1 1 0 8 0
zombiepl 144 956 0 954 1 0 1 1 0 8 0
processpl 1192 947 0 876 6 0 6 6 0 8 0
procpl 656 1782 0 1700 8 0 8 8 0 8 0
sosppl 168 5 0 5 2 1 1 1 0 8 1
sockpl 728 1592 0 1558 33 22 11 21 0 8 7
mcl64k 65536 3 0 0 1 0 1 1 0 8 0
mcl16k 16384 1 0 0 1 0 1 1 0 8 0
mcl8k 8192 2 0 0 1 0 1 1 0 8 0
mcl4k 4096 126 0 0 16 0 16 16 0 8 0
mcl2k2 2112 1 0 0 1 0 1 1 0 8 0
mcl2k 2048 23 0 0 3 0 3 3 0 8 0
mtagpl 96 87 0 0 3 0 3 3 0 8 0
mbufpl 256 7553 0 0 473 0 473 473 0 8 0
bufpl 280 3366 0 133 231 0 231 231 0 8 0
anonpl 32 7528 0 0 61 0 61 61 0 246 0
amapchunkpl 152 23671 0 23183 36 10 26 31 0 158 4
amappl16 200 2829 0 2794 20 10 10 15 0 8 8
amappl15 192 5 0 5 1 1 0 1 0 8 0
amappl14 184 118 0 106 1 0 1 1 0 8 0
amappl13 176 4 0 4 1 1 0 1 0 8 0
amappl12 168 1567 0 1536 3 1 2 2 0 8 0
amappl11 160 56 0 41 1 0 1 1 0 8 0
amappl10 152 9 0 9 1 1 0 1 0 8 0
amappl9 144 253 0 252 1 0 1 1 0 8 0
amappl8 136 23 0 21 1 0 1 1 0 8 0
amappl7 128 109 0 97 1 0 1 1 0 8 0
amappl6 120 181 0 177 1 0 1 1 0 8 0
amappl5 112 126 0 117 1 0 1 1 0 8 0
amappl4 104 333 0 313 1 0 1 1 0 8 0
amappl3 96 4540 0 4427 5 1 4 4 0 8 0
amappl2 88 661 0 594 2 0 2 2 0 8 0
amappl1 80 10512 0 9903 15 0 15 15 0 8 0
amappl 88 6737 0 6570 5 0 5 5 0 92 0
dma4096 4096 2 0 2 2 2 0 1 0 8 0
dma1024 1024 4 0 3 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 254 0 254 2 1 1 1 0 8 1
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 26 0 3 1 0 1 1 0 8 0
uaddrrnd 24 907 0 875 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 907 0 875 1 0 1 1 0 8 0
vmmpekpl 168 9091 0 9055 3 0 3 3 0 8 0
vmmpepl 168 62798 0 60739 103 4 99 99 0 357 4
vmsppl 480 906 0 875 5 1 4 5 0 8 0
rwobjpl 72 21513 0 17739 72 0 72 72 0 8 0
pdppl 4096 1821 0 1750 105 34 71 85 0 8 0
pvpl 32 13421 0 0 109 0 109 109 0 265 0
pmappl 256 906 0 875 3 0 3 3 0 8 0
extentpl 40 45 0 27 1 0 1 1 0 8 0
phpool 112 870 0 48 24 0 24 24 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
copyout() at copyout+0x57
syscall(ffff80003c4cd750) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80003c4cd750) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xe98a2645660, count: -3
ddb{0}> machine ddbcpu 1
---
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.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup