ALAS2-2019-1317


Amazon Linux 2 Security Advisory: ALAS-2019-1317
Advisory Release Date: 2019-10-21 18:01 Pacific
Advisory Updated Date: 2019-11-07 00:25 Pacific
Severity: Important

Issue Overview:

do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a ! character. NOTE: this is the same commit as for CVE-2019-13638, but the ! syntax is specific to ed, and is unrelated to a shell metacharacter.(CVE-2018-20969)

GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.(CVE-2019-13638)

A heap-based out-of-bounds read flaw was found in the way the patch utility parsed patch files. An attacker could potentially use this flaw to crash the patch utility by tricking it into processing crafted patch files.(CVE-2016-10713)

A double-free flaw was found in the way the patch utility processed patch files. An attacker could potentially use this flaw to crash the patch utility by tricking it into processing crafted patches.(CVE-2018-6952)


Affected Packages:

patch


Note:

This advisory is applicable to Amazon Linux 2 (AL2) Core repository. Visit this FAQ section for the difference between AL2 Core and AL2 Extras advisories.


Issue Correction:
Run yum update patch to update your system.

New Packages:
aarch64:
    patch-2.7.1-12.amzn2.aarch64
    patch-debuginfo-2.7.1-12.amzn2.aarch64

i686:
    patch-2.7.1-12.amzn2.i686
    patch-debuginfo-2.7.1-12.amzn2.i686

src:
    patch-2.7.1-12.amzn2.src

x86_64:
    patch-2.7.1-12.amzn2.x86_64
    patch-debuginfo-2.7.1-12.amzn2.x86_64