git: e68433e1990d - main - sys: Fix heap disclosure in compat7 kern.proc.filedesc sysctl
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 May 2026 18:00:31 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=e68433e1990d5f1bcc1bdd270d65f1e4792a8e1b
commit e68433e1990d5f1bcc1bdd270d65f1e4792a8e1b
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-05-12 16:25:01 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-05-12 17:59:51 +0000
sys: Fix heap disclosure in compat7 kern.proc.filedesc sysctl
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56976
---
sys/kern/kern_descrip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 48303926759b..349ebb5702a5 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -5135,7 +5135,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS)
return (ENOENT);
}
kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK);
- okif = malloc(sizeof(*okif), M_TEMP, M_WAITOK);
+ okif = malloc(sizeof(*okif), M_TEMP, M_WAITOK | M_ZERO);
PWDDESC_XLOCK(pdp);
pwd = pwd_hold_pwddesc(pdp);
if (pwd != NULL) {