diff options
author | Brian Jackson <iggy@gentoo.org> | 2004-02-18 18:48:57 +0000 |
---|---|---|
committer | Brian Jackson <iggy@gentoo.org> | 2004-02-18 18:48:57 +0000 |
commit | aa4c83658ac2db23b1e93a491165fb560f965551 (patch) | |
tree | 7a52ba3eb7fc59f7aeb3f1ed4921f62462241d6c /sys-kernel/usermode-sources | |
parent | Added the patch for the mremap/munmap vulnerability. Bug #42024. (diff) | |
download | historical-aa4c83658ac2db23b1e93a491165fb560f965551.tar.gz historical-aa4c83658ac2db23b1e93a491165fb560f965551.tar.bz2 historical-aa4c83658ac2db23b1e93a491165fb560f965551.zip |
Added the patch for the mremap/munmap vulnerability. Bug #42024.
Diffstat (limited to 'sys-kernel/usermode-sources')
7 files changed, 134 insertions, 2 deletions
diff --git a/sys-kernel/usermode-sources/ChangeLog b/sys-kernel/usermode-sources/ChangeLog index 732daf265f76..630bb293ea1f 100644 --- a/sys-kernel/usermode-sources/ChangeLog +++ b/sys-kernel/usermode-sources/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-kernel/usermode-sources # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/usermode-sources/ChangeLog,v 1.26 2004/01/30 23:27:20 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/usermode-sources/ChangeLog,v 1.27 2004/02/18 18:48:56 iggy Exp $ + +*usermode-sources-2.4.24-r1 (18 Feb 2004) + + 18 Feb 2004; Brian Jackson <iggy@gentoo.org> + usermode-sources-2.4.24-r1.ebuild, usermode-sources-2.6.3-r1.ebuild, + files/usermode-sources-2.4.24.munmap.patch: + Added the patch for the mremap/munmap vulnerability. Bug #42024. 31 Jan 2004; Michal Januszewski <spock@gentoo.org> usermode-sources-2.6.1-r1.ebuild: diff --git a/sys-kernel/usermode-sources/Manifest b/sys-kernel/usermode-sources/Manifest index 8c2a11254944..fc1e459e2112 100644 --- a/sys-kernel/usermode-sources/Manifest +++ b/sys-kernel/usermode-sources/Manifest @@ -2,9 +2,11 @@ MD5 48ac359d9b4bd01d58538bac6ab3643e usermode-sources-2.6.1-r1.ebuild 1506 MD5 2f03fbab00001abd97bbf6a22ad25481 usermode-sources-2.4.20-r2.ebuild 2270 MD5 66159a5c9213b29e33ce341b5b406775 usermode-sources-2.4.21-r1.ebuild 1978 MD5 5c739fab83545ccbea47c9afc2df914c usermode-sources-2.4.23-r2.ebuild 1684 +MD5 0473410c8ecc0e20e35d8785d3b9da62 usermode-sources-2.4.24-r1.ebuild 1789 +MD5 9fa2fa31e9880488f9ad3f51ae14ba4f usermode-sources-2.6.3-r1.ebuild 791 MD5 a2f284fae42dbf9801371cd88b76382c usermode-sources-2.4.22-r2.ebuild 1969 MD5 73a76ea43d99f2369d8ac469599c8175 usermode-sources-2.4.23-r1.ebuild 1688 -MD5 5c317262fd35a39847e34003e018eaee ChangeLog 4446 +MD5 f3b8108f5794a3955117aa5592265823 ChangeLog 4720 MD5 6cdc1e33ed67ce129f7498203526cb16 metadata.xml 252 MD5 a61e57d5483a06f20da339d91f98fbb8 files/usermode-sources-2.4.20.rtc_fix.patch 6769 MD5 3c89919b01bf69d48c4307faa77d99a1 files/digest-usermode-sources-2.4.20-r2 134 @@ -12,7 +14,10 @@ MD5 2b62c53b9695ab543819727b7e64e73b files/digest-usermode-sources-2.4.21-r1 134 MD5 4c510db2fdca185ae68005e677b87dcd files/digest-usermode-sources-2.4.22-r2 134 MD5 b8ba6a7baf14cbeb3a21bf174ea7d773 files/digest-usermode-sources-2.4.23-r1 134 MD5 81d1aecdba0a87dcee572935be335b6d files/digest-usermode-sources-2.4.23-r2 134 +MD5 2f7e35e02cfe97af5e6e49bf84614b42 files/digest-usermode-sources-2.4.24-r1 134 MD5 f418f335a883a78923ebd9205011c25a files/digest-usermode-sources-2.6.1-r1 131 +MD5 cf8295a2c632cf6aa45b56a91e9a8a31 files/digest-usermode-sources-2.6.3-r1 135 MD5 e2e2b545b6fcdcecf49e33798efa5b84 files/usermode-sources-2.4.22.rtc_fix.patch 7073 MD5 e637c6fa41097ea2c4693d0766f2e1c5 files/do_brk_fix.patch 242 +MD5 174438d215b70cad5ffb00ca8123c062 files/usermode-sources-2.4.24.munmap.patch 837 MD5 e77a93fdf26f06cf3ea5080b27211725 files/usermode-sources.CAN-2003-0985.patch 414 diff --git a/sys-kernel/usermode-sources/files/digest-usermode-sources-2.4.24-r1 b/sys-kernel/usermode-sources/files/digest-usermode-sources-2.4.24-r1 new file mode 100644 index 000000000000..1afde5baa80a --- /dev/null +++ b/sys-kernel/usermode-sources/files/digest-usermode-sources-2.4.24-r1 @@ -0,0 +1,2 @@ +MD5 1e055c42921b2396a559d84df4c3d9aa linux-2.4.24.tar.bz2 29837818 +MD5 fd184531d88bea49f2ece7d68b4a997a uml-patch-2.4.24-1.bz2 189230 diff --git a/sys-kernel/usermode-sources/files/digest-usermode-sources-2.6.3-r1 b/sys-kernel/usermode-sources/files/digest-usermode-sources-2.6.3-r1 new file mode 100644 index 000000000000..4648c8799288 --- /dev/null +++ b/sys-kernel/usermode-sources/files/digest-usermode-sources-2.6.3-r1 @@ -0,0 +1,2 @@ +MD5 6063a7e424355ec52e0cb559fb99034d linux-2.6.3.tar.bz2 34271622 +MD5 c3f42dd778e100b82f2012eb837ee50a uml-patch-2.6.3-rc2-1.bz2 98835 diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.4.24.munmap.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.4.24.munmap.patch new file mode 100644 index 000000000000..e120b35b7adb --- /dev/null +++ b/sys-kernel/usermode-sources/files/usermode-sources-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/usermode-sources/usermode-sources-2.4.24-r1.ebuild b/sys-kernel/usermode-sources/usermode-sources-2.4.24-r1.ebuild new file mode 100644 index 000000000000..283e7bc8831d --- /dev/null +++ b/sys-kernel/usermode-sources/usermode-sources-2.4.24-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/usermode-sources/usermode-sources-2.4.24-r1.ebuild,v 1.1 2004/02/18 18:48:56 iggy Exp $ + +ETYPE="sources" +inherit kernel eutils + +UML_PATCH="uml-patch-2.4.24-1" + +# we patch against vanilla-sources only +DESCRIPTION="Full (vanilla) sources for the User Mode Linux kernel" +SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${PV}.tar.bz2 + mirror://sourceforge/user-mode-linux/${UML_PATCH}.bz2" +HOMEPAGE="http://www.kernel.org/ http://user-mode-linux.sourceforge.net" +LICENSE="GPL-2" +SLOT="${PV}" +KEYWORDS="x86" +EXTRAVERSION=${PR} +RESTRICT="nomirror" + +# 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 dev-lang/perl" +RDEPEND=">=sys-libs/ncurses-5.2" + +S=${WORKDIR}/linux-${PV} + +src_unpack() { + # unpack vanilla sources + cd ${WORKDIR} + unpack linux-${PV}.tar.bz2 + + # apply usermode patch + cd ${S} + epatch ${DISTDIR}/${UML_PATCH}.bz2 + epatch ${FILESDIR}/${P}.munmap.patch || die "failed to apply munmap patch" + + #epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!" + #epatch ${FILESDIR}/${PN}-2.4.22.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!" + + kernel_universal_unpack +} + +src_compile() { + true +} + +src_install() { + mkdir -p ${D}/usr/src/uml + + # fix silly permissions in tarball + cd ${WORKDIR} + chown -R root:root * + chmod -R a+r-w+X,u+w * + + mv linux-${PV} ${D}/usr/src/uml/ +} + +pkg_postinst() { + # create linux symlink + if [ ! -e ${ROOT}usr/src/uml/linux ] + then + rm -f ${ROOT}usr/src/uml/linux + ln -sf ${ROOT}usr/src/uml/linux-${PV} ${ROOT}usr/src/uml/linux + fi +} diff --git a/sys-kernel/usermode-sources/usermode-sources-2.6.3-r1.ebuild b/sys-kernel/usermode-sources/usermode-sources-2.6.3-r1.ebuild new file mode 100644 index 000000000000..42d3fff2ac28 --- /dev/null +++ b/sys-kernel/usermode-sources/usermode-sources-2.6.3-r1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/usermode-sources/usermode-sources-2.6.3-r1.ebuild,v 1.1 2004/02/18 18:48:56 iggy Exp $ + +K_NOUSENAME="yes" +ETYPE="sources" + +inherit kernel-2 +UML_PATCH="uml-patch-2.6.3-rc2-1" +OKV="${PV}" +EXTRAVERSION="-${UML_PATCH//-*-/}" +KV="${OKV}${EXTRAVERSION}" +S="${WORKDIR}/linux-${KV}" + +UNIPATCH_LIST="${DISTDIR}/${UML_PATCH}.bz2" + +DESCRIPTION="Full (vanilla) sources for the User Mode Linux kernel" +SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${PV}.tar.bz2 + mirror://sourceforge/user-mode-linux/${UML_PATCH}.bz2" +HOMEPAGE="http://www.kernel.org/ http://user-mode-linux.sourceforge.net" +SLOT="${KV}" +KEYWORDS="x86" +RESTRICT="nomirror" |