summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Yamin <plasmaroo@gentoo.org>2004-02-19 11:11:41 +0000
committerTim Yamin <plasmaroo@gentoo.org>2004-02-19 11:11:41 +0000
commitd15707857a017be9b971ef70092b2428d68dbac0 (patch)
treefa2d2a00cc746d23ec9d254ae872559bf2f9ae75 /sys-kernel
parent.nother cleanup (diff)
downloadhistorical-d15707857a017be9b971ef70092b2428d68dbac0.tar.gz
historical-d15707857a017be9b971ef70092b2428d68dbac0.tar.bz2
historical-d15707857a017be9b971ef70092b2428d68dbac0.zip
Added the patch for the mremap/munmap vulnerability. Bug #42024.
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/ppc-sources-dev/ChangeLog8
-rw-r--r--sys-kernel/ppc-sources-dev/Manifest31
-rw-r--r--sys-kernel/ppc-sources-dev/files/digest-ppc-sources-dev-2.4.24-r22
-rw-r--r--sys-kernel/ppc-sources-dev/files/ppc-sources-dev-2.4.24.munmap.patch27
-rw-r--r--sys-kernel/ppc-sources-dev/ppc-sources-dev-2.4.24-r2.ebuild74
5 files changed, 127 insertions, 15 deletions
diff --git a/sys-kernel/ppc-sources-dev/ChangeLog b/sys-kernel/ppc-sources-dev/ChangeLog
index 567864040297..0e3c3d62bbab 100644
--- a/sys-kernel/ppc-sources-dev/ChangeLog
+++ b/sys-kernel/ppc-sources-dev/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-kernel/ppc-sources-dev
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc-sources-dev/ChangeLog,v 1.19 2004/02/15 18:37:17 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc-sources-dev/ChangeLog,v 1.20 2004/02/19 11:11:41 plasmaroo Exp $
+
+*ppc-sources-dev-2.4.24-r2 (19 Feb 2004)
+
+ 19 Feb 2004; <plasmaroo@gentoo.org> ppc-sources-dev-2.4.24-r2.ebuild,
+ files/ppc-sources-dev-2.4.24.munmap.patch:
+ Added the patch for the mremap/munmap vulnerability. Bug #42024.
15 Feb 2004; David Holm <dholm@gentoo.org> ppc-sources-dev-2.4.24-r1.ebuild,
files/ppc-sources-dev-2.4.24.pmac_pmu.patch:
diff --git a/sys-kernel/ppc-sources-dev/Manifest b/sys-kernel/ppc-sources-dev/Manifest
index b41cde759041..32a281ceeb45 100644
--- a/sys-kernel/ppc-sources-dev/Manifest
+++ b/sys-kernel/ppc-sources-dev/Manifest
@@ -1,21 +1,24 @@
-MD5 4371ee1fe963afdb0f1e1d327af2c501 ChangeLog 3354
-MD5 4b1f93b2fca55d2bfdd961a517eb5611 metadata.xml 347
-MD5 2e1532c1dbff17ab96ea76d189a9b7ba ppc-sources-dev-2.4.19.ebuild 2253
-MD5 e08b80d2fa5bbcf80068d557458ffe59 ppc-sources-dev-2.4.20.ebuild 2495
-MD5 d5bd00e9a574a24b019566b389e342c7 ppc-sources-dev-2.4.21.ebuild 1872
+MD5 bc455c31558f4e229aeedc6770d293fe ChangeLog 3585
MD5 46093868a7b9b6455e6a0917baaada76 ppc-sources-dev-2.4.22.ebuild 2064
+MD5 c82effeaae6a6536b1659075b2b880c4 ppc-sources-dev-2.4.24-r2.ebuild 1814
+MD5 4b1f93b2fca55d2bfdd961a517eb5611 metadata.xml 347
MD5 b147268040a040e1923b4e9ac12b4190 ppc-sources-dev-2.4.24.ebuild 1932
-MD5 53c928a80615f43ab56d3927b66ef69c ppc-sources-dev-2.4.22-r1.ebuild 2326
MD5 144bf8fc981bd21efec5c0409da95c79 ppc-sources-dev-2.4.24-r1.ebuild 1831
-MD5 660f16218c08735d9c1e9e0e5b292a23 files/digest-ppc-sources-dev-2.4.19 68
-MD5 c45b2bb6026a8726c5932c0778879a21 files/digest-ppc-sources-dev-2.4.20 70
-MD5 91cdf75820acd5ac4942bab12e5ceb5a files/digest-ppc-sources-dev-2.4.21 143
-MD5 5b30d68e4f8019c1433bcb2a2f70adec files/digest-ppc-sources-dev-2.4.22 143
-MD5 5b30d68e4f8019c1433bcb2a2f70adec files/digest-ppc-sources-dev-2.4.22-r1 143
-MD5 e880d661985279c3a91187e02fc00611 files/ppc-sources-dev-2.4.22-r1.via-pmu.diff 591
+MD5 d5bd00e9a574a24b019566b389e342c7 ppc-sources-dev-2.4.21.ebuild 1872
+MD5 2e1532c1dbff17ab96ea76d189a9b7ba ppc-sources-dev-2.4.19.ebuild 2253
+MD5 53c928a80615f43ab56d3927b66ef69c ppc-sources-dev-2.4.22-r1.ebuild 2326
+MD5 e08b80d2fa5bbcf80068d557458ffe59 ppc-sources-dev-2.4.20.ebuild 2495
MD5 e77a93fdf26f06cf3ea5080b27211725 files/ppc-sources-dev-2.4.22.CAN-2003-0985.patch 414
-MD5 a580e6b8c602c2e13fb5de7cc2de65a0 files/ppc-sources-dev-2.4.22.do_brk.patch 242
+MD5 5b30d68e4f8019c1433bcb2a2f70adec files/digest-ppc-sources-dev-2.4.22 143
MD5 e2e2b545b6fcdcecf49e33798efa5b84 files/ppc-sources-dev-2.4.22.rtc_fix.patch 7073
-MD5 6c1a91839ac295ee40fa04ac57da456b files/digest-ppc-sources-dev-2.4.24 142
+MD5 a580e6b8c602c2e13fb5de7cc2de65a0 files/ppc-sources-dev-2.4.22.do_brk.patch 242
+MD5 c45b2bb6026a8726c5932c0778879a21 files/digest-ppc-sources-dev-2.4.20 70
+MD5 e880d661985279c3a91187e02fc00611 files/ppc-sources-dev-2.4.22-r1.via-pmu.diff 591
+MD5 660f16218c08735d9c1e9e0e5b292a23 files/digest-ppc-sources-dev-2.4.19 68
+MD5 5b30d68e4f8019c1433bcb2a2f70adec files/digest-ppc-sources-dev-2.4.22-r1 143
MD5 f2d2c30d68a939687046482249f6565e files/digest-ppc-sources-dev-2.4.24-r1 146
MD5 6fc2167c8361b6d596b4f3e733cb1a91 files/ppc-sources-dev-2.4.24.pmac_pmu.patch 803
+MD5 6c1a91839ac295ee40fa04ac57da456b files/digest-ppc-sources-dev-2.4.24 142
+MD5 91cdf75820acd5ac4942bab12e5ceb5a files/digest-ppc-sources-dev-2.4.21 143
+MD5 f2d2c30d68a939687046482249f6565e files/digest-ppc-sources-dev-2.4.24-r2 146
+MD5 174438d215b70cad5ffb00ca8123c062 files/ppc-sources-dev-2.4.24.munmap.patch 837
diff --git a/sys-kernel/ppc-sources-dev/files/digest-ppc-sources-dev-2.4.24-r2 b/sys-kernel/ppc-sources-dev/files/digest-ppc-sources-dev-2.4.24-r2
new file mode 100644
index 000000000000..24a56477b65c
--- /dev/null
+++ b/sys-kernel/ppc-sources-dev/files/digest-ppc-sources-dev-2.4.24-r2
@@ -0,0 +1,2 @@
+MD5 1e055c42921b2396a559d84df4c3d9aa linux-2.4.24.tar.bz2 29837818
+MD5 15014e78e966198105b535d4735d858f patch-2.4.24-ppc-dev-r1.patch.bz2 1704281
diff --git a/sys-kernel/ppc-sources-dev/files/ppc-sources-dev-2.4.24.munmap.patch b/sys-kernel/ppc-sources-dev/files/ppc-sources-dev-2.4.24.munmap.patch
new file mode 100644
index 000000000000..e120b35b7adb
--- /dev/null
+++ b/sys-kernel/ppc-sources-dev/files/ppc-sources-dev-2.4.24.munmap.patch
@@ -0,0 +1,27 @@
+diff -ur linux-2.4.25-rc3/mm/mremap.c linux-2.4.25-rc4/mm/mremap.c
+--- linux-2.4.25-rc3/mm/mremap.c 2004-02-18 13:56:01.000000000 +0000
++++ linux-2.4.25-rc4/mm/mremap.c 2004-02-18 13:49:08.000000000 +0000
+@@ -258,16 +258,20 @@
+ if ((addr <= new_addr) && (addr+old_len) > new_addr)
+ goto out;
+
+- do_munmap(current->mm, new_addr, new_len);
++ ret = do_munmap(current->mm, new_addr, new_len);
++ if (ret && new_len)
++ goto out;
+ }
+
+ /*
+ * Always allow a shrinking remap: that just unmaps
+ * the unnecessary pages..
+ */
+- ret = addr;
+ if (old_len >= new_len) {
+- do_munmap(current->mm, addr+new_len, old_len - new_len);
++ ret = do_munmap(current->mm, addr+new_len, old_len - new_len);
++ if (ret && old_len != new_len)
++ goto out;
++ ret = addr;
+ if (!(flags & MREMAP_FIXED) || (new_addr == addr))
+ goto out;
+ }
diff --git a/sys-kernel/ppc-sources-dev/ppc-sources-dev-2.4.24-r2.ebuild b/sys-kernel/ppc-sources-dev/ppc-sources-dev-2.4.24-r2.ebuild
new file mode 100644
index 000000000000..44b3ffade1c1
--- /dev/null
+++ b/sys-kernel/ppc-sources-dev/ppc-sources-dev-2.4.24-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc-sources-dev/ppc-sources-dev-2.4.24-r2.ebuild,v 1.1 2004/02/19 11:11:41 plasmaroo Exp $
+#OKV=original kernel version, KV=patched kernel version. They can be the same.
+
+# Included patches:
+# benh 2.4.24-0
+# pegasos 2.4.24-2
+# orinoco monitor 0.13
+# O_STREAMING 2.4.20-pre9-1
+# GRSecurity 2.0-rc4
+# ea+acl+nfsacl 0.8.65
+# XFS 2.4.23
+# Loop-Jari 2.4.22.0
+# FreeS/WAN 2.01
+# x509 1.4.5
+# Extra bootlogos
+
+ETYPE="sources"
+inherit kernel
+
+OKV="2.4.24"
+EXTRAVERSION="`echo ${PV}-${PR} | \
+ sed -e 's/[0-9]\+\.[0-9]\+\.[0-9]\+\(.*\)/\1/'`"
+
+KV=${PV}-ppc-dev-${PR}
+S=${WORKDIR}/${PF}
+
+inherit eutils
+
+DESCRIPTION="Full sources for the linux kernel 2.4.24 with lots of extra features"
+SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2
+ mirror://gentoo/patch-${KV/r2/r1}.patch.bz2"
+
+KEYWORDS="~ppc -ppc64"
+DEPEND=">=sys-devel/binutils-2.11.90.0.31"
+RDEPEND=">=sys-libs/ncurses-5.2 dev-lang/perl virtual/modutils sys-devel/make"
+
+SLOT=${KV}
+PROVIDE="virtual/linux-sources"
+
+src_unpack() {
+ cd ${WORKDIR}
+ unpack linux-${OKV}.tar.bz2
+
+ mv linux-${OKV} ${PF}
+ cd ${PF}
+ bzcat ${DISTDIR}/patch-${KV/r2/r1}.patch.bz2 | patch -p1 || die "patch failed"
+ patch -p1 < ${FILESDIR}/${P}.pmac_pmu.patch || \
+ die "Failed to apply pmac_pmu fix"
+
+ epatch ${FILESDIR}/${P}.munmap.patch || die "Failed to apply munmap patch!"
+
+ cd ${WORKDIR}/${PF}
+ MY_ARCH=${ARCH}
+ EXTRAVERSION=-ppc-dev-${PR}
+ unset ARCH
+ kernel_universal_unpack
+ ARCH=${MY_ARCH}
+
+}
+
+src_install() {
+ dodir /usr/src
+ echo ">>> Copying sources..."
+ mv ${WORKDIR}/* ${D}/usr/src
+}
+
+pkg_postinst() {
+ if [ ! -e ${ROOT}usr/src/linux ]
+ then
+ ln -sf ${PF} ${ROOT}/usr/src/linux
+ fi
+}