diff options
author | 2017-10-04 02:10:33 +0000 | |
---|---|---|
committer | 2017-10-04 02:10:33 +0000 | |
commit | 198d2c0b5f3bd7bc8fe753be0dc3ca31bc97c53d (patch) | |
tree | 7e67370022c32f6e3eda9110a9074184507c3c26 /lib/libc/stdlib/exit.c | |
parent | Nested xrstor handled leaks a kernel address into sigval, but potential (diff) | |
download | wireguard-openbsd-198d2c0b5f3bd7bc8fe753be0dc3ca31bc97c53d.tar.xz wireguard-openbsd-198d2c0b5f3bd7bc8fe753be0dc3ca31bc97c53d.zip |
Follow the pattern set by copy*/pcb_onfault: when xrstor faults, return
from the trap to a 'resume' address to effectively make xrstor_user()
return an error indication, then do the FPU cleanup and trap generation
from there where we can get access to the original, userspace trapframe.
The original fix tried to handle the trap while on the wrong trapframe,
leaking kernel addresses and possibly leading to double faults.
Problem pointed out by abluhm@
ok deraadt@ mikeb@
Diffstat (limited to 'lib/libc/stdlib/exit.c')
0 files changed, 0 insertions, 0 deletions