FreeBSD Security Advisory FreeBSD-SA-20:26.dhclient

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

FreeBSD Security Advisory FreeBSD-SA-20:26.dhclient

FreeBSD Security Advisories
Hash: SHA512

FreeBSD-SA-20:26.dhclient                                   Security Advisory
                                                          The FreeBSD Project

Topic:          dhclient heap overflow

Category:       core
Module:         dhclient
Announced:      2020-09-02
Credits:        Shlomi Oberman, JSOF
Affects:        All supported versions of FreeBSD.
Corrected:      2020-08-31 21:28:09 UTC (stable/12, 12.1-STABLE)
                2020-09-02 16:25:31 UTC (releng/12.1, 12.1-RELEASE-p9)
                2020-08-31 21:28:57 UTC (stable/11, 11.4-STABLE)
                2020-09-02 16:25:31 UTC (releng/11.4, 11.4-RELEASE-p3)
                2020-09-02 16:25:31 UTC (releng/11.3, 11.3-RELEASE-p13)
CVE Name:       CVE-2020-7461

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:>.

I.   Background

dhclient(8) is the default IPv4 DHCP client used on FreeBSD.  It is
responsible for contacting DHCP servers on a network segment, and for
initializing and configuring network interfaces and configuring name
resolution based on received information.

dhclient(8) handles DHCP option 119, the Domain Search Option, which provides
a list of domains to search when resolving names using DNS.  The option data
format uses a compression scheme to avoid transmitting duplicate domain name

II.  Problem Description

When parsing option 119 data, dhclient(8) computes the uncompressed domain
list length so that it can allocate an appropriately sized buffer to store
the uncompressed list.  The code to compute the length failed to handle
certain malformed input, resulting in a heap overflow when the uncompressed
list is copied into in inadequately sized buffer.

III. Impact

The heap overflow could in principle be exploited to achieve remote code
execution.  The affected process runs with reduced privileges in a Capsicum
sandbox, limiting the immediate impact of an exploit.  However, it is
possible the bug could be combined with other vulnerabilities to escape the

IV.  Workaround

No workaround is available.  To trigger the bug, a system must be running
dhclient(8) on the same network as a malicious DHCP server.

V.   Solution

Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date, and
restart dhclient or reboot.

Perform one of the following:

1) 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
# shutdown -r +10min "Rebooting for a security update"

2) 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
# fetch
# gpg --verify dhclient.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:>.

Restart the applicable daemons, or reboot the system.

VI.  Correction details

The following list contains the correction revision numbers for each
affected branch.

Branch/path                                                      Revision
- -------------------------------------------------------------------------
stable/12/                                                        r365010
releng/12.1/                                                      r365257
stable/11/                                                        r365011
releng/11.4/                                                      r365257
releng/11.3/                                                      r365257
- -------------------------------------------------------------------------

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://

Or visit the following URL, replacing NNNNNN with the revision number:


VII. References


The latest revision of this advisory is available at

[hidden email] mailing list
To unsubscribe, send any mail to "[hidden email]"