git: 5e6b16f4555c - stable/14 - sys: Fix heap disclosure in compat7 kern.proc.filedesc sysctl
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 May 2026 14:05:40 UTC
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=5e6b16f4555cba4422dde7c63344359019a23722
commit 5e6b16f4555cba4422dde7c63344359019a23722
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-05-12 16:25:01 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-05-13 14:05:26 +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
(cherry picked from commit e68433e1990d5f1bcc1bdd270d65f1e4792a8e1b)
(cherry picked from commit 0cef1a9ae5ec90b2c4717de9bc33fc7c3b1fd705)
---
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 51752aa8ab33..9980c4c9a99d 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -4963,7 +4963,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) {