svn commit: r354735 - stable/11/sys/kern
Ed Maste
emaste at FreeBSD.org
Fri Nov 15 16:40:55 UTC 2019
Author: emaste
Date: Fri Nov 15 16:40:55 2019
New Revision: 354735
URL: https://svnweb.freebsd.org/changeset/base/354735
Log:
MFC r354228: avoid kernel stack data leak in core dump thrmisc note
bzero the entire thrmisc struct, not just the padding. Other core dump
notes are already done this way.
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/sys/kern/imgact_elf.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/imgact_elf.c
==============================================================================
--- stable/11/sys/kern/imgact_elf.c Fri Nov 15 16:40:10 2019 (r354734)
+++ stable/11/sys/kern/imgact_elf.c Fri Nov 15 16:40:55 2019 (r354735)
@@ -2008,7 +2008,7 @@ __elfN(note_thrmisc)(void *arg, struct sbuf *sb, size_
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));
}
More information about the svn-src-stable-11
mailing list