svn commit: r330359 - head/sys/compat/cloudabi
Eitan Adler
eadler at FreeBSD.org
Sat Mar 3 21:50:56 UTC 2018
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 <domagoj.stolfa at gmail.com>
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)
More information about the svn-src-all
mailing list