]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Reject certificates with embedded NULLs in the commonName field. This stops
authorMagnus Hagander <magnus@hagander.net>
Wed, 9 Dec 2009 06:37:25 +0000 (06:37 +0000)
committerMagnus Hagander <magnus@hagander.net>
Wed, 9 Dec 2009 06:37:25 +0000 (06:37 +0000)
commitd724237551b2b43c9c6f217de44bf210b0f50fdd
treecca62e49e534fdb88d46da086cd6cf1257729429
parentd01b2e4e47e0f13d2621fd47bc93cdad5862bf6c
Reject certificates with embedded NULLs in the commonName field. This stops
attacks where an attacker would put <attack>\0<propername> in the field and
trick the validation code that the certificate was for <attack>.

This is a very low risk attack since it reuqires the attacker to trick the
CA into issuing a certificate with an incorrect field, and the common
PostgreSQL deployments are with private CAs, and not external ones. Also,
default mode in 8.4 does not do any name validation, and is thus also not
vulnerable - but the higher security modes are.

Backpatch all the way. Even though versions 8.3.x and before didn't have
certificate name validation support, they still exposed this field for
the user to perform the validation in the application code, and there
is no way to detect this problem through that API.

Security: CVE-2009-4034
src/backend/libpq/be-secure.c
src/interfaces/libpq/fe-secure.c