4.6medium
Uncontrolled Memory Allocation in GNU cpio
- Severity
- 4.6medium CVSS:4.0 by CERT-PL
- Exploit likelihood
- 0.13% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- CERT-PL
Description
GNU cpio is vulnerable to an uncontrolled memory allocation in the make_path function at src/makepath.c. The function uses alloca to allocate stack memory based on the length of argpath, which is derived from an archive-controlled pathname during extraction. A malicious cpio archive containing a sufficiently long nested pathname causes an unbounded stack allocation, resulting in a stack overflow and crash of the cpio process. An attacker who can supply a crafted cpio archive to a victim who extracts it can cause a denial of service. This issue has been fixed in commit 3cd514031371d8aeeaf2048aa10103e02831aaa9
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| GNU cpio | up to 2.15 | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
GNU cpio is vulnerable to an uncontrolled memory allocation in the make_path function at src/makepath.c. The function uses alloca to allocate stack memory based on the length of argpath, which is derived from an archive-controlled pathname during extraction. A malicious cpio archive containing a sufficiently long nested pathname causes an unbounded stack allocation, resulting in a stack overflow and crash of the cpio process. An attacker who can supply a crafted cpio archive to a victim who extracts it can cause a denial of service. This issue has been fixed in commit 3cd514031371d8aeeaf2048aa10103e02831aaa9
NVD (es)
GNU cpio es vulnerable a una asignación de memoria incontrolada en la función make_path en src/makepath.c. La función usa alloca para asignar memoria de pila basada en la longitud de argpath, que se deriva de un nombre de ruta controlado por el archivo durante la extracción. Un archivo cpio malicioso que contiene un nombre de ruta anidado suficientemente largo causa una asignación de pila ilimitada, lo que resulta en un desbordamiento de pila y el bloqueo del proceso cpio. Un atacante que puede suministrar un archivo cpio manipulado a una víctima que lo extrae puede causar una denegación de servicio. Este problema ha sido solucionado en el commit 3cd514031371d8aeeaf2048aa10103e02831aaa9
References
| https://cert.pl/en/posts/2026/08/CVE-2026-66484 | third-party-advisory | |
| https://git.savannah.gnu.org/cgit/cpio.git | product | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-66485 changed 2026-08-10 | CVE Terms of Use |
| NVD | CVE-2026-66485 changed 2026-10-24 | Public domain |