1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

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
This commit is contained in:
Ed Maste
2026-05-12 12:25:01 -04:00
parent a6add87b5e
commit e68433e199
+1 -1
View File
@@ -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) {