# ChangeLog for sys-kernel/alpha-sources
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/alpha-sources/ChangeLog,v 1.35 2004/11/06 21:36:45 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/alpha-sources/ChangeLog,v 1.36 2004/11/12 18:31:39 plasmaroo Exp $
+
+*alpha-sources-2.4.21-r14 (12 Nov 2004)
+
+ 12 Nov 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r13.ebuild,
+ +alpha-sources-2.4.21-r14.ebuild, +files/alpha-sources.binfmt_elf.patch:
+ Version bump for the binfmt_elf security vulnerability, bug #70681.
*alpha-sources-2.4.21-r13 (06 Nov 2004)
-MD5 f14a1dfd35689011c91fa6f936139947 ChangeLog 6354
-MD5 17504aeaa8c0fca573e78ce8067f3cb8 alpha-sources-2.4.21-r13.ebuild 4442
+MD5 2d18fd45db74d15f3f719eafbdc36dc1 ChangeLog 6613
+MD5 acf4d60bca773511e337619ddf769b5f alpha-sources-2.4.21-r14.ebuild 4530
MD5 2b3ddb8b8b15f8da35ade38544b57857 files/alpha-sources.XDRWrapFix.patch 1499
MD5 5bf9836a632a861728d33f9736bb7431 files/alpha-sources.CAN-2004-0133.patch 427
MD5 d1ccc2047be533c992f67270a150a210 files/alpha-sources.cmdlineLeak.patch 388
MD5 d4a740ae56c2049247083af387a22a85 files/alpha-sources.CAN-2004-0394.patch 350
MD5 147fec50180ad91b6260fc7201dcb90f files/alpha-sources.CAN-2004-0010.patch 6050
MD5 dc18e982f8149588a291956481885a8c files/alpha-sources.CAN-2004-0495.patch 17549
+MD5 0e1133313a767762ef7315d6f6c99b4e files/alpha-sources.binfmt_elf.patch 2184
MD5 a61e57d5483a06f20da339d91f98fbb8 files/alpha-sources.rtc_fix.patch 6769
+MD5 76cc0c8530da5b9d8f6db7182df4d591 files/digest-alpha-sources-2.4.21-r14 304
MD5 174438d215b70cad5ffb00ca8123c062 files/alpha-sources.munmap.patch 837
MD5 60d25ff310fc6abfdce39ec9e47345af files/alpha-sources.CAN-2004-0685.patch 2809
MD5 3bdf00d5f80fe9dfbfe8220e076cd04c files/alpha-sources.CAN-2004-0497.patch 707
MD5 e77a93fdf26f06cf3ea5080b27211725 files/alpha-sources.CAN-2003-0985.patch 414
MD5 de75cfa969ed092578d9ddda6c5be334 files/alpha-sources.CAN-2004-0181.patch 1233
MD5 eaeda68a619caaddd5b8fdc5e7c39932 files/alpha-sources.CAN-2004-0177.patch 384
-MD5 76cc0c8530da5b9d8f6db7182df4d591 files/digest-alpha-sources-2.4.21-r13 304
MD5 21f3a4f186017d925067335e24db36a1 files/alpha-sources.CAN-2004-0109.patch 1877
MD5 ac42024b6e6ee1e2165914db4b22a61c files/alpha-sources.CAN-2004-0178.patch 424
MD5 082e410301c2522521b0d3843db19c9e files/alpha-sources.CAN-2004-0535.patch 502
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/alpha-sources/alpha-sources-2.4.21-r13.ebuild,v 1.1 2004/11/06 21:36:45 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/alpha-sources/alpha-sources-2.4.21-r14.ebuild,v 1.1 2004/11/12 18:31:39 plasmaroo Exp $
# OKV=original kernel version, KV=patched kernel version. They can be the same.
DESCRIPTION="Full sources for the Gentoo Linux Alpha kernel"
SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2
- mirror://gentoo/patches-${KV/13/3}.tar.bz2
+ mirror://gentoo/patches-${KV/14/3}.tar.bz2
http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-${OKV}-CAN-2004-0415.patch
http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/${P}-CAN-2004-0814.patch"
SLOT="${KV}"
src_unpack() {
unpack ${A}
mv linux-${OKV} linux-${KV} || die
- cd ${WORKDIR}/${KV/13/1}
+ cd ${WORKDIR}/${KV/14/1}
# This is the crypt USE flag, keeps {USAGI/superfreeswan/patch-int/loop-jari}
if ! use crypt; then
epatch ${FILESDIR}/${PN}.munmap.patch || die "Failed to apply munmap patch!"
epatch ${FILESDIR}/${PN}.cmdlineLeak.patch || die "Failed to apply the /proc/cmdline patch!"
epatch ${FILESDIR}/${PN}.XDRWrapFix.patch || die "Failed to apply the kNFSd XDR fix!"
+ epatch ${FILESDIR}/${PN}.binfmt_elf.patch || die "Failed to apply the binfmt_elf fix!"
# Fix multi-line literal in include/asm-alpha/xor.h -- see bug 38354
# If this script "dies" then that means it's no longer applicable.
--- /dev/null
+diff -ur linux-2.4.21/fs/binfmt_elf.c linux-2.4.21-plasmaroo/fs/binfmt_elf.c
+--- linux-2.4.21/fs/binfmt_elf.c 2004-08-14 18:15:42.000000000 +0100
++++ linux-2.4.21-plasmaroo/fs/binfmt_elf.c 2004-11-12 18:09:38.000000000 +0000
+@@ -299,9 +299,12 @@
+ goto out;
+
+ retval = kernel_read(interpreter,interp_elf_ex->e_phoff,(char *)elf_phdata,size);
+- error = retval;
+- if (retval < 0)
++ error = -EIO;
++ if (retval != size) {
++ if (retval < 0)
++ error = retval;
+ goto out_close;
++ }
+
+ eppnt = elf_phdata;
+ for (i=0; i<interp_elf_ex->e_phnum; i++, eppnt++) {
+@@ -473,8 +476,11 @@
+ goto out;
+
+ retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *) elf_phdata, size);
+- if (retval < 0)
++ if (retval != size) {
++ if (retval >= 0)
++ retval = -EIO;
+ goto out_free_ph;
++ }
+
+ retval = get_unused_fd();
+ if (retval < 0)
+@@ -509,8 +515,14 @@
+ retval = kernel_read(bprm->file, elf_ppnt->p_offset,
+ elf_interpreter,
+ elf_ppnt->p_filesz);
+- if (retval < 0)
++ if (retval != elf_ppnt->p_filesz) {
++ if (retval >= 0)
++ retval = -EIO;
+ goto out_free_interp;
++ }
++ /* make sure path is NULL terminated */
++ elf_interpreter[elf_ppnt->p_filesz - 1] = '\0';
++
+ /* If the program interpreter is one of these two,
+ * then assume an iBCS2 image. Otherwise assume
+ * a native linux image.
+@@ -529,8 +541,11 @@
+ if (IS_ERR(interpreter))
+ goto out_free_interp;
+ retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE);
+- if (retval < 0)
++ if (retval != BINPRM_BUF_SIZE) {
++ if (retval >= 0)
++ retval = -EIO;
+ goto out_free_dentry;
++ }
+
+ /* Get the exec headers */
+ interp_ex = *((struct exec *) bprm->buf);
+@@ -967,7 +982,10 @@
+ #endif
+
+ if (BAD_ADDR(error))
+- continue;
++ {
++ send_sig(SIGKILL, current, 0);
++ goto out_free_dentry;
++ }
+
+ /* PaX: mirror at a randomized base */
+ down_write(¤t->mm->mmap_sem);
+@@ -1008,7 +1026,10 @@
+ {
+ error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
+ if (BAD_ADDR(error))
+- continue;
++ {
++ send_sig(SIGKILL, current, 0);
++ goto out_free_dentry;
++ }
+ }
+
+ if (!load_addr_set) {
+