Permalink
Browse files

Fix kernel stack disclosures in the Linux and 4.3BSD compat layers.

Submitted by:	CTurt
Security:	SA-16:20
Security:	SA-16:21
  • Loading branch information...
1 parent ff690eb commit a0c5a05de8c90bcf66b7d5f1a3beb895cc5e05f6 @glebius glebius committed May 31, 2016
Showing with 4 additions and 0 deletions.
  1. +2 −0 sys/compat/linux/linux_ioctl.c
  2. +1 −0 sys/compat/linux/linux_misc.c
  3. +1 −0 sys/kern/vfs_syscalls.c
@@ -916,6 +916,8 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCGSERIAL: {
struct linux_serial_struct lss;
+
+ bzero(&lss, sizeof(lss));
lss.type = LINUX_PORT_16550A;
lss.flags = 0;
lss.close_delay = 0;
@@ -149,6 +149,7 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args)
int i, j;
struct timespec ts;
+ bzero(&sysinfo, sizeof(sysinfo));
getnanouptime(&ts);
if (ts.tv_nsec != 0)
ts.tv_sec++;
@@ -2068,6 +2068,7 @@ cvtstat(st, ost)
struct ostat *ost;
{
+ bzero(ost, sizeof(*ost));
ost->st_dev = st->st_dev;
ost->st_ino = st->st_ino;
ost->st_mode = st->st_mode;

0 comments on commit a0c5a05

Please sign in to comment.