Bug 280961 (CVE-2007-4476)

Summary: CVE-2007-4476 tar/cpio stack crashing in safer_name_suffix
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: kreilly, mcermak, mjc, ovasik
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://nvd.nist.gov/nvd.cfm?cvename=CVE-2007-4476
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-16 07:37:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 339681, 339691, 363881, 363891, 568023, 568024, 568025, 568026, 568068, 568069, 826654    
Bug Blocks:    
Attachments:
Description Flags
patch for cpio-2.6
none
new patch for cpio-2.6 (this one frees malloc'd memory) none

Description Tomas Hoger 2007-09-06 17:01:45 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2007-4476
to the following vulnerability:

Bug in the safer_name_suffix function in GNU tar may lead to a "crashing
stack".  It can be used to crash tar while extracting archive containing file
with long name containing unsafe prefix.

Affected function is also part of cpio source code.

References:

http://www.novell.com/linux/security/advisories/2007_18_sr.html
http://lists.gnu.org/archive/html/bug-cpio/2007-08/msg00002.html

Comment 1 Tomas Hoger 2007-09-06 17:05:50 UTC
Upstream patch for paxutils / paxlib (used by recent versions of tar and cpio):

http://cvs.savannah.gnu.org/viewvc/paxutils/paxutils/paxlib/names.c?r1=1.2&r2=1.4


Comment 7 Radek Brich 2007-10-24 15:35:04 UTC
Created attachment 236281 [details]
patch for cpio-2.6

this patch should work for all affected software as the rest of patch from
comment #1 are just optimizations for memory usage (one malloc less)

Comment 8 Radek Brich 2007-10-24 15:40:00 UTC
Fedora builds of fixed tar are now complete (with the patch from upstream):
  tar-1.15.1-27.fc6
  tar-1.15.1-28.fc7
  tar-1.17-4.fc8
  tar-1.17-4.fc9


Comment 11 Fedora Update System 2007-10-29 19:02:36 UTC
tar-1.15.1-28.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Radek Brich 2007-11-01 18:43:20 UTC
Created attachment 245931 [details]
new patch for cpio-2.6 (this one frees malloc'd memory)

Comment 16 Radek Brich 2007-11-02 13:44:11 UTC
fixed Fedora builds of cpio:
  cpio-2.6-22.fc6
  cpio-2.6-28.fc7
  cpio-2.9-5.fc8
  cpio-2.9-5.fc9


Comment 18 Fedora Update System 2007-11-05 15:06:18 UTC
cpio-2.6-28.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2007-11-06 16:05:52 UTC
tar-1.17-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2007-11-06 16:08:27 UTC
cpio-2.9-5.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 errata-xmlrpc 2010-03-15 23:55:40 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4
  Red Hat Enterprise Linux 5

Via RHSA-2010:0141 https://rhn.redhat.com/errata/RHSA-2010-0141.html

Comment 26 errata-xmlrpc 2010-03-16 01:15:30 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0144 https://rhn.redhat.com/errata/RHSA-2010-0144.html