[FreeBSD-Announce] FreeBSD Security Advisory FreeBSD-SA-19:04.ntp

FreeBSD Security Advisories security-advisories at freebsd.org
Wed May 15 00:01:32 UTC 2019

Hash: SHA512

FreeBSD-SA-19:04.ntp                                        Security Advisory
                                                          The FreeBSD Project

Topic:          Authenticated denial of service in ntpd

Category:       contrib
Module:         ntp
Announced:      2019-05-14
Credits:        Magnus Stubman
Affects:        All supported versions of FreeBSD
Corrected:      2019-03-07 13:45:36 UTC (stable/12, 12.0-STABLE)
                2019-05-14 23:02:56 UTC (releng/12.0, 12.0-RELEASE-p4)
                2019-03-07 13:45:36 UTC (stable/11, 11.3-PRERELEASE)
                2019-05-14 23:06:26 UTC (releng/11.2, 11.2-RELEASE-p10)
CVE Name:       CVE-2019-8936

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

I.   Background

The ntpd(8) daemon is an implementation of the Network Time Protocol
(NTP) used to synchronize the time of a computer system to a reference
time source.  The ntpd(8) daemon uses a protocol called mode 6 to both get
status information from the running ntpd(8) daemon and configure it on the
fly.  This protocol is typically used by the ntpq(8) program, among others.

II.  Problem Description

A crafted malicious authenticated mode 6 packet from a permitted network
address can trigger a NULL pointer dereference.

Note for this attack to work, the sending system must be on an address from
which the target ntpd(8) accepts mode 6 packets, and must use a private key
that is specifically listed as being used for mode 6 authorization.

III. Impact

The ntpd daemon can crash due to the NULL pointer dereference, causing a
denial of service.

IV.  Workaround

Use 'restrict noquery' in the ntpd configuration to limit addresses that
can send mode 6 queries.

V.   Solution

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.

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

Afterwards, restart the ntpd service:
# service ntpd restart

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.

[FreeBSD 12.0]
# fetch https://security.FreeBSD.org/patches/SA-19:04/ntp.patch
# fetch https://security.FreeBSD.org/patches/SA-19:04/ntp.patch.asc
# gpg --verify ntp.patch.asc

# fetch https://security.FreeBSD.org/patches/SA-19:04/ntp-11.2.patch
# fetch https://security.FreeBSD.org/patches/SA-19:04/ntp-11.2.patch.asc
# gpg --verify ntp-11.2.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>.

Restart the ntpd service, or reboot the system.

VI.  Correction details

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

Branch/path                                                      Revision
- -------------------------------------------------------------------------
stable/12/                                                        r344884
releng/12.0/                                                      r347589
stable/11/                                                        r344884
releng/11.2/                                                      r347590
- -------------------------------------------------------------------------

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:


VII. References



The latest revision of this advisory is available at


More information about the freebsd-announce mailing list