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
NVD severitymedium (attack range: remote)
Debian Bugs894993

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
patch (PTS)jessie2.7.5-1+deb8u1fixed
stretch2.7.5-1+deb9u1fixed
buster, sid2.7.6-3fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
patchsource(unstable)2.7.6-2medium894993
patchsourcejessie2.7.5-1+deb8u1medium
patchsourcestretch2.7.5-1+deb9u1medium
patchsourcewheezy2.6.1-3+deb7u1mediumDLA-1348-1

Notes

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