]> code.ossystems Code Review - openembedded-core.git/commitdiff
cpio-2.8 (GPLv2) bug fix
authorNitin A Kamble <nitin.a.kamble@intel.com>
Tue, 26 Apr 2011 00:08:31 +0000 (17:08 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Apr 2011 08:52:24 +0000 (09:52 +0100)
This fixes bug [YOCTO #982]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch [new file with mode: 0644]
meta/recipes-extended/cpio/cpio_2.8.bb

diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
new file mode 100644 (file)
index 0000000..cf068fa
--- /dev/null
@@ -0,0 +1,25 @@
+Upstream-Status="Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]"
+
+This patch avoids heap overflow reported by :
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
+
+This is a clean patch for the GPLv2 tar recipe.
+
+the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio 
+recipe, as they share code.
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
+
+Index: tar-1.17/lib/rtapelib.c
+===================================================================
+--- tar-1.17.orig/lib/rtapelib.c
++++ tar-1.17/lib/rtapelib.c
+@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
+   sprintf (command_buffer, "R%lu\n", (unsigned long) length);
+   if (do_command (handle, command_buffer) == -1
+-      || (status = get_status (handle)) == SAFE_READ_ERROR)
++      || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
+     return SAFE_READ_ERROR;
+   for (counter = 0; counter < status; counter += rlen, buffer += rlen)
index 412d19f4653d1b1bc03b4b4705fe1fb95afecd95..006e4f6dfb4e2f30981a864c6d64ee04ac6b4170 100644 (file)
@@ -3,9 +3,11 @@ require cpio_v2.inc
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
 
-PR = "r0"
+PR = "r1"
 
-SRC_URI += "file://m4extensions.patch"
+SRC_URI += "file://m4extensions.patch \
+    file://avoid_heap_overflow.patch \
+    "
 
 SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
 SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"