CVE-2005-4268: Buffer Overflow
Buffer overflow in cpio 2.6-8.FC4 on 64-bit platforms, when creating a cpio archive, allows local users to cause a denial of service (crash) and possibly execute arbitrary code via a file whose size is represented by more than 8 digits.
Other sources
Clone for rhel3/rhel2.1
+++ This bug was initially created as a clone of Bug #172669 +++
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux x8664; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7
Description of problem: The latest update to cpio is being killed after a buffer overflow is detected.
Version-Release number of selected component (if applicable): cpio-2.6-8.FC4
How reproducible: Always
Steps to Reproduce: cpio is given a large hierarchy of files and started using "cpio -o --format=crc"
-- Additional comment from arjanv on 2005-11-10 09:03 EST -- char asciiheader[112]; ... sprintf (asciiheader, "%6s%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx", magicstring, filehdr->cino, filehdr->cmode, filehdr->cuid, filehdr->cgid, filehdr->cnlink, filehdr->cmtime, filehdr->cfilesize, filehdr->cdevmaj, filehdr->cdevmin, filehdr->crdevmaj, filehdr->crdevmin, filehdr->cnamesize, filehdr->cchksum);
...
cpio assumes the filesize is at most 8 digits in size... and that's not right. If it's more, this buffer will indeed overflow....
this probably wants to use asprintf() or so
-- Additional comment from bressers on 2005-11-10 13:07 EST --
Please note that this is only a security issue on 64 bit platforms.
This issue should also affect RHEL2.1 and RHEL3
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/cpioto a version that resolves this vulnerability.Fixed in 2.6-10
Event History
Frequently Asked Questions
What is the severity of CVE-2005-4268?
CVE-2005-4268 is classified as a moderate severity vulnerability due to its potential to cause a denial-of-service condition and possible arbitrary code execution.
How do I fix CVE-2005-4268?
To fix CVE-2005-4268, upgrade to a newer version of cpio that addresses the buffer overflow issue.
Who is affected by CVE-2005-4268?
CVE-2005-4268 affects local users on 64-bit platforms running cpio version 2.6-8 on Fedora Core 4.
What type of vulnerability is CVE-2005-4268?
CVE-2005-4268 is a buffer overflow vulnerability that can be exploited during the creation of cpio archives.
Can CVE-2005-4268 lead to remote code execution?
While CVE-2005-4268 primarily leads to denial-of-service, it also has the potential for arbitrary code execution under specific conditions.