From owner-svn-src-head@freebsd.org Sat Mar 3 21:50:56 2018 Return-Path: Delivered-To: svn-src-head@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 55FD3F3F6FE; Sat, 3 Mar 2018 21:50:56 +0000 (UTC) (envelope-from eadler@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 074EF7844F; Sat, 3 Mar 2018 21:50:56 +0000 (UTC) (envelope-from eadler@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 0233243B5; Sat, 3 Mar 2018 21:50:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w23LotrR073256; Sat, 3 Mar 2018 21:50:55 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w23LotrP073255; Sat, 3 Mar 2018 21:50:55 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803032150.w23LotrP073255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 3 Mar 2018 21:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330359 - head/sys/compat/cloudabi X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sys/compat/cloudabi X-SVN-Commit-Revision: 330359 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2018 21:50:56 -0000 Author: eadler Date: Sat Mar 3 21:50:55 2018 New Revision: 330359 URL: https://svnweb.freebsd.org/changeset/base/330359 Log: sys/linux: Fix a few potential infoleaks in cloudabi Submitted by: Domagoj Stolfa MFC After: 1 month Sponsored by: DARPA/AFRL Modified: head/sys/compat/cloudabi/cloudabi_file.c Modified: head/sys/compat/cloudabi/cloudabi_file.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_file.c Sat Mar 3 21:41:16 2018 (r330358) +++ head/sys/compat/cloudabi/cloudabi_file.c Sat Mar 3 21:50:55 2018 (r330359) @@ -563,6 +563,8 @@ cloudabi_sys_file_stat_fget(struct thread *td, cloudabi_filetype_t filetype; int error; + memset(&csb, 0, sizeof(csb)); + /* Fetch file descriptor attributes. */ error = fget(td, uap->fd, cap_rights_init(&rights, CAP_FSTAT), &fp); if (error != 0) @@ -649,6 +651,8 @@ cloudabi_sys_file_stat_get(struct thread *td, cloudabi_filestat_t csb; char *path; int error; + + memset(&csb, 0, sizeof(csb)); error = copyin_path(uap->path, uap->path_len, &path); if (error != 0)