diff --git a/tar-1.22-segfault-incompletearchive.patch b/tar-1.22-segfault-incompletearchive.patch new file mode 100644 index 0000000..e83de0f --- /dev/null +++ b/tar-1.22-segfault-incompletearchive.patch @@ -0,0 +1,13 @@ +diff -urNp tar-1.22-orig/src/xheader.c tar-1.22/src/xheader.c +--- tar-1.22-orig/src/xheader.c 2010-05-03 10:44:56.000000000 +0200 ++++ tar-1.22/src/xheader.c 2010-05-03 10:46:41.000000000 +0200 +@@ -734,6 +734,9 @@ xheader_read (struct xheader *xhdr, unio + if (len > BLOCKSIZE) + len = BLOCKSIZE; + ++ if (!p) ++ FATAL_ERROR ((0, 0, _("Unexpected EOF in archive"))); ++ + memcpy (&xhdr->buffer[j], p->buffer, len); + set_next_block_after (p); + diff --git a/tar.spec b/tar.spec index 9727a45..540dd1e 100644 --- a/tar.spec +++ b/tar.spec @@ -2,7 +2,7 @@ Summary: A GNU file archiving program Name: tar Epoch: 2 Version: 1.22 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ Group: Applications/Archiving URL: http://www.gnu.org/software/tar/ @@ -39,6 +39,8 @@ Patch10: tar-1.22-utimens.patch Patch11: tar-1.22-rtapelib-overflow.patch #realloc within check_exclusion_tags() causes invalid write(#570591) Patch12: tar-1.22-exclusion-tags.patch +#listing incomplete archive could cause segfault(#587831) +Patch13: tar-1.22-segfault-incompletearchive.patch Prereq: info BuildRequires: autoconf automake gzip texinfo gettext libacl-devel libselinux-devel gawk rsh @@ -72,6 +74,7 @@ the rmt package. %patch10 -p1 -b .utimens %patch11 -p1 -b .overflow %patch12 -p1 -b .exclude +%patch13 -p1 -b .incomplete %build autoreconf @@ -129,6 +132,9 @@ fi %{_infodir}/tar.info* %changelog +* Mon May 03 2010 Ondrej Vasik 2:1.22-6 +- listing incomplete archive could cause segfault(#587831) + * Wed Mar 10 2010 Ondrej Vasik 2:1.22-5 - CVE-2010-0624 tar, cpio: Heap-based buffer overflow by expanding a specially-crafted archive (#572149)