diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-01-08 19:58:00 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-01-08 19:58:00 +0000 |
commit | a5f94ab60d5b7a6fad262f7742deefc6b97bb961 (patch) | |
tree | b7c2c4c6f34df5d5e3d89485ab53f433f5c38766 /sys-kernel/ppc-sources-crypto | |
parent | Version bumped, and fixed the headers. Added patches to address the security ... (diff) | |
download | gentoo-2-a5f94ab60d5b7a6fad262f7742deefc6b97bb961.tar.gz gentoo-2-a5f94ab60d5b7a6fad262f7742deefc6b97bb961.tar.bz2 gentoo-2-a5f94ab60d5b7a6fad262f7742deefc6b97bb961.zip |
Version bumped, and fixed the headers. Added patches to address the security vulnerabilities in bugs #37292 and #37317 to 2.4.20-r2.
Diffstat (limited to 'sys-kernel/ppc-sources-crypto')
8 files changed, 304 insertions, 9 deletions
diff --git a/sys-kernel/ppc-sources-crypto/ChangeLog b/sys-kernel/ppc-sources-crypto/ChangeLog index ba71cb0cfd79..78199fb6d99c 100644 --- a/sys-kernel/ppc-sources-crypto/ChangeLog +++ b/sys-kernel/ppc-sources-crypto/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-kernel/ppc-sources-crypto # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc-sources-crypto/ChangeLog,v 1.7 2003/12/14 23:43:09 spider Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc-sources-crypto/ChangeLog,v 1.8 2004/01/08 19:57:47 plasmaroo Exp $ + +*ppc-sources-crypto-2.4.20-r2 (08 Jan 2004) + + 08 Jan 2004; <plasmaroo@gentoo.org> ppc-sources-crypto-2.4.20-r2.ebuild, + files/ppc-sources-crypto.CAN-2003-0985.patch, + files/ppc-sources-crypto.rtc_fix.patch: + Version bumped. Added patches to address the security vulnerabilities in bugs + #37292 and #37317. 15 Dec 2003; <spider@gentoo.org> ppc-sources-crypto-2.4.20-r1.ebuild, ppc-sources-crypto-2.4.20.ebuild: diff --git a/sys-kernel/ppc-sources-crypto/Manifest b/sys-kernel/ppc-sources-crypto/Manifest index 1666c4b54ac4..0af38d43e5fe 100644 --- a/sys-kernel/ppc-sources-crypto/Manifest +++ b/sys-kernel/ppc-sources-crypto/Manifest @@ -1,8 +1,8 @@ -MD5 2e3a1a8e240fd293389c29dd2188e819 ppc-sources-crypto-2.4.20-r2.ebuild 3498 -MD5 a0984b7094cfae828de4c7684dfcd8cf ChangeLog 1387 +MD5 eb6acbb2d80b27877eced2ed5bd872ea ppc-sources-crypto-2.4.20-r2.ebuild 3501 +MD5 3bca4223a7c27ce4e76ffe22fe05fd5d ChangeLog 1390 MD5 043b3ab3fa1052b12838dfa30667cb19 metadata.xml 353 -MD5 e476893f69d97e071ed5de7d93e1259b ppc-sources-crypto-2.4.20.ebuild 3307 -MD5 62611183bfa397aad491129b04e30416 ppc-sources-crypto-2.4.20-r1.ebuild 3309 +MD5 5ecb008cbe2a89521d8f4a0b759140c5 ppc-sources-crypto-2.4.20.ebuild 3310 +MD5 0c2745919311147bcd4ccb44408db9fa ppc-sources-crypto-2.4.20-r1.ebuild 3312 MD5 e77a93fdf26f06cf3ea5080b27211725 files/ppc-sources-crypto.CAN-2003-0985.patch 414 MD5 a61e57d5483a06f20da339d91f98fbb8 files/ppc-sources-crypto.rtc_fix.patch 6769 MD5 02d35ae561da62158d02dd7264e7e5db files/digest-ppc-sources-crypto-2.4.20 78 diff --git a/sys-kernel/ppc-sources-crypto/files/digest-ppc-sources-crypto-2.4.20-r2 b/sys-kernel/ppc-sources-crypto/files/digest-ppc-sources-crypto-2.4.20-r2 new file mode 100644 index 000000000000..3089021840ea --- /dev/null +++ b/sys-kernel/ppc-sources-crypto/files/digest-ppc-sources-crypto-2.4.20-r2 @@ -0,0 +1 @@ +MD5 5c74ec29e69e4eb8b5b5229a26a7a9a5 linux-ppc-crypto-2.4.20.tar.bz2 27628151 diff --git a/sys-kernel/ppc-sources-crypto/files/ppc-sources-crypto.CAN-2003-0985.patch b/sys-kernel/ppc-sources-crypto/files/ppc-sources-crypto.CAN-2003-0985.patch new file mode 100644 index 000000000000..dacf6ed810f9 --- /dev/null +++ b/sys-kernel/ppc-sources-crypto/files/ppc-sources-crypto.CAN-2003-0985.patch @@ -0,0 +1,13 @@ +--- linux/mm/mremap.c.orig 2004-01-05 17:01:21.382104120 +0000 ++++ linux/mm/mremap.c 2004-01-05 17:15:25.689749848 +0000 +@@ -315,6 +315,10 @@ + old_len = PAGE_ALIGN(old_len); + new_len = PAGE_ALIGN(new_len); + ++ /* Don't allow the degenerate cases */ ++ if (!old_len || !new_len) ++ goto out; ++ + /* new_addr is only valid if MREMAP_FIXED is specified */ + if (flags & MREMAP_FIXED) { + if (new_addr & ~PAGE_MASK) diff --git a/sys-kernel/ppc-sources-crypto/files/ppc-sources-crypto.rtc_fix.patch b/sys-kernel/ppc-sources-crypto/files/ppc-sources-crypto.rtc_fix.patch new file mode 100644 index 000000000000..10e9c228d6d2 --- /dev/null +++ b/sys-kernel/ppc-sources-crypto/files/ppc-sources-crypto.rtc_fix.patch @@ -0,0 +1,156 @@ +diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c +--- linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c 2004-01-05 23:41:44.000000000 +0000 +@@ -315,6 +315,7 @@ + { + struct rtc_time rtc_tm; + ++ memset(&rtc_tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&rtc_tm); + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) + return -EFAULT; +diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c +--- linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c 2004-01-05 23:42:22.000000000 +0000 +@@ -174,6 +174,7 @@ + { + struct rtc_time tm; + ++ memset(&tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&tm); + + if (copy_to_user((struct rtc_time *) arg, &tm, sizeof(struct rtc_time))) { +diff -ur linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c +--- linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c 2004-01-05 23:43:15.000000000 +0000 +@@ -54,6 +54,7 @@ + /* Ensure clock and real-time-mode-register are accessible */ + msr = rtc->msr & 0xc0; + rtc->msr = 0x40; ++ memset(&wtime, 0, sizeof (struct rtc_time)); + do { + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); +diff -ur linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c +--- linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c 2004-01-05 23:44:02.000000000 +0000 +@@ -52,6 +52,7 @@ + cli(); + /* Ensure clock and real-time-mode-register are accessible */ + rtc->ctrl = RTC_READ; ++ memset(&wtime, 0, sizeof (struct rtc_time)); + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); + wtime.tm_hour = BCD2BIN(rtc->bcd_hr); +diff -ur linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c +--- linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:48:34.000000000 +0000 +@@ -84,6 +84,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c +--- linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c 2004-01-05 23:44:34.000000000 +0000 +@@ -96,6 +96,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ppc_md.get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/char/efirtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c +--- linux-2.4.20-wolk4.9s/drivers/char/efirtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c 2004-01-05 23:47:53.000000000 +0000 +@@ -118,6 +118,7 @@ + static void + convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) + { ++ memset(wtime, 0, sizeof(struct rtc_time)); + wtime->tm_sec = eft->second; + wtime->tm_min = eft->minute; + wtime->tm_hour = eft->hour; +diff -ur linux-2.4.20-wolk4.9s/drivers/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c 2004-01-05 23:52:43.000000000 +0000 +@@ -370,6 +370,7 @@ + * tm_min, and tm_sec values are filled in. + */ + ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_alm_time(&wtime); + break; + } +@@ -417,6 +418,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c +--- linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:53:36.000000000 +0000 +@@ -561,6 +561,7 @@ + } + case RTC_ALM_READ: /* Read the present alarm time */ + { ++ memset(&ttime, 0, sizeof(struct timeval)); + if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT; + break; + } +@@ -609,6 +610,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT; + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c 2004-01-05 23:54:15.000000000 +0000 +@@ -64,6 +64,7 @@ + case RTC_RD_TIME: + if (ppc_md.get_rtc_time) + { ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -ur linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c 2004-01-05 23:54:43.000000000 +0000 +@@ -89,6 +89,7 @@ + switch (cmd) + { + case RTCGET: ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -ur linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c +--- linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c 2004-01-05 23:47:25.000000000 +0000 +@@ -174,6 +174,7 @@ + * tm_min, and tm_sec values are filled in. + */ + ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_alm_time(&wtime); + break; + } +@@ -216,6 +217,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_time(&wtime); + break; + } diff --git a/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r1.ebuild b/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r1.ebuild index 8cfefb4f6a63..93a911656246 100644 --- a/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r1.ebuild +++ b/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# 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-crypto/ppc-sources-crypto-2.4.20-r1.ebuild,v 1.2 2003/12/14 23:43:09 spider Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r1.ebuild,v 1.3 2004/01/08 19:57:47 plasmaroo Exp $ IUSE="build crypt" diff --git a/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r2.ebuild b/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r2.ebuild new file mode 100644 index 000000000000..20b513a9f9e6 --- /dev/null +++ b/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20-r2.ebuild @@ -0,0 +1,117 @@ +# 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-crypto/ppc-sources-crypto-2.4.20-r2.ebuild,v 1.1 2004/01/08 19:57:47 plasmaroo Exp $ + +IUSE="build crypt" + +# OKV=original kernel version, KV=patched kernel version. They can be the same. +OKV=2.4.20 +KV=2.4.20 +S=${WORKDIR}/linux-ppc-crypto-${KV} + +# Kernel ebuilds using the kernel.eclass can remove any patch that you +# do not want to apply by simply setting the KERNEL_EXCLUDE shell +# variable to the string you want to exclude (for instance +# KERNEL_EXCLUDE="evms" would not patch any patches whose names match +# *evms*). Kernels are only tested in the default configuration, but +# this may be useful if you know that a particular patch is causing a +# conflict with a patch you personally want to apply, or some other +# similar situation. + +ETYPE="sources" + +#inherit kernel + +DESCRIPTION="Full cryptoapi enabled sources for the Gentoo Linux PPC kernel" +SRC_URI="http://perso.wanadoo.fr/olivier.reisch/linux-ppc-crypto/linux-ppc-crypto-${OKV}.tar.bz2" +KEYWORDS="-x86 ppc -sparc -alpha" +PROVIDE="virtual/linux-sources" +HOMEPAGE="http://www.kernel.org/ http://www.kerneli.org/ http://www.gentoo.org/" +LICENSE="GPL-2" +SLOT="${KV}" + +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 + + +src_unpack() { + + cd ${WORKDIR} + unpack linux-ppc-crypto-${OKV}.tar.bz2 + cd ${S} + pwd + + epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch do_brk() vulnerability!" + epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!" + epatch ${FILESDIR}/${PN}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!" + + #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 + cd ${S} + echo ">>> Copying sources..." + mv ${WORKDIR}/* ${D}/usr/src + else + #linux-headers + yes "" | make oldconfig + echo "Ignore any errors from the yes command above." + make dep + dodir /usr/include/linux + cp -ax ${S}/include/linux/* ${D}/usr/include/linux + dodir /usr/include/asm + cp -ax ${S}/include/asm-ppc/* ${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-ppc-crypto-${KV} ${ROOT}/usr/src/linux + fi + [ `use xfs` ] && ewarn "XFS is no longer included!" +} diff --git a/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20.ebuild b/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20.ebuild index 47e3bdf0a617..3b8509f4b66d 100644 --- a/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20.ebuild +++ b/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# 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-crypto/ppc-sources-crypto-2.4.20.ebuild,v 1.10 2003/12/14 23:43:09 spider Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ppc-sources-crypto/ppc-sources-crypto-2.4.20.ebuild,v 1.11 2004/01/08 19:57:47 plasmaroo Exp $ IUSE="build crypt" |