Version bump for the binfmt_elf security vulnerability, bug #70681.
authorTim Yamin <plasmaroo@gentoo.org>
Fri, 12 Nov 2004 20:38:36 +0000 (20:38 +0000)
committerTim Yamin <plasmaroo@gentoo.org>
Fri, 12 Nov 2004 20:38:36 +0000 (20:38 +0000)
sys-kernel/xbox-sources/ChangeLog
sys-kernel/xbox-sources/Manifest
sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.27-r4 [moved from sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.27-r3 with 100% similarity]
sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.8.1-r3 [moved from sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.8.1-r2 with 100% similarity]
sys-kernel/xbox-sources/files/xbox-sources-2.4.27.binfmt_elf.patch [new file with mode: 0644]
sys-kernel/xbox-sources/files/xbox-sources-2.6.8.1.binfmt_elf.patch [new file with mode: 0644]
sys-kernel/xbox-sources/xbox-sources-2.4.27-r4.ebuild [moved from sys-kernel/xbox-sources/xbox-sources-2.4.27-r3.ebuild with 87% similarity]
sys-kernel/xbox-sources/xbox-sources-2.6.8.1-r3.ebuild [moved from sys-kernel/xbox-sources/xbox-sources-2.6.8.1-r2.ebuild with 86% similarity]

index 54f0326a217f96fdc7e3bbc91fe813a6aa2c7370..484d8ceccb5ad18b358eb77da5c95b341ea9b1ed 100644 (file)
@@ -1,6 +1,15 @@
 # ChangeLog for sys-kernel/xbox-sources
 # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/ChangeLog,v 1.16 2004/11/09 09:26:00 chrb Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/ChangeLog,v 1.17 2004/11/12 20:38:36 plasmaroo Exp $
+
+*xbox-sources-2.4.27-r4 (12 Nov 2004)
+
+  12 Nov 2004; <plasmaroo@gentoo.org> -xbox-sources-2.4.27-r3.ebuild,
+  +xbox-sources-2.4.27-r4.ebuild, -xbox-sources-2.6.8.1-r2.ebuild,
+  +xbox-sources-2.6.8.1-r3.ebuild,
+  +files/xbox-sources-2.4.27.binfmt_elf.patch,
+  +files/xbox-sources-2.6.8.1.binfmt_elf.patch:
+  Version bump for the binfmt_elf security vulnerability, bug #70681.
 
   09 Nov 2004; Chris Bainbridge <chrb@gentoo.org>
   xbox-sources-2.6.8.1-r2.ebuild:
index cbb2c0ac43d14e339b0c86b64e7ad4038d06cdec..2e07feeac2a4556c9d178c3da73f4d9432d54696 100644 (file)
@@ -1,11 +1,13 @@
+MD5 2f20c9cec504081b0b428f8b303ff918 ChangeLog 4838
+MD5 a8677416a55c663479cee926788b39ca xbox-sources-2.6.8.1-r3.ebuild 995
 MD5 c2a56d354398d9255422286f7af425ee metadata.xml 351
-MD5 8b1916ced2542d92a238aade47ad85a7 ChangeLog 4456
-MD5 2df04b391202b0c95dcd8c87c1f021b8 xbox-sources-2.6.8.1-r2.ebuild 955
-MD5 950486478c515eb082a89dd17da0c315 xbox-sources-2.4.27-r3.ebuild 950
-MD5 eebe0bc2ed2d04b8e8aa901ae9dad418 files/digest-xbox-sources-2.6.8.1-r2 227
-MD5 d4a740ae56c2049247083af387a22a85 files/xbox-sources-2.4.26.CAN-2004-0394.patch 350
+MD5 c587a3a00425c8fa590841fdfc13a846 xbox-sources-2.4.27-r4.ebuild 985
 MD5 d1ccc2047be533c992f67270a150a210 files/xbox-sources-2.4.27.cmdlineLeak.patch 388
-MD5 c2510fe1891f5a9effb12c2196922206 files/xbox-sources-2.6.7.cmdlineLeak.patch 281
-MD5 6d088117dab6d996f52ff52daaa4be52 files/digest-xbox-sources-2.4.27-r3 302
+MD5 6d088117dab6d996f52ff52daaa4be52 files/digest-xbox-sources-2.4.27-r4 302
+MD5 1ee8ba8362089c31fdd7d88b32eaf63e files/xbox-sources-2.6.8.1.binfmt_elf.patch 1938
 MD5 452e04a312368605e145428c35bd0e05 files/xbox-sources-2.6.8.1.devPtmx.patch 572
