CVE-2018-1000156

NameCVE-2018-1000156
DescriptionGNU Patch version 2.7.6 contains an input validation vulnerability when processing patch files, specifically the EDITOR_PROGRAM invocation (using ed) can result in code execution. This attack appear to be exploitable via a patch file processed via the patch utility. This is similar to FreeBSD's CVE-2015-1418 however although they share a common ancestry the code bases have diverged over time.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDLA-1348-1
Debian Bugs894993

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
patch (PTS)wheezy2.6.1-3vulnerable
wheezy (security)2.6.1-3+deb7u1fixed
jessie, stretch2.7.5-1vulnerable
buster, sid2.7.6-2fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
patchsource(unstable)2.7.6-2894993
patchsourcewheezy2.6.1-3+deb7u1DLA-1348-1

Notes

[stretch] - patch <no-dsa> (Can be fixed via point release)
[jessie] - patch <no-dsa> (Can be fixed via point release)
Upstream bug: https://savannah.gnu.org/bugs/?53566
https://rachelbythebay.com/w/2018/04/05/bangpatch/
https://twitter.com/kurtseifried/status/982028968877436928
This CVE is specifically for GNU patch and relates to CVE-2015-1418
http://git.savannah.gnu.org/cgit/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d
Respective patch in FreeBSD: https://www.freebsd.org/security/advisories/FreeBSD-SA-15:18.bsdpatch.asc
Respective patch in OpenBSD: https://ftp.openbsd.org/pub/OpenBSD/patches/5.7/common/013_patch.patch.sig
wheezy patch adds a testcase

Search for package or bug name: Reporting problems