NTP BUG 3386: ntpq_stripquotes() returns incorrect value (original) (raw)
Last update: April 22, 2024 18:49 UTC (7e7bd5857)
Summary
Resolved | 4.2.8p10 | 21 Mar 2017 |
---|---|---|
References | Bug 3386 | |
Affects | All versions of NTP, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not including ntp-4.3.94. | Resolved in 4.2.8p10. |
CVSS2 Score | NONE 0.0 | AV:N/AC:H/Au:N/C:N/I:N/A:N |
CVSS3 Score | NONE 0.0 | CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:N |
Description
The NTP Mode 6 monitoring and control client, ntpq
, uses the function ntpq_stripquotes()
to remove quotes and escape characters from a given string. According to the documentation, the function is supposed to return the number of copied bytes but due to incorrect pointer usage this value is always zero. Although the return value of this function is never used in the code, this flaw could lead to a vulnerability in the future. Since relying on wrong return values when performing memory operations is a dangerous practice, it is recommended to return the correct value in accordance with the documentation pertinent to the code.
Mitigation
- Implement BCP-38.
- Upgrade to 4.2.8p10 or later.
- Properly monitor your
ntpd
instances, and auto-restartntpd
(without-g
) if it stops running.
Credit
This weakness was discovered by Cure53.
Timeline
- 2017 Mar 21: Public release
- 2017 Mar 06: Early Access Program Release: Premier and Partner Institutional Members
- 2017 Mar 06: Notification to Institutional Members
- 2017 Feb 09: Mozilla/Cure53 audit received