CVE-2021-38185
cpio: integer overflow in ds_fgetstr() in dstring.c can lead to an out-of-bounds write via a crafted pattern file
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
3Exploited in Wild
-Decision
Descriptions
GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c ds_fgetstr integer overflow that triggers an out-of-bounds heap write. NOTE: it is unclear whether there are common cases where the pattern file, associated with the -E option, is untrusted data.
GNU cpio versiones hasta 2.13, permite a atacantes ejecutar código arbitrario por medio de un archivo de patrones diseñado, debido a un desbordamiento de enteros en el archivo dstring.c en la función ds_fgetstr que desencadena una escritura de pila fuera de límites. NOTA: no está claro si hay casos comunes en los que el archivo de patrones, asociado con la opción -E, son datos no confiables
A flaw was found in cpio. An integer overflow that triggers an out-of-bounds heap write can allow an attacker to execute arbitrary code via a crafted pattern file. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2021-08-07 CVE Reserved
- 2021-08-07 CVE Published
- 2024-04-22 EPSS Updated
- 2024-08-04 CVE Updated
- 2024-08-04 First Exploit
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-190: Integer Overflow or Wraparound
- CWE-787: Out-of-bounds Write
CAPEC
References (7)
URL | Tag | Source |
---|---|---|
https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html | Mailing List |
URL | Date | SRC |
---|---|---|
https://github.com/fangqyi/cpiopwn | 2024-08-04 | |
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html | 2024-08-04 | |
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html | 2024-08-04 |
URL | Date | SRC |
---|---|---|
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b | 2023-06-04 |
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2021-38185 | 2022-05-10 | |
https://bugzilla.redhat.com/show_bug.cgi?id=1991731 | 2022-05-10 |