From 6d1bd21f028cbb6378f0ccdd83ca8fe050482067 Mon Sep 17 00:00:00 2001 From: gordon Date: Tue, 28 Jan 2020 18:57:45 +0000 Subject: [PATCH] Fix kernel stack data disclosure Reported by: Ilja Van Sprundel Approved by: so Security: FreeBSD-SA-20:03.thrmisc Security: CVE-2019-15875 --- sys/kern/imgact_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 01dfcf57efe..f47415d109c 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2007,7 +2007,7 @@ __elfN(note_thrmisc)(void *arg, struct sbuf *sb, size_t *sizep) td = (struct thread *)arg; if (sb != NULL) { KASSERT(*sizep == sizeof(thrmisc), ("invalid size")); - bzero(&thrmisc._pad, sizeof(thrmisc._pad)); + bzero(&thrmisc, sizeof(thrmisc)); strcpy(thrmisc.pr_tname, td->td_name); sbuf_bcat(sb, &thrmisc, sizeof(thrmisc)); } -- 2.45.0