cpio 2.11, when using the --no-absolute-filenames option, allows local users to write to arbitrary files via a symlink attack on a file in an archive.
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.
A flaw was found in GNU cpio through version 2.15. An out-of-bounds read vulnerability exists in src/copyin.c:fromascii() when parsing newc and crc format archive headers.
The loop in fromascii() that skips leading whitespace dereferences the buffer pointer (buf) prior to validating whether the pointer has reached the end boundary (buf == end). When parsing the final field (cchksum, offset 102..109) of struct newasciiheader, an all-spaces value causes the loop to read one byte past asciiheader[110] on the stack of readinnewascii(). If subsequent stack memory contains spaces, the pointer continues advancing into adjacent stack data and decodes those bytes into parsed header values (such as cchksum or cnamesize).
Common Vulnerabilities and Exposures assigned an identifier CVE-2007-4476 to the following vulnerability:
Bug in the safernamesuffix 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/200718sr.html http://lists.gnu.org/archive/html/bug-cpio/2007-08/msg00002.html