aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2026-03-10 13:53:46 +0000
committerEd Maste <emaste@FreeBSD.org>2026-05-13 14:06:05 +0000
commit815eb5a26eb45418bfd1ae564c532cbd37599b02 (patch)
treedd4ed81f16ac3cb42db60e86306314946264eca8
parent7f4bc4555a53f32c5990d16afe4cfab7aaf6f053 (diff)
compat/linux: Avoid waitid() kernel stack disclosure
Reported by: Adam Crosser, Praetorian Reviewed by: philip Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55812 (cherry picked from commit 9a9f93bcf1aa0059d759b2f3ea6faeb2760a11bd) (cherry picked from commit 9f8db9cc67fb86eeb2b645ce7f8aa748e99241a9) (cherry picked from commit a347e6e20e75ad6224afefcf650ef738c3de094d)
-rw-r--r--sys/compat/linux/linux_misc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index fa6b7eff601a..3895c6da057c 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -756,6 +756,7 @@ linux_common_wait(struct thread *td, idtype_t idtype, int id, int *statusp,
error = linux_copyout_rusage(&wru.wru_self, rup);
if (error == 0 && infop != NULL && td->td_retval[0] != 0) {
sig = bsd_to_linux_signal(siginfo.si_signo);
+ memset(&lsi, 0, sizeof(lsi));
siginfo_to_lsiginfo(&siginfo, &lsi, sig);
error = copyout(&lsi, infop, sizeof(lsi));
}