summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cpio
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-04-26 00:08:31 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-28 09:44:25 (GMT)
commite8a11302a9816b2d3604460c3307aa8e03f8a30d (patch)
tree04176f9b87662caf70e48e7d83bcaac82d660efc /meta/recipes-extended/cpio
parent1b283ce3c13ca9586cbb1374417bd15cb2f599a1 (diff)
downloadpoky-e8a11302a9816b2d3604460c3307aa8e03f8a30d.tar.gz
cpio-2.8 (GPLv2) bug fix
This fixes bug [YOCTO #982] (From OE-Core rev: 9e917c6f48f3d6b1734e716b92506a1149c19b7e) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/cpio')
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch25
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb6
2 files changed, 29 insertions, 2 deletions
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
index 0000000..cf068fa
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
@@ -0,0 +1,25 @@
1Upstream-Status="Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]"
2
3This patch avoids heap overflow reported by :
4http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
5
6This is a clean patch for the GPLv2 tar recipe.
7
8the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio
9recipe, as they share code.
10
11Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
12
13Index: tar-1.17/lib/rtapelib.c
14===================================================================
15--- tar-1.17.orig/lib/rtapelib.c
16+++ tar-1.17/lib/rtapelib.c
17@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
18
19 sprintf (command_buffer, "R%lu\n", (unsigned long) length);
20 if (do_command (handle, command_buffer) == -1
21- || (status = get_status (handle)) == SAFE_READ_ERROR)
22+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
23 return SAFE_READ_ERROR;
24
25 for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
index 412d19f..006e4f6 100644
--- a/meta/recipes-extended/cpio/cpio_2.8.bb
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -3,9 +3,11 @@ require cpio_v2.inc
3LICENSE = "GPLv2" 3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" 4LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
5 5
6PR = "r0" 6PR = "r1"
7 7
8SRC_URI += "file://m4extensions.patch" 8SRC_URI += "file://m4extensions.patch \
9 file://avoid_heap_overflow.patch \
10 "
9 11
10SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1" 12SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
11SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad" 13SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"