git: 5a834ad15f1f - main - procctl: Zero the output structure for the compat32 syscall
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Nov 2026 19:46:40 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=5a834ad15f1f09d43a6840c74da194db6f890aa2
commit 5a834ad15f1f09d43a6840c74da194db6f890aa2
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-11-13 19:44:59 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-11-13 19:46:17 +0000
procctl: Zero the output structure for the compat32 syscall
Otherwise the freebsd32 implementation of PROC_REAP_STATUS leaks
uninitialized kernel stack memory.
Reviewed by: kib
Reported by: Dennys Kaluzny Pereira <dennyskaluzny@gmail.com>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61510
---
sys/compat/freebsd32/freebsd32_misc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 5900c7d03ce1..9e5e943d023d 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -3894,6 +3894,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap)
return (cpu_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id),
uap->com, PTRIN(uap->data)));
+ bzero(&x, sizeof(x));
switch (uap->com) {
case PROC_ASLR_CTL:
case PROC_PROTMAX_CTL: