git: 2b8445dab44e - releng/15.2 - procctl: Zero the output structure for the compat32 syscall
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Nov 2026 00:00:17 UTC
The branch releng/15.2 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=2b8445dab44edae324138d325dc678a39db674c5
commit 2b8445dab44edae324138d325dc678a39db674c5
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-11-13 19:44:59 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-11-26 23:59:25 +0000
procctl: Zero the output structure for the compat32 syscall
Otherwise the freebsd32 implementation of PROC_REAP_STATUS leaks
uninitialized kernel stack memory.
Approved by: re (cperciva)
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
(cherry picked from commit 5a834ad15f1f09d43a6840c74da194db6f890aa2)
(cherry picked from commit 42e71f0bafc23c0707752381d0b25649d12ae8c4)
---
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 b3debca0e351..0fb4c5fd1113 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -3955,6 +3955,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: