Skip to content

Commit

Permalink
Don't mix up pre- and post-handshake verification of DTLS clients.
Browse files Browse the repository at this point in the history
Commit db965c9 addressed TLS clients only.

When verifying DTLS clients, don't consider config blocks with CA
settings ('tls') which differ from the one used for verifying the
certificate chain.

Original issue reported and analysed by Ralf Paffrath. DTLS being
vulnerable reported by Raphael Geisser.

Addresses issue RADSECPROXY-43, CVE-2012-4523.
  • Loading branch information
Linus Nordberg authored and Linus Nordberg committed Oct 22, 2012
1 parent b04eb90 commit 3682c93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2012-10-22 1.6.2-dev
Bug fixes (security):
- Fix the issue with verification of clients when using multiple
'tls' config blocks (RADSECPROXY-43) for DTLS too. Reported by
Raphael Geisser.

2012-09-14 1.6.1
Bug fixes (security):
- When verifying clients, don't consider config blocks with CA
Expand Down
4 changes: 3 additions & 1 deletion dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ void *dtlsservernew(void *arg) {
X509 *cert = NULL;
SSL_CTX *ctx = NULL;
uint8_t delay = 60;
struct tls *accepted_tls = NULL;

debug(DBG_DBG, "dtlsservernew: starting");
conf = find_clconf(handle, (struct sockaddr *)&params->addr, NULL);
Expand All @@ -367,10 +368,11 @@ void *dtlsservernew(void *arg) {
cert = verifytlscert(ssl);
if (!cert)
goto exit;
accepted_tls = conf->tlsconf;
}

while (conf) {
if (verifyconfcert(cert, conf)) {
if (accepted_tls == conf->tlsconf && verifyconfcert(cert, conf)) {
X509_free(cert);
client = addclient(conf, 1);
if (client) {
Expand Down

0 comments on commit 3682c93

Please sign in to comment.