mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Fix small kernel memory disclosures. [EN-18:12.mem]
Reported by: Thomas Barabosch, Fraunhofer FKIE Approved by: so Security: FreeBSD-EN-18:12.mem Security: CVE-2018-17155
This commit is contained in:
parent
f90dc93b2a
commit
4a1c7d28db
1 changed files with 2 additions and 0 deletions
|
|
@ -68,6 +68,7 @@ sys_getcontext(struct thread *td, struct getcontext_args *uap)
|
|||
if (uap->ucp == NULL)
|
||||
ret = EINVAL;
|
||||
else {
|
||||
bzero(&uc, sizeof(ucontext_t));
|
||||
get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
|
||||
PROC_LOCK(td->td_proc);
|
||||
uc.uc_sigmask = td->td_sigmask;
|
||||
|
|
@ -108,6 +109,7 @@ sys_swapcontext(struct thread *td, struct swapcontext_args *uap)
|
|||
if (uap->oucp == NULL || uap->ucp == NULL)
|
||||
ret = EINVAL;
|
||||
else {
|
||||
bzero(&uc, sizeof(ucontext_t));
|
||||
get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
|
||||
bzero(uc.__spare__, sizeof(uc.__spare__));
|
||||
PROC_LOCK(td->td_proc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue