NTP Bug 2937

nextvar() missing length check in ntpq

  • Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
  • References: Sec 2937 / CVE-2015-7975
  • Affects: All ntp-4 releases up to, but not including 4.2.8p6, and 4.3.0 up to, but not including 4.3.90
  • CVSS: (AV:L/AC:H/Au:N/C:N/I:N/A:P) Base Score: 1.2. If you score A:C, this becomes 4.0.
  • CVSSv3: (CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L) Base Score 2.9, LOW
  • Summary: ntpq may call nextvar() which executes a memcpy() into the name buffer without a proper length check against its maximum length of 256 bytes. Note well that we're taking about ntpq here. The usual worst-case effect of this vulnerability is that the specific instance of ntpq will crash and the person or process that did this will have stopped themselves.
  • Mitigation:
    • Upgrade to 4.2.8p6, or later, from the NTP Project Download Page or the NTP Public Services Project Download Page.
    • If you are unable to upgrade:
      • If you have scripts that feed input to ntpq make sure there are some sanity checks on the input received from the "outside".
      • This is potentially more dangerous if ntpq is run as root.
  • Credit: This weakness was discovered by Jonathan Gardner <> of Cisco ASIG.

This topic: Main > SecurityNotice > NtpBug2937
Topic revision: r1 - 2016-01-20 - 11:38:20 - HarlanStenn
SSL security by CAcert
Get the CAcert Root Certificate
This site is powered by the TWiki collaboration platform
IPv6 Ready
Copyright & 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding the site? Send feedback