Bug 547662 - (CVE-2009-4034) CVE-2009-4034 postgresql: incorrect verification of SSL certificates with NUL in name
CVE-2009-4034 postgresql: incorrect verification of SSL certificates with NUL...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,source=redhat,reported=200...
: Security
Depends On: 552617
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-15 05:55 EST by Tomas Hoger
Modified: 2010-02-22 11:33 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-22 11:33:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tomas Hoger 2009-12-15 05:55:07 EST
A CVE-2009-2408-like flaw was found in the way PostgreSQL handled CommonNames with embedded NUL character (\0) in SSL certificates.  An attacker able to get a specially-crafted certificate signed by the CA trusted by PostgreSQL client or server could use this flaw to perform a MITM attack against the client, or authenticate as different user when client certificate authentication was configured on the server.

Description from the upstream security page:

  http://www.postgresql.org/support/security.html

  NULL Bytes in SSL Certificates can be used to falsify client or server
  authentication. This only affects users who have SSL enabled, perform
  certificate name validation or client certificate authentication, and
  where the Certificate Authority (CA) has been tricked into issuing invalid
  certificates. The use of a CA that can be trusted to always issue valid
  certificates is recommended to ensure you are not vulnerable to this issue.

  Affected versions:
  8.4, 8.3, 8.2, 8.1, 8.0, 7.4

  Fixed in:
  8.4.2, 8.3.9, 8.2.15, 8.1.19, 8.0.23, 7.4.27

Upstream commit:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=6d468770312724fced8b9913ec2065096d473344
Comment 1 Tomas Hoger 2009-12-15 06:01:32 EST
While the upstream applied the fix to all currently supported versions, this really only is a security flaw in 8.4 and later versions.  Previous versions do not compare connection host name with the certificate CommonName at all.  Client certificate authentication was also only introduced in 8.4.

With the patch applied in older versions, a certificate with \0 in CN will cause the client to abort connection even though no other name validation is performed.

We are not treating this as security in pre-8.4 versions.  Future postgresql packages updates may, however, contain this fix (e.g. when rebasing to newer upstream point releases).
Comment 3 Fedora Update System 2009-12-16 12:11:10 EST
postgresql-8.3.9-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/postgresql-8.3.9-1.fc11
Comment 4 Fedora Update System 2009-12-17 23:36:21 EST
postgresql-8.3.9-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2009-12-17 23:39:40 EST
postgresql-8.4.2-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Tomas Hoger 2010-02-22 11:33:14 EST
Fixed in Fedora, not a security flaw for Red Hat Enterprise Linux 3, 4 and 5 (see comment #1).

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