First published: Sat Aug 07 2021(Updated: )
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.
Credit: cve@mitre.org cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
GNU cpio | <=2.13 | |
ubuntu/cpio | <2.13+dfsg-5 | 2.13+dfsg-5 |
ubuntu/cpio | <2.13+dfsg-4ubuntu4 | 2.13+dfsg-4ubuntu4 |
ubuntu/cpio | <2.12+dfsg-6ubuntu0.18.04.4 | 2.12+dfsg-6ubuntu0.18.04.4 |
ubuntu/cpio | <2.13+dfsg-2ubuntu0.3 | 2.13+dfsg-2ubuntu0.3 |
ubuntu/cpio | <2.13+dfsg-4ubuntu0.3 | 2.13+dfsg-4ubuntu0.3 |
ubuntu/cpio | <2.11+dfsg-5ubuntu1.1+ | 2.11+dfsg-5ubuntu1.1+ |
ubuntu/cpio | <2.11+dfsg-1ubuntu1.2+ | 2.11+dfsg-1ubuntu1.2+ |
ubuntu/cpio | <2.13+dfsg-4ubuntu4 | 2.13+dfsg-4ubuntu4 |
ubuntu/cpio | <2.13+dfsg-4ubuntu4 | 2.13+dfsg-4ubuntu4 |
ubuntu/cpio | <2.13+dfsg-4ubuntu4 | 2.13+dfsg-4ubuntu4 |
debian/cpio | <=2.12+dfsg-9 | 2.12+dfsg-9+deb10u1 2.13+dfsg-7.1~deb11u1 2.13+dfsg-7.1 2.15+dfsg-1 |
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dfc801c44a93bed7b3951905b188823d6a0432c8
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=236684f6deb3178043fe72a8e2faca538fa2aae1
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2021-38185 is a vulnerability in GNU cpio through 2.13 that allows attackers to execute arbitrary code via a crafted pattern file.
CVE-2021-38185 has a severity score of 7.8 (high).
GNU cpio versions 2.13+dfsg-5 and earlier are affected by CVE-2021-38185.
To fix CVE-2021-38185, update GNU cpio to version 2.13+dfsg-5 or later.
You can find more information about CVE-2021-38185 at the following references: - [Reference 1](https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b) - [Reference 2](https://github.com/fangqyi/cpiopwn) - [Reference 3](https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html)