FreeBSD bsdiff Heap Overflow in Processing Patch Files Lets Remote Users Execute Arbitrary Code
SecurityTracker Alert ID: 1036438|
SecurityTracker URL: http://securitytracker.com/id/1036438
(Links to External Site)
Date: Jul 25 2016
Execution of arbitrary code via network, User access via network|
Fix Available: Yes Vendor Confirmed: Yes |
Version(s): 9.3, 10.1, 10.2, 10.3|
A vulnerability was reported in FreeBSD bsdiff. A remote user can cause arbitrary code to be executed on the target user's system.|
A remote user can create a specially crafted patch file that, when loaded by the target user via bspatch, will trigger a heap overflow and execute arbitrary code on the target system. The code will run with the privileges of the target user.
The Chromium Project and Lu Tung-Pin separately reported this vulnerability.
A remote user can create a patch file that, when loaded by the target user, will execute arbitrary code on the target user's system.|
FreeBSD has issued a fix.|
The FreeBSD advisory is available at:
Vendor URL: security.FreeBSD.org/advisories/FreeBSD-SA-16:25.bspatch.asc (Links to External Site)
Source Message Contents
Subject: FreeBSD Security Advisory FreeBSD-SA-16:25.bspatch|
-----BEGIN PGP SIGNED MESSAGE-----
FreeBSD-SA-16:25.bspatch Security Advisory
The FreeBSD Project
Topic: Heap vulnerability in bspatch
Affects: All supported versions of FreeBSD.
Corrected: 2016-07-25 14:52:12 UTC (stable/11, 11.0-BETA2-p1)
2016-07-25 14:52:12 UTC (stable/11, 11.0-BETA1-p1)
2016-07-25 14:53:04 UTC (stable/10, 10.3-STABLE)
2016-07-25 15:04:17 UTC (releng/10.3, 10.3-RELEASE-p6)
2016-07-25 15:04:17 UTC (releng/10.2, 10.2-RELEASE-p20)
2016-07-25 15:04:17 UTC (releng/10.1, 10.1-RELEASE-p37)
2016-07-25 14:53:04 UTC (stable/9, 9.3-STABLE)
2016-07-25 15:04:17 UTC (releng/9.3, 9.3-RELEASE-p45)
CVE Name: CVE-2014-9862
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:https://security.FreeBSD.org/>.
The bspatch utility generates newfile from oldfile and patchfile where
patchfile is a binary patch built by bsdiff(1).
II. Problem Description
The implementation of bspatch does not check for a negative value on numbers
of bytes read from the diff and extra streams, allowing an attacker who
can control the patch file to write at arbitrary locations in the heap.
This issue was first discovered by The Chromium Project and reported
independently by Lu Tung-Pin to the FreeBSD project.
An attacker who can control the patch file can cause a crash or run arbitrary
code under the credentials of the user who runs bspatch, in many cases, root.
No workaround is available.
Perform one of the following:
1) Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date.
No reboot is needed.
2) To update your vulnerable system via a binary patch:
Systems running a RELEASE version of FreeBSD on the i386 or amd64
platforms can be updated via the freebsd-update(8) utility:
# freebsd-update fetch
# freebsd-update install
No reboot is needed.
3) To update your vulnerable system via a source code patch:
The following patches have been verified to apply to the applicable
FreeBSD release branches.
a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
# fetch https://security.FreeBSD.org/patches/SA-16:25/bspatch.patch
# fetch https://security.FreeBSD.org/patches/SA-16:25/bspatch.patch.asc
# gpg --verify bspatch.patch.asc
b) Apply the patch. Execute the following commands as root:
# cd /usr/src
# patch < /path/to/patch
c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.
VI. Correction details
The following list contains the correction revision numbers for each
To see which files were modified by a particular revision, run the
following command, replacing NNNNNN with the revision number, on a
machine with Subversion installed:
# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base
Or visit the following URL, replacing NNNNNN with the revision number:
The latest revision of this advisory is available at
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1.13 (FreeBSD)
-----END PGP SIGNATURE-----
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"