Date: Fri, 15 Nov 2019 16:40:10 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r354734 - stable/12/sys/kern Message-ID: <201911151640.xAFGeA75018422@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri Nov 15 16:40:10 2019 New Revision: 354734 URL: https://svnweb.freebsd.org/changeset/base/354734 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/12/sys/kern/imgact_elf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/imgact_elf.c ============================================================================== --- stable/12/sys/kern/imgact_elf.c Fri Nov 15 16:34:35 2019 (r354733) +++ stable/12/sys/kern/imgact_elf.c Fri Nov 15 16:40:10 2019 (r354734) @@ -2233,7 +2233,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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911151640.xAFGeA75018422>