CVE-2021-38185

NameCVE-2021-38185
DescriptionGNU 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub advisories/code/issues, web search, more)
Debian Bugs992045

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
cpio (PTS)buster2.12+dfsg-9vulnerable
bullseye2.13+dfsg-4vulnerable
bookworm, sid2.13+dfsg-7.1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
cpiosource(unstable)2.13+dfsg-5992045

Notes

[bullseye] - cpio <no-dsa> (Minor issue)
[buster] - cpio <no-dsa> (Minor issue)
[stretch] - cpio <no-dsa> (Minor issue)
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
https://github.com/fangqyi/cpiopwn
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
Regression: https://bugs.debian.org/992098
Regression fixed by: https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dfc801c44a93bed7b3951905b188823d6a0432c8
Regression #2: https://bugs.debian.org/992192
Regression #2 fixed by: https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=236684f6deb3178043fe72a8e2faca538fa2aae1

Search for package or bug name: Reporting problems