Bug 476807 - (CVE-2009-0021) CVE-2009-0021 ntp incorrectly checks for malformed signatures
CVE-2009-0021 ntp incorrectly checks for malformed signatures
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 479696 479697 479698 479699
  Show dependency treegraph
Reported: 2008-12-17 04:25 EST by Mark J. Cox
Modified: 2012-12-17 13:10 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-29 04:50:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:0046 normal SHIPPED_LIVE Moderate: ntp security update 2009-01-29 04:46:34 EST

  None (edit)
Description Mark J. Cox 2008-12-17 04:25:38 EST
Embargoed until Jan 7th 2009.

Incorrect checks for malformed signatures

Several functions inside NTP incorrectly checked the result after calling the OpenSSL EVP_VerifyFinal function, allowing a malformed signature to be treated as a good signature rather than as an error.  

A remote attacker who is in control of a malicious server or who can use a 'man in the middle' attack could present a malformed signature from a certificate chain to a vulnerable client, bypassing validation.  This issue would only affect non-default installations that are set up to use cryptography to authenticate clients and servers to each other.

This vulnerability is tracked as CVE-2009-0021 and is similar to
CVE-2008-5077 which affects OpenSSL itself.

The OpenSSL security team would like to thank the Google Security Team
for reporting this issue.

Projects and products using OpenSSL should audit any use of the
routine EVP_VerifyFinal() to ensure that the return code is being
correctly handled.  As documented, this function returns 1 for a
successful verification, 0 for failure, and -1 for an error.

I don't have a patch for this but it is easy to spot the problem in the source.
Comment 1 Tomas Hoger 2009-01-09 02:45:39 EST
Public now via oCERT advisory:

Fixed upstream in ntp 4.2.4p6, quoting Changelog:
  * [Sec 1111] Fix incorrect check of EVP_VerifyFinal()'s return value.

and NEWS file:
  NTP 4.2.4p6 (Harlan Stenn <stenn@ntp.org>, 2009/01/07)

  Focus: Security Fix

  Severity: Low

  This release fixes oCERT.org's CVE-2009-0021, a vulnerability affecting
  the OpenSSL library relating to the incorrect checking of the return
  value of EVP_VerifyFinal function.

  Credit for finding this issue goes to the Google Security Team for
  finding the original issue with OpenSSL, and to ocert.org for finding
  the problem in NTP and telling us about it.

Upstream bug:

Upstream patch:
Comment 3 Fedora Update System 2009-01-23 21:32:38 EST
ntp-4.2.4p6-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2009-01-23 21:34:04 EST
ntp-4.2.4p6-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.