CVE-2021-38185 Integer overflow in n/a
Attackers can execute arbitrary code via a crafted pattern file due to an integer overflow in GNU cpio, affecting Linux distributions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-38185?
CVE-2021-38185 is a high-severity vulnerability in n/a, published on 7 Aug 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-190
Which versions are affected by CVE-2021-38185?
It affects 1 product.
Linux distribution packages (40)
cpio AlmaLinux:8 | All versions | 2.12-11.el8 |
cpio Red Hat:enterprise_linux:8::baseos | All versions | 0:2.12-11.el8 |
cpio-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.12-11.el8 |
cpio-debugsource Red Hat:enterprise_linux:8::baseos | All versions | 0:2.12-11.el8 |
cpio Rocky Linux:8 | All versions | 0:2.12-11.el8 |
cpio SUSE:Enterprise Storage 6 | All versions | 2.12-3.9.1 |
cpio SUSE:HPE Helion OpenStack 8 | All versions | 2.11-36.12.1 |
cpio SUSE:HPE Helion OpenStack 8 | All versions | 2.11-36.15.1 |
cpio SUSE:HPE Helion OpenStack 8 | All versions | 2.11-36.9.1 |
cpio SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise Micro 5.0 | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise Point of Sale 11 SP3 | All versions | 2.9-75.81.14.1 |
cpio SUSE:Linux Enterprise Point of Sale 11 SP3 | All versions | 2.9-75.81.8.1 |
cpio SUSE:Linux Enterprise Server 11 SP4-LTSS | All versions | 2.9-75.81.14.1 |
cpio SUSE:Linux Enterprise Server 11 SP4-LTSS | All versions | 2.9-75.81.8.1 |
cpio SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 2.11-36.12.1 |
cpio SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 2.11-36.15.1 |
cpio SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 2.11-36.9.1 |
cpio SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 2.11-36.12.1 |
cpio SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 2.11-36.15.1 |
cpio SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 2.11-36.9.1 |
cpio SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 2.11-36.12.1 |
cpio SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 2.11-36.15.1 |
cpio SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 2.11-36.9.1 |
cpio SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 2.11-36.12.1 |
cpio SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 2.11-36.15.1 |
cpio SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 2.11-36.9.1 |
cpio SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.11-36.12.1 |
cpio SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.11-36.15.1 |
cpio SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.11-36.9.1 |
cpio SUSE:Linux Enterprise Server 15 SP1-BCL | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise Server 15-LTSS | All versions | 2.12-3.9.1 |
cpio SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | All versions | 2.11-36.12.1 |
cpio SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | All versions | 2.11-36.15.1 |
Products include Gnu Cpio.
How do I fix CVE-2021-38185?
Apply the vendor's patch.
Is CVE-2021-38185 being exploited?
There is no known exploitation of CVE-2021-38185 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in n/a
Sources
Also known as ALSA-2022:1991, AZL-6357, CLEANSTART-2024-HF57565, DEBIAN-CVE-2021-38185, GHSA-pp74-ghrg-jwfh, MGASA-2021-0423 and 14 more.