tar-1.17 (GPLv2) bugfix

This fixes bug [YOCTO #982]

(From OE-Core rev: 9346961f863b2e0d6489615fa976b002553123de)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Nitin A Kamble 2011-04-25 17:07:37 -07:00 committed by Richard Purdie
parent 335ff67e00
commit 1b283ce3c1
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,22 @@
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.
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)

View File

@ -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"