Commit 3f4aa1c
Francesco Lavra
x86 restore_ucontext(): Protect against invalid pointer to extended frame
A signal handler can modify the pointer to the floating-point register
frame in the thread context. If a modified pointer is invalid, the kernel
crashes; if a modified pointer points to kernel memory, kernel info is
leaked to the user program.
To prevent these issues, avoid copying from non-legitimate addresses when
restoring the thread context after a signal handler.1 parent 30f465a commit 3f4aa1c
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
| 210 | + | |
| 211 | + | |
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| |||
0 commit comments