NTP Bug 3385

NTP-01-010 NTP: ereallocarray()/eallocarray() underused (Info)

  • Date Resolved: 21 Mar 2017
  • References: Sec 3385
  • 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.
  • Summary: NTP makes use of several wrappers around the standard heap memory allocation functions that are provided by libc. This is mainly done to introduce additional safety checks concentrated on several goals. First, they seek to ensure that memory is not accidentally freed, secondly they verify that a correct amount is always allocated and, thirdly, that allocation failures are correctly handled. There is an additional implementation for scenarios where memory for a specific amount of items of the same size needs to be allocated. The handling can be found in the oreallocarray() function for which a further number-of-elements parameter needs to be provided. Although no considerable threat was identified as tied to a lack of use of this function, it is recommended to correctly apply oreallocarray() as a preferred option across all of the locations where it is possible.
  • Mitigation:
  • Credit: This weakness was discovered by Cure53.

This topic: Main > SecurityNotice > NtpBug3385
Topic revision: r1 - 2017-03-22 - 01:33:30 - HarlanStenn
SSL security by CAcert
Get the CAcert Root Certificate
This site is powered by the TWiki collaboration platform
IPv6 Ready
Copyright & 1999-2017 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