CVE-2021-38185

Related Vulnerabilities: CVE-2021-38185  

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.

Description

The MITRE CVE dictionary describes this issue as:

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.

Additional Information

  • Bugzilla 1991731: 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
  • CWE-190->CWE-787: Integer Overflow or Wraparound leads to Out-of-bounds Write
  • FAQ: Frequently asked questions about CVE-2021-38185