summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Yamin <plasmaroo@gentoo.org>2004-02-18 18:51:04 +0000
committerTim Yamin <plasmaroo@gentoo.org>2004-02-18 18:51:04 +0000
commit5958f8e5c721cdb622896d8e043193d8be1f8060 (patch)
tree2b41dc39951a22dc2befc7751da4282aa3065c81 /sys-kernel/gaming-sources
parentAdded the patch for the mremap/munmap vulnerability. Bug #42024. (diff)
downloadhistorical-5958f8e5c721cdb622896d8e043193d8be1f8060.tar.gz
historical-5958f8e5c721cdb622896d8e043193d8be1f8060.tar.bz2
historical-5958f8e5c721cdb622896d8e043193d8be1f8060.zip
Added the patch for the mremap/munmap vulnerability. Bug #42024.
Diffstat (limited to 'sys-kernel/gaming-sources')
-rw-r--r--sys-kernel/gaming-sources/ChangeLog8
-rw-r--r--sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r83
-rw-r--r--sys-kernel/gaming-sources/files/gaming-sources-2.4.20.munmap.patch27
-rw-r--r--sys-kernel/gaming-sources/gaming-sources-2.4.20-r8.ebuild43
4 files changed, 80 insertions, 1 deletions
diff --git a/sys-kernel/gaming-sources/ChangeLog b/sys-kernel/gaming-sources/ChangeLog
index c9a5643b8bf6..cdb1993679e7 100644
--- a/sys-kernel/gaming-sources/ChangeLog
+++ b/sys-kernel/gaming-sources/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-kernel/gaming-sources
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gaming-sources/ChangeLog,v 1.16 2004/02/16 14:47:20 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gaming-sources/ChangeLog,v 1.17 2004/02/18 18:51:04 plasmaroo Exp $
+
+*gaming-sources-2.4.20-r8 (18 Feb 2004)
+
+ 18 Feb 2004; <plasmaroo@gentoo.org> gaming-sources-2.4.20-r8.ebuild,
+ files/gaming-sources-2.4.20.munmap.patch:
+ Added the patch for the mremap/munmap vulnerability. Bug #42024.
16 Feb 2004; <plasmaroo@gentoo.org> gaming-sources-2.4.20-r7.ebuild,
files/gaming-sources-2.4.20.CAN-2004-0001.patch:
diff --git a/sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r8 b/sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r8
new file mode 100644
index 000000000000..bb133846e255
--- /dev/null
+++ b/sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r8
@@ -0,0 +1,3 @@
+MD5 c439d5c93d7fc9a1480a90842465bb97 linux-2.4.20.tar.bz2 27421046
+MD5 b8d7ca0e2c2df2642e919b03e266cdeb patches-2.4.20-gaming-r5.tar.bz2 381905
+MD5 0b0472793f452cd2e8c468eee44dca36 linux-2.4.20-ck7.patch.bz2 1308575
diff --git a/sys-kernel/gaming-sources/files/gaming-sources-2.4.20.munmap.patch b/sys-kernel/gaming-sources/files/gaming-sources-2.4.20.munmap.patch
new file mode 100644
index 000000000000..e120b35b7adb
--- /dev/null
+++ b/sys-kernel/gaming-sources/files/gaming-sources-2.4.20.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/gaming-sources/gaming-sources-2.4.20-r8.ebuild b/sys-kernel/gaming-sources/gaming-sources-2.4.20-r8.ebuild
new file mode 100644
index 000000000000..094ffcbb649d
--- /dev/null
+++ b/sys-kernel/gaming-sources/gaming-sources-2.4.20-r8.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gaming-sources/gaming-sources-2.4.20-r8.ebuild,v 1.1 2004/02/18 18:51:04 plasmaroo Exp $
+
+IUSE="build"
+
+# OKV=original kernel version, KV=patched kernel version.
+
+ETYPE="sources"
+
+inherit kernel
+
+OKV="2.4.20"
+EXTRAVERSION="-gaming-r8"
+KV="${OKV}${EXTRAVERSION}"
+S=${WORKDIR}/linux-${KV}
+CKV="2.4.20-ck7"
+
+DESCRIPTION="Full sources for the Gentoo gaming-optimized kernel"
+HOMEPAGE="http://members.optusnet.com.au/ckolivas/kernel/"
+SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 mirror://gentoo/patches-${KV/8/5}.tar.bz2 http://www.plumlocosoft.com/kernel/patches/2.4/${OKV}/linux-${CKV}.patch.bz2"
+
+KEYWORDS="x86"
+SLOT="${KV}"
+
+src_unpack() {
+
+ unpack linux-${OKV}.tar.bz2 patches-${KV/8/5}.tar.bz2
+ bzcat ${DISTDIR}/linux-${CKV}.patch.bz2 | patch -p0 || die "-ck patch failed"
+
+ mv linux-${OKV} linux-${KV} || die
+
+ cd ${KV/8/5} || die
+ rm 98_nforce2_agp.patch # In -ck7
+ kernel_src_unpack
+
+ epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch do_brk() vulnerability!"
+ epatch ${FILESDIR}/${P}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!"
+ epatch ${FILESDIR}/${P}.CAN-2004-0001.patch || die "Failed to apply AMD64 ptrace patch!"
+ epatch ${FILESDIR}/${P}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!"
+ epatch ${FILESDIR}/${P}.munmap.patch || die "Failed to apply munmap patch!"
+
+}