mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
linuxulator: fix stack memory disclosure in linux_sigaltstack
Most siginfo_to_lsiginfo callers already zeroed the l_siginfo_t before callit it, but linux_waitid did not. Instead of zeroing in the called function to address linux_waitid (as in commit 2e6ebe70), just do it in linux_waitid. admbugs: 765 Reported by: Vlad Tsyrklevich <vlad@tsyrklevich.net> Reviewed by: Andrew MFC after: 1 day Security: Kernel stack memory disclosure Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
1b1f24b936
commit
347a8ed1bf
1 changed files with 2 additions and 3 deletions
|
|
@ -1089,9 +1089,8 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args)
|
|||
}
|
||||
if (args->info != NULL) {
|
||||
p = td->td_proc;
|
||||
if (td->td_retval[0] == 0)
|
||||
bzero(&lsi, sizeof(lsi));
|
||||
else {
|
||||
bzero(&lsi, sizeof(lsi));
|
||||
if (td->td_retval[0] != 0) {
|
||||
sig = bsd_to_linux_signal(siginfo.si_signo);
|
||||
siginfo_to_lsiginfo(&siginfo, &lsi, sig);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue