sys/linux: Fix a few potential infoleaks in cloudabi

Submitted by:	Domagoj Stolfa <domagoj.stolfa@gmail.com>
MFC After:	1 month
Sponsored by:	DARPA/AFRL
This commit is contained in:
Eitan Adler 2018-03-03 21:50:55 +00:00
parent 19758005ab
commit 026227b6ae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330359

View File

@ -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)
@ -650,6 +652,8 @@ cloudabi_sys_file_stat_get(struct thread *td,
char *path;
int error;
memset(&csb, 0, sizeof(csb));
error = copyin_path(uap->path, uap->path_len, &path);
if (error != 0)
return (error);