NTP BUG 3386: ntpq_stripquotes() returns incorrect value
Last update: June 27, 2022 20:45 UTC (51d68a4aa)
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.
- Implement BCP-38.
- Upgrade to 4.2.8p10 or later.
- Properly monitor your
ntpd instances, and auto-restart
-g) if it stops running.
This weakness was discovered by Cure53.