From a7e02c42bdf0f138f76139030f1083837b21c86c Mon Sep 17 00:00:00 2001 From: glebius Date: Tue, 31 May 2016 16:55:37 +0000 Subject: [PATCH] Fix kernel stack disclosure in Linux compatibility layer. [SA-16:20] Fix kernel stack disclosure in 4.3BSD compatibility layer. [SA-16:21] Security: SA-16:20 Security: SA-16:21 Approved by: so git-svn-id: svn://svn.freebsd.org/base/releng/9.3@301049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- UPDATING | 10 ++++++++++ sys/compat/linux/linux_ioctl.c | 2 ++ sys/compat/linux/linux_misc.c | 1 + sys/conf/newvers.sh | 2 +- sys/kern/vfs_syscalls.c | 1 + 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 8ba40af91..8971dd8da 100644 --- a/UPDATING +++ b/UPDATING @@ -11,6 +11,16 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20160531 p43 FreeBSD-SA-16:20.linux + FreeBSD-SA-16:21.43bsd + FreeBSD-SA-16:22.libarchive + FreeBSD-SA-16:23.libarchive + + Fix kernel stack disclosure in Linux compatibility layer. [SA-16:20] + Fix kernel stack disclosure in 4.3BSD compatibility layer. [SA-16:21] + Fix directory traversal in cpio(1). [SA-16:22] + Fix buffer overflow in libarchive(3). [SA-16:23] + 20160517 p42 FreeBSD-SA-16:18.atkbd Fix buffer overflow in keyboard driver. [SA-16:18] diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 168e68012..926085305 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -911,6 +911,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; diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 857297a90..85c7c9302 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -138,6 +138,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++; diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index cdbce1481..cd490b12e 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p42" +BRANCH="RELEASE-p43" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 39a5606fc..90430abff 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2326,6 +2326,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; -- 2.42.0