From owner-svn-src-all@freebsd.org Thu Apr 5 12:54:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E07CF832B0; Thu, 5 Apr 2018 12:54:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D8577A1C8; Thu, 5 Apr 2018 12:54:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1859222E28; Thu, 5 Apr 2018 12:54:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w35CsAu2076430; Thu, 5 Apr 2018 12:54:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w35CsAwh076429; Thu, 5 Apr 2018 12:54:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804051254.w35CsAwh076429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 5 Apr 2018 12:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r332064 - stable/10/sys/compat/linux X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/compat/linux X-SVN-Commit-Revision: 332064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2018 12:54:11 -0000 Author: emaste Date: Thu Apr 5 12:54:10 2018 New Revision: 332064 URL: https://svnweb.freebsd.org/changeset/base/332064 Log: MFC r332042: Fix kernel memory disclosure in linux_ioctl_socket strlcpy is used to copy a string into a buffer to be copied to userland, previously leaving uninitialized data after the terminating NUL. Zero the buffer first to avoid a kernel memory disclosure. admbugs: 765, 811 Reported by: Ilja Van Sprundel Reported by: Vlad Tsyrklevich Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linux/linux_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.c Thu Apr 5 12:50:47 2018 (r332063) +++ stable/10/sys/compat/linux/linux_ioctl.c Thu Apr 5 12:54:10 2018 (r332064) @@ -2427,6 +2427,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioc printf("%s(): ioctl %d on %.*s\n", __func__, args->cmd & 0xffff, LINUX_IFNAMSIZ, lifname); #endif + memset(ifname, 0, sizeof(ifname)); ifp = ifname_linux_to_bsd(td, lifname, ifname); if (ifp == NULL) return (EINVAL);