diff options
author | Brian Jackson <iggy@gentoo.org> | 2003-12-02 00:36:26 +0000 |
---|---|---|
committer | Brian Jackson <iggy@gentoo.org> | 2003-12-02 00:36:26 +0000 |
commit | 38b3bf5147e31726c96b40f0361973673f5e3f9e (patch) | |
tree | 6aaedab9f41b443bbd2df3d61b199356a89dfe77 /sys-kernel | |
parent | fix do_brk vuln (diff) | |
download | gentoo-2-38b3bf5147e31726c96b40f0361973673f5e3f9e.tar.gz gentoo-2-38b3bf5147e31726c96b40f0361973673f5e3f9e.tar.bz2 gentoo-2-38b3bf5147e31726c96b40f0361973673f5e3f9e.zip |
fix do_brk vuln
Diffstat (limited to 'sys-kernel')
13 files changed, 58 insertions, 116 deletions
diff --git a/sys-kernel/vanilla-sources/ChangeLog b/sys-kernel/vanilla-sources/ChangeLog index c79c79657720..2426734e7bc3 100644 --- a/sys-kernel/vanilla-sources/ChangeLog +++ b/sys-kernel/vanilla-sources/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-kernel/vanilla-sources # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/ChangeLog,v 1.16 2003/11/20 07:43:38 lostlogic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/ChangeLog,v 1.17 2003/12/02 00:32:24 iggy Exp $ + + 01 Dec 2003; Brian Jackson <iggy@gentoo.org> vanilla-sources-2.2.22.ebuild, + vanilla-sources-2.4.20.ebuild, vanilla-sources-2.4.21.ebuild, + vanilla-sources-2.4.22.ebuild, files/do_brk_fix.patch: + fix do_brk vuln 20 Nov 2003; Brandon Low <lostlogic@gentoo.org> vanilla-sources-2.4.20.ebuild, vanilla-sources-2.4.21.ebuild, diff --git a/sys-kernel/vanilla-sources/Manifest b/sys-kernel/vanilla-sources/Manifest index 2027478a5175..2ea958b580ff 100644 --- a/sys-kernel/vanilla-sources/Manifest +++ b/sys-kernel/vanilla-sources/Manifest @@ -1,13 +1,12 @@ MD5 0cf19cc3ec7138bf81eb7b6bb3353fb0 vanilla-sources-2.0.39.ebuild 2748 -MD5 a8318d8d47b7a6cb63a2f2a864c7243e vanilla-sources-2.4.20.ebuild 873 -MD5 9718d2d0cac5f5af32d75acaff8a47f5 vanilla-sources-2.4.22.ebuild 878 +MD5 65688eb45b6c501c672210abbc0a0faf vanilla-sources-2.4.20.ebuild 868 +MD5 159a1bc9d2cbbfbf0205185cb845e6e1 vanilla-sources-2.4.22.ebuild 873 MD5 21a5e1ed5e13eb5399ec257020decf7f vanilla-sources-2.2.25.ebuild 2747 -MD5 d6cfde79f939fa5747a25b976d8bb3c3 vanilla-sources-2.4.21.ebuild 878 -MD5 f11eb7c098f3b8f436398ec43ccd2d2e ChangeLog 2379 +MD5 c152852e3761ef01985ac886cba45d4e vanilla-sources-2.4.21.ebuild 873 +MD5 9cc2536a6f8dbc952ad518b3fb6bbe7b ChangeLog 2592 MD5 17ded3e049cc5ea4571a590f031fd463 metadata.xml 449 MD5 b3d6d116283caa91607762d0f5c22acd vanilla-sources-2.4.23.ebuild 794 MD5 1d8193a0ded31699ec3b7bf85dd6cbfa files/digest-vanilla-sources-2.0.39 66 -MD5 7a3980ee687f27df3784c2bfb432ae67 files/digest-vanilla-sources-2.2.22 67 MD5 fa8428c6171dc0e9548f0b722a5db1c2 files/digest-vanilla-sources-2.2.25 67 MD5 bbc9b6e1761a30c6c7f7a9f8dec1e7e3 files/digest-vanilla-sources-2.4.20 67 MD5 9854e47afccae85e887bcb970fc68890 files/digest-vanilla-sources-2.4.21 67 diff --git a/sys-kernel/vanilla-sources/files/digest-vanilla-sources-2.2.22 b/sys-kernel/vanilla-sources/files/digest-vanilla-sources-2.2.22 deleted file mode 100644 index 855d7cef95b7..000000000000 --- a/sys-kernel/vanilla-sources/files/digest-vanilla-sources-2.2.22 +++ /dev/null @@ -1 +0,0 @@ -MD5 94a837594d00481a8087df2d6b6eb02f linux-2.2.22.tar.bz2 15815361 diff --git a/sys-kernel/vanilla-sources/files/do_brk_fix.patch b/sys-kernel/vanilla-sources/files/do_brk_fix.patch new file mode 100644 index 000000000000..fef1f1e981e2 --- /dev/null +++ b/sys-kernel/vanilla-sources/files/do_brk_fix.patch @@ -0,0 +1,12 @@ +--- a/mm/mmap.c Fri Sep 12 06:44:06 2003 ++++ b/mm/mmap.c Thu Oct 2 01:18:19 2003 +@@ -1041,6 +1041,9 @@ + if (!len) + return addr; + ++ if ((addr + len) > TASK_SIZE || (addr + len) < addr) ++ return -EINVAL; ++ + /* + * mlock MCL_FUTURE? + */ diff --git a/sys-kernel/vanilla-sources/vanilla-sources-2.2.22.ebuild b/sys-kernel/vanilla-sources/vanilla-sources-2.2.22.ebuild deleted file mode 100644 index b41534ddb2a4..000000000000 --- a/sys-kernel/vanilla-sources/vanilla-sources-2.2.22.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-2.2.22.ebuild,v 1.9 2003/09/07 07:26:01 msterret Exp $ -#OKV=original kernel version, KV=patched kernel version. They can be the same. - -#we use this next variable to avoid duplicating stuff on cvs -GFILESDIR=${PORTDIR}/sys-kernel/linux-sources/files -OKV=2.2.22 -KV=2.2.22 -S=${WORKDIR}/linux-${KV} -ETYPE="sources" - -# What's in this kernel? - -# INCLUDED: -# stock 2.2.22 kernel sources - -DESCRIPTION="Full sources for the Gentoo Linux kernel" -SRC_URI="mirror://kernel/linux/kernel/v2.2/linux-${OKV}.tar.bz2" -PROVIDE="virtual/linux-sources" -HOMEPAGE="http://www.kernel.org/" -LICENSE="GPL-2" -SLOT="${KV}" -KEYWORDS="x86 ppc sparc " - -if [ $ETYPE = "sources" ] && [ -z "`use build`" ] -then - #console-tools is needed to solve the loadkeys fiasco; binutils version needed to avoid Athlon/PIII/SSE assembler bugs. - DEPEND=">=sys-devel/binutils-2.11.90.0.31" - RDEPEND=">=sys-libs/ncurses-5.2 dev-lang/perl virtual/modutils sys-devel/make" -fi - -[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" - -src_unpack() { - cd ${WORKDIR} - unpack linux-${OKV}.tar.bz2 - mv linux linux-${KV} || die - cd ${S} - - #sometimes we have icky kernel symbols; this seems to get rid of them - make mrproper || die - - #this file is required for other things to build properly, so we autogenerate it - make include/linux/version.h || die - - #fix silly permissions in tarball - cd ${WORKDIR} - chown -R 0.0 * - chmod -R a+r-w+X,u+w * - - # Gentoo Linux uses /boot, so fix 'make install' to work properly - cd ${S} - mv Makefile Makefile.orig - sed -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \ - Makefile.orig >Makefile || die # test, remove me if Makefile ok - rm Makefile.orig -} - -src_compile() { - if [ "$ETYPE" = "headers" ] - then - yes "" | make oldconfig - echo "Ignore any errors from the yes command above." - fi -} - -src_install() { - if [ "$ETYPE" = "sources" ] - then - dodir /usr/src - echo ">>> Copying sources..." - mv ${WORKDIR}/* ${D}/usr/src - else - #linux-headers - dodir /usr/include/linux - cp -ax ${S}/include/linux/* ${D}/usr/include/linux - rm -rf ${D}/usr/include/linux/modules - dodir /usr/include/asm - cp -ax ${S}/include/asm-i386/* ${D}/usr/include/asm - fi -} - -pkg_preinst() { - if [ "$ETYPE" = "headers" ] - then - [ -L ${ROOT}usr/include/linux ] && rm ${ROOT}usr/include/linux - [ -L ${ROOT}usr/include/asm ] && rm ${ROOT}usr/include/asm - true - fi -} - -pkg_postinst() { - [ "$ETYPE" = "headers" ] && return - if [ ! -e ${ROOT}usr/src/linux ] - then - rm -f ${ROOT}usr/src/linux - ln -sf linux-${KV} ${ROOT}/usr/src/linux - fi -} diff --git a/sys-kernel/vanilla-sources/vanilla-sources-2.4.20.ebuild b/sys-kernel/vanilla-sources/vanilla-sources-2.4.20.ebuild index 81fd625de20d..1b9483144c88 100644 --- a/sys-kernel/vanilla-sources/vanilla-sources-2.4.20.ebuild +++ b/sys-kernel/vanilla-sources/vanilla-sources-2.4.20.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-2.4.20.ebuild,v 1.10 2003/11/20 07:43:38 lostlogic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-2.4.20.ebuild,v 1.11 2003/12/02 00:32:24 iggy Exp $ #OKV=original kernel version, KV=patched kernel version. They can be the same. ETYPE="sources" @@ -27,5 +27,7 @@ src_unpack() { cd ${S} + epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + kernel_universal_unpack } diff --git a/sys-kernel/vanilla-sources/vanilla-sources-2.4.21.ebuild b/sys-kernel/vanilla-sources/vanilla-sources-2.4.21.ebuild index 7a09d5e26846..c5421e0bea2c 100644 --- a/sys-kernel/vanilla-sources/vanilla-sources-2.4.21.ebuild +++ b/sys-kernel/vanilla-sources/vanilla-sources-2.4.21.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-2.4.21.ebuild,v 1.7 2003/11/20 07:43:38 lostlogic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-2.4.21.ebuild,v 1.8 2003/12/02 00:32:24 iggy Exp $ #OKV=original kernel version, KV=patched kernel version. They can be the same. ETYPE="sources" @@ -27,5 +27,7 @@ src_unpack() { cd ${S} + epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + kernel_universal_unpack } diff --git a/sys-kernel/vanilla-sources/vanilla-sources-2.4.22.ebuild b/sys-kernel/vanilla-sources/vanilla-sources-2.4.22.ebuild index e2f63c5e901f..52ab36cbe0a7 100644 --- a/sys-kernel/vanilla-sources/vanilla-sources-2.4.22.ebuild +++ b/sys-kernel/vanilla-sources/vanilla-sources-2.4.22.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-2.4.22.ebuild,v 1.5 2003/11/20 07:43:38 lostlogic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-2.4.22.ebuild,v 1.6 2003/12/02 00:32:24 iggy Exp $ #OKV=original kernel version, KV=patched kernel version. They can be the same. ETYPE="sources" @@ -27,5 +27,7 @@ src_unpack() { cd ${S} + epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + kernel_universal_unpack } diff --git a/sys-kernel/win4lin-sources/ChangeLog b/sys-kernel/win4lin-sources/ChangeLog index 07d65ae16e25..3a143807b48c 100644 --- a/sys-kernel/win4lin-sources/ChangeLog +++ b/sys-kernel/win4lin-sources/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-kernel/win4lin-sources # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/ChangeLog,v 1.7 2003/11/20 07:43:38 lostlogic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/ChangeLog,v 1.8 2003/12/02 00:36:23 iggy Exp $ + + 01 Dec 2003; Brian Jackson <iggy@gentoo.org> + win4lin-sources-2.4.20-r1.ebuild, win4lin-sources-2.4.22.ebuild, + files/do_brk_fix.patch: + fix do_brk vuln 20 Nov 2003; Brandon Low <lostlogic@gentoo.org> win4lin-sources-2.4.20-r1.ebuild, win4lin-sources-2.4.22.ebuild: diff --git a/sys-kernel/win4lin-sources/Manifest b/sys-kernel/win4lin-sources/Manifest index e100a3d17c51..618bedfc797d 100644 --- a/sys-kernel/win4lin-sources/Manifest +++ b/sys-kernel/win4lin-sources/Manifest @@ -1,6 +1,6 @@ -MD5 2e621ac8f22e69dccb234766927a4322 win4lin-sources-2.4.22.ebuild 1173 -MD5 4518a3a023a173c2d1fdb0441c53031e ChangeLog 1303 -MD5 c797a4a328e0937077319f44a015b53d win4lin-sources-2.4.20-r1.ebuild 1369 +MD5 0deeef013192d80cc8456e31e09c419c win4lin-sources-2.4.22.ebuild 1168 +MD5 8417f54411e1e1852c5468de5c45b037 ChangeLog 1457 +MD5 2dd30f7c7931a79d0d46ec0e2590fc14 win4lin-sources-2.4.20-r1.ebuild 1364 MD5 e637c6fa41097ea2c4693d0766f2e1c5 files/do_brk_fix.patch 242 MD5 a3ac6282b407aaef5e22644f04ce59ee files/digest-win4lin-sources-2.4.22 201 MD5 ec72e31e51b6973ced56cfac1c6f0878 files/digest-win4lin-sources-2.4.20-r1 201 diff --git a/sys-kernel/win4lin-sources/files/do_brk_fix.patch b/sys-kernel/win4lin-sources/files/do_brk_fix.patch new file mode 100644 index 000000000000..fef1f1e981e2 --- /dev/null +++ b/sys-kernel/win4lin-sources/files/do_brk_fix.patch @@ -0,0 +1,12 @@ +--- a/mm/mmap.c Fri Sep 12 06:44:06 2003 ++++ b/mm/mmap.c Thu Oct 2 01:18:19 2003 +@@ -1041,6 +1041,9 @@ + if (!len) + return addr; + ++ if ((addr + len) > TASK_SIZE || (addr + len) < addr) ++ return -EINVAL; ++ + /* + * mlock MCL_FUTURE? + */ diff --git a/sys-kernel/win4lin-sources/win4lin-sources-2.4.20-r1.ebuild b/sys-kernel/win4lin-sources/win4lin-sources-2.4.20-r1.ebuild index 2f07571df3de..4fccfec74073 100644 --- a/sys-kernel/win4lin-sources/win4lin-sources-2.4.20-r1.ebuild +++ b/sys-kernel/win4lin-sources/win4lin-sources-2.4.20-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.4.20-r1.ebuild,v 1.7 2003/11/20 07:43:38 lostlogic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.4.20-r1.ebuild,v 1.8 2003/12/02 00:36:23 iggy Exp $ IUSE="build" @@ -37,5 +37,7 @@ src_unpack() { cat ${DISTDIR}/mki-adapter.patch|patch -p1 || die "-mki-adapter patch failed" cat ${DISTDIR}/Kernel-Win4Lin3-${OKV}.patch|patch -p1 || die "-Win4Lin3 patch failed" + epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + kernel_universal_unpack } diff --git a/sys-kernel/win4lin-sources/win4lin-sources-2.4.22.ebuild b/sys-kernel/win4lin-sources/win4lin-sources-2.4.22.ebuild index dddfe5bed383..42b3f2bce595 100644 --- a/sys-kernel/win4lin-sources/win4lin-sources-2.4.22.ebuild +++ b/sys-kernel/win4lin-sources/win4lin-sources-2.4.22.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.4.22.ebuild,v 1.3 2003/12/01 19:12:27 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.4.22.ebuild,v 1.4 2003/12/02 00:36:23 iggy Exp $ IUSE="build" @@ -34,6 +34,8 @@ src_unpack() { cd linux-${KV} cat ${DISTDIR}/mki-adapter.patch | patch -p1 &> /dev/null || die "Error: mki-adapter patch failed!" + epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + kernel_universal_unpack } |