]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Security/tcptls: MitM Attack potential from certificate with NULL byte in CN.
authorJonathan Rose <jrose@digium.com>
Wed, 8 Apr 2015 17:15:07 +0000 (17:15 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 8 Apr 2015 17:15:07 +0000 (17:15 +0000)
commita6a98c7ef1e209fe1caafd8c79cfcb6ff2d192d1
tree5371fc8d907dd942567304812c909ed803dee4f0
parentd3f4cea69e699f398b4260837a1a6b9bfd7c01a8
Security/tcptls: MitM Attack potential from certificate with NULL byte in CN.

When registering to a SIP server with TLS, Asterisk will accept CA signed
certificates with a common name that was signed for a domain other than the
one requested if it contains a null character in the common name portion of
the cert. This patch fixes that by checking that the common name length
matches the the length of the content we actually read from the common name
segment. Some certificate authorities automatically sign CA requests when
the requesting CN isn't already taken, so an attacker could potentially
register a CN with something like www.google.com\x00www.secretlyevil.net
and have their certificate signed and Asterisk would accept that certificate
as though it had been for www.google.com - this is a security fix and is
noted in AST-2015-003.

ASTERISK-24847 #close
Reported by: Maciej Szmigiero
Patches:
 asterisk-null-in-cn.patch submitted by mhej (license 6085)
........

Merged revisions 434337 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 434338 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/11.6@434393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/tcptls.c