+MD5 eebe0bc2ed2d04b8e8aa901ae9dad418 files/digest-xbox-sources-2.6.8.1-r3 227
+MD5 24c53f49954dab29cfc172d4a3ba1a31 files/xbox-sources-2.4.27.binfmt_elf.patch 1928
+MD5 c2510fe1891f5a9effb12c2196922206 files/xbox-sources-2.6.7.cmdlineLeak.patch 281
+MD5 d4a740ae56c2049247083af387a22a85 files/xbox-sources-2.4.26.CAN-2004-0394.patch 350
 MD5 2b3ddb8b8b15f8da35ade38544b57857 files/xbox-sources-2.4.27.XDRWrapFix.patch 1499
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.4.27.binfmt_elf.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.4.27.binfmt_elf.patch
new file mode 100644 (file)
index 0000000..534e4c0
--- /dev/null
@@ -0,0 +1,72 @@
+--- linux-2.4.27/fs/binfmt_elf.c       2004-11-10 12:25:16 -08:00
++++ linux-2.4.27-plasmaroo/fs/binfmt_elf.c     2004-11-10 12:25:16 -08:00
+@@ -335,9 +335,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++) {
+@@ -532,8 +535,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;
++      }
+               
+       files = current->files;         /* Refcounted so ok */
+       retval = unshare_files();
+@@ -580,8 +586,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.
+@@ -616,8 +628,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 */
+                       loc->interp_ex = *((struct exec *) bprm->buf);
+@@ -776,8 +791,10 @@
+               }
+ 
+               error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
+-              if (BAD_ADDR(error))
+-                      continue;
++              if (BAD_ADDR(error)) {
++                      send_sig(SIGKILL, current, 0);
++                      goto out_free_dentry;
++              }
+ 
+               if (!load_addr_set) {
+                       load_addr_set = 1;
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.6.8.1.binfmt_elf.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.6.8.1.binfmt_elf.patch
new file mode 100644 (file)
index 0000000..9ca2367
--- /dev/null
@@ -0,0 +1,72 @@
+--- linux-2.6.7-uc0-r8/fs/binfmt_elf.c 2004-11-12 11:50:08 -08:00
++++ linux-2.6.7-uc0-r8-plasmaroo/fs/binfmt_elf.c       2004-11-12 11:50:08 -08:00
+@@ -335,9 +335,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++) {
+@@ -532,8 +535,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;
++      }
+ 
+       files = current->files;         /* Refcounted so ok */
+       retval = unshare_files();
+@@ -580,8 +586,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.
+@@ -616,8 +628,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 */
+                       loc->interp_ex = *((struct exec *) bprm->buf);
+@@ -776,8 +791,10 @@
+               }
+ 
+               error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
+-              if (BAD_ADDR(error))
+-                      continue;
++              if (BAD_ADDR(error)) {
++                      send_sig(SIGKILL, current, 0);
++                      goto out_free_dentry;
++              }
+ 
+               if (!load_addr_set) {
+                       load_addr_set = 1;
similarity index 87%
rename from sys-kernel/xbox-sources/xbox-sources-2.4.27-r3.ebuild
rename to sys-kernel/xbox-sources/xbox-sources-2.4.27-r4.ebuild
index d867713334ed15b92481842414b39a9a745104f3..67d2b9dd6438a1700878124723f01d981dc812cb 100644 (file)
@@ -1,12 +1,12 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.4.27-r3.ebuild,v 1.1 2004/11/06 23:12:37 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.4.27-r4.ebuild,v 1.1 2004/11/12 20:38:36 plasmaroo Exp $
 
 ETYPE="sources"
 inherit kernel-2
 detect_version
 
-XBOX_PATCH="xbox-sources-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}-${PR/r3/r0}.patch.bz2"
+XBOX_PATCH="xbox-sources-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}-${PR/r4/r0}.patch.bz2"
 
 SRC_URI="${KERNEL_URI}
        mirror://gentoo/${XBOX_PATCH}
@@ -23,4 +23,5 @@ UNIPATCH_LIST="
        ${FILESDIR}/${PN}-2.4.26.CAN-2004-0394.patch
        ${FILESDIR}/${P}.cmdlineLeak.patch
        ${FILESDIR}/${P}.XDRWrapFix.patch
+       ${FILESDIR}/${P}.binfmt_elf.patch
        ${DISTDIR}/linux-${OKV}-CAN-2004-0814.patch"
similarity index 86%
rename from sys-kernel/xbox-sources/xbox-sources-2.6.8.1-r2.ebuild
rename to sys-kernel/xbox-sources/xbox-sources-2.6.8.1-r3.ebuild
index 38dc3aae0fbf123b9ec0f0f7b2f5c7fe09261a53..9c60a1a159bc4060d0c6115973a0e887a9f4d6cf 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.6.8.1-r2.ebuild,v 1.2 2004/11/09 09:26:00 chrb Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.6.8.1-r3.ebuild,v 1.1 2004/11/12 20:38:36 plasmaroo Exp $
 
 ETYPE='sources'
 inherit kernel-2
@@ -15,7 +15,8 @@ UNIPATCH_LIST="
        ${DISTDIR}/${XBOX_PATCHES}
        ${DISTDIR}/linux-${OKV}-CAN-2004-0814.patch
        ${FILESDIR}/${PN}-2.6.7.cmdlineLeak.patch
-       ${FILESDIR}/${P}.devPtmx.patch"
+       ${FILESDIR}/${P}.devPtmx.patch
+       ${FILESDIR}/${P}.binfmt_elf.patch"
 DESCRIPTION='Full sources for the Xbox Linux kernel'
 SRC_URI="${KERNEL_URI}
        mirror://gentoo/${XBOX_PATCHES}