sys: Fix a few potential infoleaks in cloudabi

While there is no immediate leak, if the structure changes underneath
us, there might be in the future.

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-07 14:44:32 +00:00
parent 11546d068d
commit d7cb1c47da

View file

@ -135,6 +135,8 @@ ibcs2_msgctl(struct thread *td, void *v)
struct msqid_ds bs;
int error;
memset(&is, 0, sizeof(is));
switch (uap->cmd) {
case IBCS2_IPC_STAT:
error = kern_msgctl(td, uap->msqid, IPC_STAT, &bs);
@ -318,6 +320,8 @@ ibcs2_semctl(struct thread *td, void *v)
register_t rval;
int error;
memset(&is, 0, sizeof(is));
switch(uap->cmd) {
case IBCS2_IPC_STAT:
semun.buf = &bs;