[Glibc-bsd-commits] r5402 - branches/wheezy/kfreebsd-8/debian/patches
stevenc-guest at alioth.debian.org
stevenc-guest at alioth.debian.org
Fri Jan 31 02:57:51 UTC 2014
Author: stevenc-guest
Date: 2014-01-31 02:57:51 +0000 (Fri, 31 Jan 2014)
New Revision: 5402
Added:
branches/wheezy/kfreebsd-8/debian/patches/SA-13_10.sctp.diff
branches/wheezy/kfreebsd-8/debian/patches/SA-13_12.ifioctl.diff
branches/wheezy/kfreebsd-8/debian/patches/SA-13_13.nullfs.diff
Modified:
branches/wheezy/kfreebsd-8/debian/patches/SA-13_08.nfsserver.diff
branches/wheezy/kfreebsd-8/debian/patches/series
Log:
* Apply upstream SA-13_10.sctp patch (CVE-2013-5209).
(Closes: #720476)
* Apply upstream SA-13_12.ifioctl patch (CVE-2013-5691).
(Closes: #737181)
* Apply upstream SA-13_13.nullfs patch (CVE-2013-5710).
(Closes: #737182)
Modified: branches/wheezy/kfreebsd-8/debian/patches/SA-13_08.nfsserver.diff
===================================================================
--- branches/wheezy/kfreebsd-8/debian/patches/SA-13_08.nfsserver.diff 2014-01-28 21:59:03 UTC (rev 5401)
+++ branches/wheezy/kfreebsd-8/debian/patches/SA-13_08.nfsserver.diff 2014-01-31 02:57:51 UTC (rev 5402)
@@ -1,6 +1,13 @@
+Description:
+ Fix a bug that allows remote client bypass the normal
+ access checks when when -network or -host restrictions
+ are used at the same time with -mapall. [13:08]
+ (CVE-2013-4851)
+Origin: vendor, http://security.FreeBSD.org/patches/SA-13:08/nfsserver.patch
+Bug: http://www.freebsd.org/security/advisories/FreeBSD-SA-13:08.nfsserver.asc
+Bug-Debian: http://bugs.debian.org/717959
+Applied-Upstream: http://svnweb.freebsd.org/base?view=revision&revision=253694
-SVN rev 253694 from releng/8.3
-
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -208,7 +208,7 @@
Added: branches/wheezy/kfreebsd-8/debian/patches/SA-13_10.sctp.diff
===================================================================
--- branches/wheezy/kfreebsd-8/debian/patches/SA-13_10.sctp.diff (rev 0)
+++ branches/wheezy/kfreebsd-8/debian/patches/SA-13_10.sctp.diff 2014-01-31 02:57:51 UTC (rev 5402)
@@ -0,0 +1,47 @@
+Description:
+ Fix a bug that could lead to kernel memory disclosure with
+ SCTP state cookie. [13:10] (CVE-2013-5209)
+Origin: vendor, http://security.FreeBSD.org/patches/SA-13:10/sctp.patch
+Bug: http://www.freebsd.org/security/advisories/FreeBSD-SA-13:10.sctp.asc
+Bug-Debian: http://bugs.debian.org/720476
+Applied-Upstream: http://svnweb.freebsd.org/base?view=revision&revision=254632
+
+--- kfreebsd-8-8.3.orig/sys/netinet/in_mcast.c
++++ kfreebsd-8-8.3/sys/netinet/in_mcast.c
+@@ -1613,6 +1613,8 @@
+ * has asked for, but we always tell userland how big the
+ * buffer really needs to be.
+ */
++ if (msfr.msfr_nsrcs > in_mcast_maxsocksrc)
++ msfr.msfr_nsrcs = in_mcast_maxsocksrc;
+ tss = NULL;
+ if (msfr.msfr_srcs != NULL && msfr.msfr_nsrcs > 0) {
+ tss = malloc(sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs,
+--- kfreebsd-8-8.3.orig/sys/netinet/sctp_output.c
++++ kfreebsd-8-8.3/sys/netinet/sctp_output.c
+@@ -5456,6 +5456,14 @@
+ }
+ SCTP_BUF_LEN(m) = sizeof(struct sctp_init_chunk);
+
++ /*
++ * We might not overwrite the identification[] completely and on
++ * some platforms time_entered will contain some padding. Therefore
++ * zero out the cookie to avoid putting uninitialized memory on the
++ * wire.
++ */
++ memset(&stc, 0, sizeof(struct sctp_state_cookie));
++
+ /* the time I built cookie */
+ (void)SCTP_GETTIME_TIMEVAL(&stc.time_entered);
+
+--- kfreebsd-8-8.3.orig/sys/netinet6/in6_mcast.c
++++ kfreebsd-8-8.3/sys/netinet6/in6_mcast.c
+@@ -1624,6 +1624,8 @@
+ * has asked for, but we always tell userland how big the
+ * buffer really needs to be.
+ */
++ if (msfr.msfr_nsrcs > in6_mcast_maxsocksrc)
++ msfr.msfr_nsrcs = in6_mcast_maxsocksrc;
+ tss = NULL;
+ if (msfr.msfr_srcs != NULL && msfr.msfr_nsrcs > 0) {
+ tss = malloc(sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs,
Added: branches/wheezy/kfreebsd-8/debian/patches/SA-13_12.ifioctl.diff
===================================================================
--- branches/wheezy/kfreebsd-8/debian/patches/SA-13_12.ifioctl.diff (rev 0)
+++ branches/wheezy/kfreebsd-8/debian/patches/SA-13_12.ifioctl.diff 2014-01-31 02:57:51 UTC (rev 5402)
@@ -0,0 +1,93 @@
+Description:
+ In IPv6 and NetATM, stop SIOCSIFADDR, SIOCSIFBRDADDR, SIOCSIFDSTADDR
+ and SIOCSIFNETMASK at the socket layer rather than pass them on to the
+ link layer without validation or credential checks. [13:12]
+ (CVE-2013-5691)
+Origin: vendor, http://security.FreeBSD.org/patches/SA-13:12/ifioctl.patch
+Bug: http://www.freebsd.org/security/advisories/FreeBSD-SA-13:12.ifioctl.asc
+Bug-Debian: http://bugs.debian.org/737181
+Applied-Upstream: http://svnweb.freebsd.org/base?view=revision&revision=255445
+
+--- kfreebsd-8-8.3.orig/sys/net/if.c
++++ kfreebsd-8-8.3/sys/net/if.c
+@@ -2606,11 +2606,23 @@
+ CURVNET_RESTORE();
+ return (EOPNOTSUPP);
+ }
++
++ /*
++ * Pass the request on to the socket control method, and if the
++ * latter returns EOPNOTSUPP, directly to the interface.
++ *
++ * Make an exception for the legacy SIOCSIF* requests. Drivers
++ * trust SIOCSIFADDR et al to come from an already privileged
++ * layer, and do not perform any credentials checks or input
++ * validation.
++ */
+ #ifndef COMPAT_43
+ error = ((*so->so_proto->pr_usrreqs->pru_control)(so, cmd,
+ data,
+ ifp, td));
+- if (error == EOPNOTSUPP && ifp != NULL && ifp->if_ioctl != NULL)
++ if (error == EOPNOTSUPP && ifp != NULL && ifp->if_ioctl != NULL &&
++ cmd != SIOCSIFADDR && cmd != SIOCSIFBRDADDR &&
++ cmd != SIOCSIFDSTADDR && cmd != SIOCSIFNETMASK)
+ error = (*ifp->if_ioctl)(ifp, cmd, data);
+ #else
+ {
+@@ -2654,7 +2666,9 @@
+ data,
+ ifp, td));
+ if (error == EOPNOTSUPP && ifp != NULL &&
+- ifp->if_ioctl != NULL)
++ ifp->if_ioctl != NULL &&
++ cmd != SIOCSIFADDR && cmd != SIOCSIFBRDADDR &&
++ cmd != SIOCSIFDSTADDR && cmd != SIOCSIFNETMASK)
+ error = (*ifp->if_ioctl)(ifp, cmd, data);
+ switch (ocmd) {
+
+--- kfreebsd-8-8.3.orig/sys/netinet6/in6.c
++++ kfreebsd-8-8.3/sys/netinet6/in6.c
+@@ -339,6 +339,18 @@
+ case SIOCGIFSTAT_ICMP6:
+ sa6 = &ifr->ifr_addr;
+ break;
++ case SIOCSIFADDR:
++ case SIOCSIFBRDADDR:
++ case SIOCSIFDSTADDR:
++ case SIOCSIFNETMASK:
++ /*
++ * Although we should pass any non-INET6 ioctl requests
++ * down to driver, we filter some legacy INET requests.
++ * Drivers trust SIOCSIFADDR et al to come from an already
++ * privileged layer, and do not perform any credentials
++ * checks or input validation.
++ */
++ return (EINVAL);
+ default:
+ sa6 = NULL;
+ break;
+--- kfreebsd-8-8.3.orig/sys/netnatm/natm.c
++++ kfreebsd-8-8.3/sys/netnatm/natm.c
+@@ -339,6 +339,21 @@
+ npcb = (struct natmpcb *)so->so_pcb;
+ KASSERT(npcb != NULL, ("natm_usr_control: npcb == NULL"));
+
++ switch (cmd) {
++ case SIOCSIFADDR:
++ case SIOCSIFBRDADDR:
++ case SIOCSIFDSTADDR:
++ case SIOCSIFNETMASK:
++ /*
++ * Although we should pass any non-ATM ioctl requests
++ * down to driver, we filter some legacy INET requests.
++ * Drivers trust SIOCSIFADDR et al to come from an already
++ * privileged layer, and do not perform any credentials
++ * checks or input validation.
++ */
++ return (EINVAL);
++ }
++
+ if (ifp == NULL || ifp->if_ioctl == NULL)
+ return (EOPNOTSUPP);
+ return ((*ifp->if_ioctl)(ifp, cmd, arg));
Added: branches/wheezy/kfreebsd-8/debian/patches/SA-13_13.nullfs.diff
===================================================================
--- branches/wheezy/kfreebsd-8/debian/patches/SA-13_13.nullfs.diff (rev 0)
+++ branches/wheezy/kfreebsd-8/debian/patches/SA-13_13.nullfs.diff 2014-01-31 02:57:51 UTC (rev 5402)
@@ -0,0 +1,34 @@
+Description:
+ Prevent cross-mount hardlinks between different nullfs mounts of the
+ same underlying filesystem. [13:13] (CVE-2013-5710)
+Origin: vendor, http://security.FreeBSD.org/patches/SA-13:13/nullfs.patch
+Bug: http://www.freebsd.org/security/advisories/FreeBSD-SA-13:13.nullfs.asc
+Bug-Debian: http://bugs.debian.org/737182
+Applied-Upstream: http://svnweb.freebsd.org/base?view=revision&revision=255445
+
+--- kfreebsd-8-8.3.orig/sys/fs/nullfs/null_vnops.c
++++ kfreebsd-8-8.3/sys/fs/nullfs/null_vnops.c
+@@ -817,6 +817,15 @@
+ return (error);
+ }
+
++static int
++null_link(struct vop_link_args *ap)
++{
++
++ if (ap->a_tdvp->v_mount != ap->a_vp->v_mount)
++ return (EXDEV);
++ return (null_bypass((struct vop_generic_args *)ap));
++}
++
+ /*
+ * Global vfs data structures
+ */
+@@ -829,6 +838,7 @@
+ .vop_getwritemount = null_getwritemount,
+ .vop_inactive = null_inactive,
+ .vop_islocked = vop_stdislocked,
++ .vop_link = null_link,
+ .vop_lock1 = null_lock,
+ .vop_lookup = null_lookup,
+ .vop_open = null_open,
Modified: branches/wheezy/kfreebsd-8/debian/patches/series
===================================================================
--- branches/wheezy/kfreebsd-8/debian/patches/series 2014-01-28 21:59:03 UTC (rev 5401)
+++ branches/wheezy/kfreebsd-8/debian/patches/series 2014-01-31 02:57:51 UTC (rev 5402)
@@ -14,6 +14,9 @@
SCTP_DOS_svn239447.diff
SA-12_08.linux.patch
SA-13_08.nfsserver.diff
+SA-13_10.sctp.diff
+SA-13_12.ifioctl.diff
+SA-13_13.nullfs.diff
# Other patches that might or might not be mergeable
001_misc.diff
More information about the Glibc-bsd-commits
mailing list