Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 2026 14:04:50 +0000
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0cef1a9ae5ec - stable/15 - sys: Fix heap disclosure in compat7 kern.proc.filedesc sysctl
Message-ID:  <6a048502.23e72.4f47b8e5@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=0cef1a9ae5ec90b2c4717de9bc33fc7c3b1fd705

commit 0cef1a9ae5ec90b2c4717de9bc33fc7c3b1fd705
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:04:27 +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)
---
 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 2fa0621bdfca..ec9fbdae2fa7 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -5107,7 +5107,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) {


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a048502.23e72.4f47b8e5>