summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-05-17 19:54:28 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-05-17 19:54:28 +0000
commit7f13d2a6b8a3923a92e5678a05f44aedb41f14ea (patch)
tree9a77979c130e1ece9e06f64ece7256c7f5021a1f /sys-freebsd
parentVersion bump and fixed quoting. (diff)
downloadhistorical-7f13d2a6b8a3923a92e5678a05f44aedb41f14ea.tar.gz
historical-7f13d2a6b8a3923a92e5678a05f44aedb41f14ea.tar.bz2
historical-7f13d2a6b8a3923a92e5678a05f44aedb41f14ea.zip
Add security fixes for bug #212145 and bug #200959
Package-Manager: portage-2.1.5
Diffstat (limited to 'sys-freebsd')
-rw-r--r--sys-freebsd/freebsd-sources/ChangeLog11
-rw-r--r--sys-freebsd/freebsd-sources/Manifest15
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-random.patch15
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-sendfile.patch61
-rw-r--r--sys-freebsd/freebsd-sources/freebsd-sources-6.2-r4.ebuild99
5 files changed, 198 insertions, 3 deletions
diff --git a/sys-freebsd/freebsd-sources/ChangeLog b/sys-freebsd/freebsd-sources/ChangeLog
index 237d77d199e6..2285e8501ff5 100644
--- a/sys-freebsd/freebsd-sources/ChangeLog
+++ b/sys-freebsd/freebsd-sources/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-freebsd/freebsd-sources
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.41 2007/10/22 14:27:03 uberlord Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.42 2008/05/17 19:54:27 aballier Exp $
+
+*freebsd-sources-6.2-r4 (17 May 2008)
+
+ 17 May 2008; Alexis Ballier <aballier@gentoo.org>
+ +files/freebsd-sources-6.2-random.patch,
+ +files/freebsd-sources-6.2-sendfile.patch, +freebsd-sources-6.2-r4.ebuild:
+ Add security fixes for bug #212145 and bug #200959
22 Oct 2007; Roy Marples <uberlord@gentoo.org>
+files/freebsd-sources-6.2-posix-monotonic-clock.patch,
diff --git a/sys-freebsd/freebsd-sources/Manifest b/sys-freebsd/freebsd-sources/Manifest
index 44e71d1a1df2..faef42eebfbd 100644
--- a/sys-freebsd/freebsd-sources/Manifest
+++ b/sys-freebsd/freebsd-sources/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX freebsd-sources-6.0-asm.patch 4172 RMD160 7872cbedbbe9fbead0d69f26674489b335317606 SHA1 350d5453ec523a6835ff7ad36bcff7f3bc7dce3f SHA256 2431b2dae991eef15c00c3e19ac01e23e374a1e8e6992053e64486032631b52e
AUX freebsd-sources-6.0-flex-2.5.31.patch 826 RMD160 a93341cfba5ddbd8df777273591ce21164f3ed41 SHA1 9f991b64b237a397e7aa0bad79a9a28c0de69339 SHA256 8aaf240a344106fc5434fd098eb6555a554d16513b71c95f93a93388021c3d99
AUX freebsd-sources-6.0-werror.patch 898 RMD160 41a6f582a70018f29c96c08a5853bcbf167157d0 SHA1 70145f3a065987daf2ceedb0e696ebbef669eecd SHA256 7fbd139296e98697c94dcc6a4cd4d926b057779cb2415cb62bbb881b8acf26e5
@@ -8,6 +11,8 @@ AUX freebsd-sources-6.2-dl_iterate_phdr.patch 1508 RMD160 b177f38755288c19a07bcf
AUX freebsd-sources-6.2-gcc41.patch 16887 RMD160 8ca5a1a76db802ca3e833ad15796bdf337002cb1 SHA1 5d4cec24352e20200028a98700008e8388999b3e SHA256 b28f57d0c73cf31bcac6c8424b0bc9fb24b5652f11a3e85d8a4a40b376976fab
AUX freebsd-sources-6.2-ipv6.patch 2017 RMD160 8d17c7f99b13f6b53eab454aa1a0a4eb22c1de82 SHA1 ec3b429b750774a6aee93a68013a5d5769397399 SHA256 0ff78bb2ca2a8e025fb2edae56dbdb7ab1103e64bd0cd8754f569d23cfa1284d
AUX freebsd-sources-6.2-posix-monotonic-clock.patch 420 RMD160 117e2b8c50f9431abf1702528be305f445a05765 SHA1 73a0cd1bd823bb206d887e783a5a682f741d3591 SHA256 d3a2d2de234ede4f8c57989ef1d45b8a3e11fb5bb658d37a863eb8130bd90592
+AUX freebsd-sources-6.2-random.patch 433 RMD160 c2ff203ee923ebca87330683e20df948f80e9d8d SHA1 781286fa19296e3e2432c0e54b800167fcde0f62 SHA256 21caeba5697febe4b9497e35cdb2b856020969a8a286e0be2e08b8c4653f8828
+AUX freebsd-sources-6.2-sendfile.patch 1879 RMD160 05eb9b3da42aec109c1cad2d5a1b7a700b87505a SHA1 db9059bf3d6c4fa9260ce38844ff40ad54e0a5f6 SHA256 669c2260b545d8e1482cc6d4570551061d84b05ba26df67942bd9142767be60a
AUX freebsd-sources-6.2-sparc64.patch 504 RMD160 0ee148e9e565c03ca7e30122ac885f643081b50e SHA1 391bc1e25b18c3b32340cb65b45878aab9e033a0 SHA256 952addc69ac504f9d73d111eff7c7be51b6fb12dcedd65d563d8df533d88bbdf
AUX freebsd-sources-6.2-unp_gc.patch 6066 RMD160 a8eb464d7a41b394b190bc530532a4a8a7bdff48 SHA1 5c371253d81dd8b039413c8afa6ac9ad6b7ae27b SHA256 39ac44c64e5115b166bb2302512be5069c9d0b9405aadf312c219d49aece6882
AUX freebsd-sources-gentoo.patch 1191 RMD160 1c8ce1849d767a995f075fe43b7313b341bd0805 SHA1 abe5d4ff186d1b9b6ad6d7af6be359563e81183b SHA256 e5e7186858259e7d6d21e925dde640a68b27255cf69ab089ee82675568e7d9a7
@@ -15,6 +20,14 @@ DIST freebsd-sys-6.2.tar.bz2 18344936 RMD160 784230e22ccaf09933ef3f053ff29cc3e57
EBUILD freebsd-sources-6.2-r1.ebuild 2861 RMD160 1a9795cfa3942570ee9fad66504a56709367b17b SHA1 b06b8c6de4162e149ead25cffa65500e05ef02c0 SHA256 9e594e822c4b28a5c3412e9ec50ace85f25c6f17885a890cbad58032834fecbd
EBUILD freebsd-sources-6.2-r2.ebuild 2961 RMD160 ca90f67bdbb0e8dd63c40e5a278e028ef674da06 SHA1 0ffccf30b35c6ac133b94c3454fb42d83c201ce5 SHA256 cb23463204bb29f3a8282ef9afbb274c453a191f7d475aceee0dee6be64bb59e
EBUILD freebsd-sources-6.2-r3.ebuild 3075 RMD160 34f309fcf84c8f63562fb87044d06ee0d1334760 SHA1 6554414681f0476433f7c83c1ddb0c7c565c483b SHA256 ab7710b596f36c460a648f5e6c4c99f451d2a5af70b5271011d3f2354c122d97
+EBUILD freebsd-sources-6.2-r4.ebuild 3301 RMD160 b2d8a7b6702151ad5e2c7a7d171f32b2335fbd0f SHA1 21a5b149e9f76bb4375e6de26659632650fd8900 SHA256 e69bd4a87fdbcfb0e22acaef8462d53dc4c0e892fa92069e1c4975ee0c6821c1
EBUILD freebsd-sources-6.2.ebuild 2746 RMD160 0ca4ceb5773bc3e2cb01fe7679aee482c194b5dc SHA1 23609b30548648578b9d3d06de8bb6dffc032a72 SHA256 8edd769332a9532e3573725d9f721966c6653c4f213b6a0379df1383445a55bc
-MISC ChangeLog 11429 RMD160 05f32dcbf92b761284417b64a47a9b447ed0000c SHA1 7a22e1c2abaa0d8eefebf7f9211871c30780195a SHA256 9fbe0a1bf1e89e57ca6f41b3d506d6b8664ad9769559f6d80e5eb1793bb1aeb1
+MISC ChangeLog 11694 RMD160 985dee78be47f1fb961b7a7ce2f2c3dae3d48ce0 SHA1 d80e65d08f80fa6f60089d831cd6e353b3fd036c SHA256 64237e5b5f5fa652daf7f4f448c85bfa8e58319b38cdd81ce199b971c5ec19f1
MISC metadata.xml 156 RMD160 60b5820a08275f307e5bd936d78f5afd1f141086 SHA1 d9d9d4f2b5afc58339ea3e562fca490156935f1f SHA256 30ab515d6ac492d3d6c36ac3c675511742c2149e56a6b3228c8d22ab8edb3ff7
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.9 (GNU/Linux)
+
+iEYEARECAAYFAkgvOAAACgkQvFcC4BYPU0qP8wCff7joH2TmPr/zeHH97cojCOhU
+0U4AoJ4TKVONp5RUR3Vill8icFhOggvq
+=cg1O
+-----END PGP SIGNATURE-----
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-random.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-random.patch
new file mode 100644
index 000000000000..b6bbf02762f4
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-random.patch
@@ -0,0 +1,15 @@
+Index: sys/dev/random/yarrow.c
+===================================================================
+RCS file: /usr/ncvs/src/sys/dev/random/yarrow.c,v
+retrieving revision 1.47
+diff -u -r1.47 yarrow.c
+--- sys/dev/random/yarrow.c 27 May 2007 18:54:58 -0000 1.47
++++ sys/dev/random/yarrow.c 27 Nov 2007 17:17:29 -0000
+@@ -296,6 +296,7 @@
+ random_state.outputblocks = 0;
+ }
+ retval += (int)tomove;
++ cur = 0;
+ }
+ }
+ else {
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-sendfile.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-sendfile.patch
new file mode 100644
index 000000000000..2be1b5777fea
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-sendfile.patch
@@ -0,0 +1,61 @@
+Index: sys/kern/kern_descrip.c
+===================================================================
+RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v
+retrieving revision 1.313
+diff -u -d -r1.313 kern_descrip.c
+--- sys/kern/kern_descrip.c 6 Aug 2007 14:26:00 -0000 1.313
++++ sys/kern/kern_descrip.c 4 Feb 2008 19:05:42 -0000
+@@ -2046,7 +2046,7 @@
+ int error;
+
+ *vpp = NULL;
+- if ((error = _fget(td, fd, &fp, 0, 0)) != 0)
++ if ((error = _fget(td, fd, &fp, flags, 0)) != 0)
+ return (error);
+ if (fp->f_vnode == NULL) {
+ error = EINVAL;
+Index: sys/kern/uipc_syscalls.c
+===================================================================
+RCS file: /home/ncvs/src/sys/kern/uipc_syscalls.c,v
+retrieving revision 1.259.2.1
+diff -u -d -r1.259.2.1 uipc_syscalls.c
+--- sys/kern/uipc_syscalls.c 1 Feb 2008 22:51:39 -0000 1.259.2.1
++++ sys/kern/uipc_syscalls.c 4 Feb 2008 19:05:42 -0000
+@@ -1796,20 +1796,23 @@
+ goto out;
+ vfslocked = VFS_LOCK_GIANT(vp->v_mount);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
+- obj = vp->v_object;
+- if (obj != NULL) {
+- /*
+- * Temporarily increase the backing VM object's reference
+- * count so that a forced reclamation of its vnode does not
+- * immediately destroy it.
+- */
+- VM_OBJECT_LOCK(obj);
+- if ((obj->flags & OBJ_DEAD) == 0) {
+- vm_object_reference_locked(obj);
+- VM_OBJECT_UNLOCK(obj);
+- } else {
+- VM_OBJECT_UNLOCK(obj);
+- obj = NULL;
++ if (vp->v_type == VREG) {
++ obj = vp->v_object;
++ if (obj != NULL) {
++ /*
++ * Temporarily increase the backing VM
++ * object's reference count so that a forced
++ * reclamation of its vnode does not
++ * immediately destroy it.
++ */
++ VM_OBJECT_LOCK(obj);
++ if ((obj->flags & OBJ_DEAD) == 0) {
++ vm_object_reference_locked(obj);
++ VM_OBJECT_UNLOCK(obj);
++ } else {
++ VM_OBJECT_UNLOCK(obj);
++ obj = NULL;
++ }
+ }
+ }
+ VOP_UNLOCK(vp, 0, td);
diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r4.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r4.ebuild
new file mode 100644
index 000000000000..627cc0e79b7b
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r4.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r4.ebuild,v 1.1 2008/05/17 19:54:27 aballier Exp $
+
+inherit bsdmk freebsd flag-o-matic
+
+DESCRIPTION="FreeBSD kernel sources"
+SLOT="${PVR}"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="symlink"
+
+SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
+
+RDEPEND=">=sys-freebsd/freebsd-mk-defs-6.0-r1"
+DEPEND=""
+
+RESTRICT="strip binchecks"
+
+S="${WORKDIR}/sys"
+
+MY_PVR="${PVR}"
+
+[[ ${MY_PVR} == "${RV}" ]] && MY_PVR="${MY_PVR}-r0"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # This replaces the gentoover patch, it doesn't need reapply every time.
+ sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
+ -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
+ -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
+ "${S}/conf/newvers.sh"
+
+ epatch "${FILESDIR}/${PN}-gentoo.patch"
+ epatch "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
+ epatch "${FILESDIR}/${PN}-6.0-asm.patch"
+ epatch "${FILESDIR}/${PN}-6.0-werror.patch"
+ epatch "${FILESDIR}/${PN}-6.2-gcc41.patch"
+ epatch "${FILESDIR}/${PN}-6.2-sparc64.patch"
+ epatch "${FILESDIR}/${PN}-6.1-ntfs.patch"
+ epatch "${FILESDIR}/${PN}-6.2-debug-O2.patch"
+ epatch "${FILESDIR}/${PN}-6.2-dl_iterate_phdr.patch"
+ epatch "${FILESDIR}/${PN}-6.2-posix-monotonic-clock.patch"
+
+ # Errata patches
+ epatch "${FILESDIR}/${P}-EN-07:02.net.patch"
+ epatch "${FILESDIR}/${P}-unp_gc.patch"
+
+ # http://security.freebsd.org/advisories/FreeBSD-SA-07:03.ipv6.asc
+ epatch "${FILESDIR}/${P}-ipv6.patch"
+
+ # http://security.freebsd.org/advisories/FreeBSD-SA-07:09.random.asc
+ epatch "${FILESDIR}/${P}-random.patch"
+
+ # http://security.freebsd.org/advisories/FreeBSD-SA-08:03.sendfile.asc
+ epatch "${FILESDIR}/${P}-sendfile.patch"
+
+ # Disable SSP for the kernel
+ grep -Zlr -- -ffreestanding "${S}" | xargs -0 sed -i -e \
+ "s:-ffreestanding:-ffreestanding $(test-flags -fno-stack-protector -fno-stack-protector-all):g"
+}
+
+src_compile() {
+ einfo "Nothing to compile.."
+}
+
+src_install() {
+ insinto "/usr/src/sys-${MY_PVR}"
+ doins -r "${S}/"*
+}
+
+pkg_postinst() {
+ if [[ ! -L "${ROOT}/usr/src/sys" ]]; then
+ einfo "/usr/src/sys symlink doesn't exist; creating symlink to sys-${MY_PVR}..."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
+ # just in case...
+ [[ -L ""${ROOT}/usr/src/sys-${RV}"" ]] && rm "${ROOT}/usr/src/sys-${RV}"
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
+ elif use symlink; then
+ einfo "Updating /usr/src/sys symlink to sys-${MY_PVR}..."
+ rm "${ROOT}/usr/src/sys" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't remove previous symlinks, please fix manually."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
+ fi
+
+ if use sparc-fbsd ; then
+ ewarn "WARNING: kldload currently causes kernel panics"
+ ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
+ ewarn "we need gcc-4.1 to compile the kernel correctly :/"
+ ewarn "Please compile all modules you need into the kernel"
+ fi
+}