From patchwork Tue Apr 26 00:19:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2] tar-1.17 (GPLv2) bugfix Date: Tue, 26 Apr 2011 00:19:46 -0000 From: Nitin A Kamble X-Patchwork-Id: 2867 Message-Id: <7e9ac75e9a9b792eccedf3c0cd8c3b01064bc94f.1303776892.git.nitin.a.kamble@intel.com> To: scott.a.garman@intel.com, poky@yoctoproject.org, openembedded-core@lists.openembedded.org From: Nitin A Kamble Signed-off-by: Nitin A Kamble --- .../tar/tar-1.17/avoid_heap_overflow.patch | 22 ++++++++++++++++++++ meta/recipes-extended/tar/tar_1.17.bb | 3 +- 2 files changed, 24 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch new file mode 100644 index 0000000..abfd0ae --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch @@ -0,0 +1,22 @@ +Upstream-Status="Inappropriate [bugfix: https://wiki.yoctoproject.org/collab/Tar_GPLv3-v2_transfer_info 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. + +Nitin A Kamble 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) diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb index be74542..138ea71 100644 --- a/meta/recipes-extended/tar/tar_1.17.bb +++ b/meta/recipes-extended/tar/tar_1.17.bb @@ -3,10 +3,11 @@ require tar.inc LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -PR = "r0" +PR = "r1" SRC_URI += "file://m4extensions.patch \ file://gcc43build.patch \ + file://avoid_heap_overflow.patch \ " SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"