multicore test error: uvm_fault: spllower

2 views
Skip to first unread message

syzbot

unread,
Dec 2, 2020, 6:41:26 PM12/2/20
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1ea95950 Prevent a TOCTOU race in single_thread_set() by e..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=13ddd44d500000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=a293948d449052374fbe

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a29394...@syzkaller.appspotmail.com

login: uvm_fault(0xfffffd807eff95c0, 0x8bc2c5b0, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at spllower+0x34: movq 0x5c0(%r12,%rax,8),%rbx
ddb{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
kernel page fault
uvm_fault(0xfffffd807eff95c0, 0x8bc2c5b0, 0, 1) -> e
spllower(ffff8000212a6000) at spllower+0x34 sys/arch/amd64/amd64/intr.c:716
end trace frame: 0xffff8000222abc90, count: 0
ddb{0}> trace
spllower(ffff8000212a6000) at spllower+0x34 sys/arch/amd64/amd64/intr.c:716
single_thread_check_locked(ffff80002123c2a8,0) at single_thread_check_locked+0x196 sys/kern/kern_sig.c:1970
userret(ffff80002123c2a8) at userret+0x335 single_thread_check sys/kern/kern_sig.c:1991 [inline]
userret(ffff80002123c2a8) at userret+0x335 sys/kern/kern_sig.c:1936
syscall(ffff8000222abdc0) at syscall+0x55c mi_syscall_return sys/sys/syscall_mi.h:129 [inline]
syscall(ffff8000222abdc0) at syscall+0x55c sys/arch/amd64/amd64/trap.c:612
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7b590aaca0, count: -5
ddb{0}> show registers
rdi 0xffff8000212a6000
rsi 0xa0e
rbp 0xffff8000222abc30
rbx 0x1000 __ALIGN_SIZE
rdx 0xffff8000212a6000
rcx 0xa0d
rax 0x212a6000
r8 0xffffffff819ec850 setrunnable+0xa0
r9 0x5
r10 0x52e24d48bad6d055
r11 0xd0b162d633066063
r12 0xffffffff826fbff0 cpu_info_full_primary+0x1ff0
r13 0x1
r14 0x212a6000
r15 0xffff80002123c2a8
rip 0xffffffff814e22e4 spllower+0x34
cs 0x8
rflags 0x10246 __ALIGN_SIZE+0xf246
rsp 0xffff8000222abbe0
ss 0x10
spllower+0x34: movq 0x5c0(%r12,%rax,8),%rbx
ddb{0}> show proc
PROC (syz-executor.0) pid=374414 stat=onproc
flags process=1000<SINGLEEXIT> proc=4080000<SUSPSINGLE,THREAD>
pri=32, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff80002123c018,0xffffffff828e7f70
process=0xffff8000212358d0 user=0xffff8000222a6000, vmspace=0xfffffd807eff95c0
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
3175 482227 22051 0 7 0x3000 syz-executor.0
* 3175 374414 22051 0 7 0x4081000 syz-executor.0
22051 60813 97417 0 3 0x82 nanosleep syz-executor.0
97417 228537 78878 0 3 0x82 kqread syz-fuzzer
97417 511857 78878 0 3 0x4000082 nanosleep syz-fuzzer
97417 175263 78878 0 3 0x4000082 nanosleep syz-fuzzer
97417 272790 78878 0 3 0x4000082 thrsleep syz-fuzzer
97417 375543 78878 0 3 0x4000082 thrsleep syz-fuzzer
97417 439223 78878 0 3 0x4000082 thrsleep syz-fuzzer
97417 481954 78878 0 3 0x4000082 thrsleep syz-fuzzer
78878 140079 72277 0 3 0x10008a pause ksh
72277 222840 34229 0 3 0x92 select sshd
25525 103913 1 0 3 0x100083 ttyin getty
34229 219307 1 0 3 0x80 select sshd
77114 255501 20164 74 3 0x100092 bpf pflogd
20164 420967 1 0 3 0x80 netio pflogd
18887 149629 94061 73 3 0x100090 kqread syslogd
94061 354212 1 0 3 0x100082 netio syslogd
74461 352682 1 77 3 0x100090 poll dhclient
33090 129406 1 0 3 0x80 poll dhclient
59011 142833 0 0 3 0x14200 bored smr
10619 344049 0 0 3 0x14200 pgzero zerothread
88459 481845 0 0 3 0x14200 aiodoned aiodoned
63248 266895 0 0 3 0x14200 syncer update
55855 125641 0 0 3 0x14200 cleaner cleaner
16976 182980 0 0 3 0x14200 reaper reaper
51314 328528 0 0 3 0x14200 pgdaemon pagedaemon
99633 451723 0 0 3 0x14200 bored crynlk
43372 123380 0 0 3 0x14200 bored crypto
96035 511294 0 0 3 0x14200 bored viomb
90146 302214 0 0 3 0x40014200 acpi0 acpi0
95034 187891 0 0 3 0x40014200 idle1
96477 225926 0 0 3 0x14200 bored softnet
23695 352927 0 0 3 0x14200 bored systqmp
28367 246318 0 0 3 0x14200 bored systq
77932 47900 0 0 3 0x40014200 bored softclock
33001 19503 0 0 3 0x40014200 idle0
1 258084 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 3175 (syz-executor.0) thread 0xffff80002123c2a8 (374414)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828ce4d8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1176
#1 kpageflttrap+0x23f sys/arch/amd64/amd64/trap.c:277
#2 kerntrap+0xef sys/arch/amd64/amd64/trap.c:321
#3 alltraps_kern_meltdown+0x7b
#4 spllower+0x34 sys/arch/amd64/amd64/intr.c:716
#5 single_thread_check_locked+0x196 sys/kern/kern_sig.c:1970
#6 userret+0x335 single_thread_check sys/kern/kern_sig.c:1991 [inline]
#6 userret+0x335 sys/kern/kern_sig.c:1936
#7 syscall+0x55c mi_syscall_return sys/sys/syscall_mi.h:129 [inline]
#7 syscall+0x55c sys/arch/amd64/amd64/trap.c:612
#8 Xsyscall+0x128
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9479 6413K 6413K 78643K 10569 0
pcb 13 8K 8K 78643K 13 0
rtable 83 2K 2K 78643K 163 0
ifaddr 37 9K 9K 78643K 38 0
counters 41 33K 33K 78643K 41 0
ioctlops 0 0K 4K 78643K 1468 0
mount 1 1K 1K 78643K 1 0
vnodes 1200 75K 75K 78643K 1205 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1825 197K 290K 78643K 13109 0
file desc 3 8K 12K 78643K 18 0
proc 59 63K 83K 78643K 407 0
subproc 16 1K 1K 78643K 17 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 22 1K 1K 78643K 22 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 19 95K 95K 78643K 19 0
exec 0 0K 2K 78643K 336 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 58 11K 11K 78643K 687 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 7 0K 0K 78643K 7 0
temp 45 3954K 4017K 78643K 1913 0
kqueue 3 4K 4K 78643K 3 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 4 0 0 1 0 1 1 0 8 0
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 120 17 0 15 1 0 1 1 0 8 0
rtentry 112 34 0 1 1 0 1 1 0 8 0
unpcb 120 25 0 15 1 0 1 1 0 8 0
syncache 296 4 0 4 1 0 1 1 0 8 1
tcpcb 736 10 0 4 1 0 1 1 0 8 0
inpcb 296 35 0 29 1 0 1 1 0 8 0
nd6 48 3 0 0 1 0 1 1 0 8 0
kcovpl 48 1 0 0 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
pfstitem 24 11 0 0 1 0 1 1 0 8 0
pfstkey 112 11 0 0 1 0 1 1 0 8 0
pfstate 328 11 0 0 1 0 1 1 0 8 0
pfrule 1360 21 0 16 2 1 1 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 144 0 0 9 0 9 9 0 8 0
art_table 32 145 0 0 2 0 2 2 0 8 0
art_node 16 33 0 3 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1421 0 22 88 0 88 88 0 8 0
ffsino 272 1421 0 22 94 0 94 94 0 8 0
nchpl 144 1636 0 38 60 0 60 60 0 8 0
uvmvnodes 72 1448 0 0 27 0 27 27 0 8 0
vnodes 208 1448 0 0 77 0 77 77 0 8 0
namei 1024 4118 0 4118 1 0 1 1 0 8 1
percpumem 16 31 0 0 1 0 1 1 0 8 0
scxspl 216 4857 0 4857 2 1 1 2 0 8 1
plimitpl 152 14 0 7 1 0 1 1 0 8 0
sigapl 424 239 0 208 4 0 4 4 0 8 0
futexpl 56 2 0 2 1 0 1 1 0 8 1
knotepl 112 62 0 50 1 0 1 1 0 8 0
kqueuepl 152 2 0 0 1 0 1 1 0 8 0
pipepl 304 76 0 68 1 0 1 1 0 8 0
fdescpl 496 223 0 208 3 0 3 3 0 8 0
filepl 152 1055 0 979 4 0 4 4 0 8 1
lockfpl 104 5 0 4 1 0 1 1 0 8 0
lockfspl 48 3 0 2 1 0 1 1 0 8 0
sessionpl 144 17 0 7 1 0 1 1 0 8 0
pgrppl 48 17 0 7 1 0 1 1 0 8 0
ucredpl 96 53 0 44 1 0 1 1 0 8 0
zombiepl 144 208 0 208 1 0 1 1 0 8 1
processpl 1056 239 0 208 3 0 3 3 0 8 0
procpl 656 246 0 208 4 0 4 4 0 8 0
sockpl 400 77 0 59 3 0 3 3 0 8 1
mcl4k 4096 1 0 0 1 0 1 1 0 8 0
mcl2k 2048 89 0 0 12 0 12 12 0 8 1
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 116 0 0 7 0 7 7 0 8 0
bufpl 280 3529 0 181 240 0 240 240 0 8 0
anonpl 16 24328 0 22113 16 1 15 15 0 124 4
amapchunkpl 152 776 0 701 5 0 5 5 0 158 1
amappl16 192 163 0 105 4 0 4 4 0 8 1
amappl15 184 2 0 0 1 0 1 1 0 8 0
amappl14 176 25 0 18 1 0 1 1 0 8 0
amappl13 168 22 0 19 1 0 1 1 0 8 0
amappl12 160 11 0 9 1 0 1 1 0 8 0
amappl11 152 56 0 41 1 0 1 1 0 8 0
amappl10 144 10 0 7 1 0 1 1 0 8 0
amappl9 136 387 0 385 1 0 1 1 0 8 0
amappl8 128 87 0 71 1 0 1 1 0 8 0
amappl7 120 238 0 230 1 0 1 1 0 8 0
amappl6 112 61 0 51 1 0 1 1 0 8 0
amappl5 104 359 0 342 1 0 1 1 0 8 0
amappl4 96 280 0 256 1 0 1 1 0 8 0
amappl3 88 114 0 106 1 0 1 1 0 8 0
amappl2 80 916 0 854 2 0 2 2 0 8 0
amappl1 72 15194 0 14736 24 5 19 19 0 8 9
amappl 80 465 0 435 1 0 1 1 0 84 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 64 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 223 0 208 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 223 0 208 1 0 1 1 0 8 0
vmmpekpl 168 6008 0 5986 2 0 2 2 0 8 0
vmmpepl 168 33486 0 32364 82 5 77 77 0 357 28
vmsppl 368 222 0 208 2 0 2 2 0 8 0
pdppl 4096 453 0 416 53 12 41 41 0 8 4
pvpl 32 117733 0 112581 119 0 119 119 0 265 76
pmappl 232 222 0 208 1 0 1 1 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 280 0 15 8 0 8 8 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
spllower(ffff8000212a6000) at spllower+0x34 sys/arch/amd64/amd64/intr.c:716
single_thread_check_locked(ffff80002123c2a8,0) at single_thread_check_locked+0x196 sys/kern/kern_sig.c:1970
userret(ffff80002123c2a8) at userret+0x335 single_thread_check sys/kern/kern_sig.c:1991 [inline]
userret(ffff80002123c2a8) at userret+0x335 sys/kern/kern_sig.c:1936
syscall(ffff8000222abdc0) at syscall+0x55c mi_syscall_return sys/sys/syscall_mi.h:129 [inline]
syscall(ffff8000222abdc0) at syscall+0x55c sys/arch/amd64/amd64/trap.c:612
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7b590aaca0, count: -5
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
ddb{1}> trace
x86_ipi_db(ffff800020d68ff0) 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
__mp_lock(ffffffff828ce2d0) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff828ce2d0) at __mp_lock+0x122 sys/kern/kern_lock.c:147
__mp_acquire_count(ffffffff828ce2d0,1) at __mp_acquire_count+0x4c sys/kern/kern_lock.c:227
mi_switch() at mi_switch+0x390 sys/kern/sched_bsd.c:433
sleep_finish(ffff80002129dcd0,1) at sleep_finish+0x111 sys/kern/kern_synch.c:418
single_thread_set(ffff80002123c018,3,0) at single_thread_set+0x3f4 single_thread_wait sys/kern/kern_sig.c:2112 [inline]
single_thread_set(ffff80002123c018,3,0) at single_thread_set+0x3f4 sys/kern/kern_sig.c:2092
exit1(ffff80002123c018,0,0,1) at exit1+0x98 sys/kern/kern_exit.c:138
sys_exit(ffff80002123c018,ffff80002129de10,ffff80002129de60) at sys_exit+0x16 sys/kern/kern_exit.c:95
syscall(ffff80002129dee0) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002129dee0) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffde140, count: -12


---
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.

Greg Steuck

unread,
Dec 2, 2020, 10:39:17 PM12/2/20
to syzbot, 'Dmitry Vyukov' via syzkaller-openbsd-bugs
#syz fix: Revert previous extension of the SCHED_LOCK(), the state isn't passed down.
Reply all
Reply to author
Forward
0 new messages