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:
parent
19758005ab
commit
026227b6ae
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user