OpenVPN and OpenSSL TLS issue ? (CVE-2009-3555)
A message that is not in the archive (sent off-list or not yet received): [email protected]...
A message that is not in the archive (sent off-list or not yet received): [email protected]...
A message that is not in the archive (sent off-list or not yet received): [email protected]...
A message that is not in the archive (sent off-list or not yet received): [email protected]...
A message that is not in the archive (sent off-list or not yet received): [email protected]...
A message that is not in the archive (sent off-list or not yet received): [email protected]...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 33 lines · Leonardo Rodrigues
just to make clear, using tls-auth is NOT a 'current workaround'. It
was always on the documentations and it's use was always recommended.from OpenVPN Security Overview
http://openvpn.net/index.php/open-source/documentation/security-overview.htmlOne notable security improvement that OpenVPN provides over vanilla TLS is that it gives the user the opportunity to use a pre-shared passphrase (or static key) in conjunction with the --tls-auth directive to generate an HMAC key to authenticate the packets that are themselves part of the TLS handshake sequence. This protects against buffer overflows in the OpenSSL TLS implementation, because an attacker cannot even initiate a TLS handshake without being able to generate packets with the currect HMAC signature.
from OpenVPN HOWTO
http://openvpn.net/index.php/open-source/documentation/howto.htmlHardening OpenVPN Security
One of the often-repeated maxims of network security is that one should never place so much trust in a single security component that its failure causes a catastrophic security breach. OpenVPN provides several mechanisms to add additional security layers to hedge against such an outcome.
Quoted 8 lines
tls-auth
The tls-auth directive adds an additional HMAC signature to all SSL/TLS handshake packets for integrity verification. Any UDP packet not bearing the correct HMAC signature can be dropped without further processing. The tls-auth HMAC signature provides an additional level of security above and beyond that provided by SSL/TLS. It can protect against: [ ... continues ... ]
Well said! Thank you for emphasising this. In my earlier posts, I never intended to suggest that this was a work around, just to be clear about that. But --tls-auth is now, how I see it, the only way currently available "immediately" (vs. waiting for openssl to be widely available on all distros) which can make you safer against the current SSL/TLS flaw.
Having said that, --tls-auth is really recommended to increase the overall security, no matter if there is a flaw in the SSL/TLS layer or not. So Leonardo Rodrigues got a good point here.
I just wanted to make sure my earlier messages would not be misunderstood further.
But to be honest, it would be greatly appreciated if an official statement about how the developers see the situation as well. This is such a critical flaw which really need some critical eyes into the OpenVPN code by someone who can understand it well. Just to confirm or reject the current assumptions. I'm not comfortable with the little discussion this thread has generated.
kind regards,
David Sommerseth
Quoted 8 lines
Mr. Olli escreveu:
Quoted 5 lines
Hi,
I understand your point. tls-auth seems to be the best work-around currently.
(further info about mail thread from openvpn-users list)
Quoted 8 lines · David Sommerseth
Quoted 7 lines
Quoted 7 lines · Mike Tancsa
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi Everyone,
Just wondering if the issue identified at
http://extendedsubset.com/ impacts OpenVPN.I've read through the proposed RFC [1] for a fix to the TLS
protocol. I
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
am by no means a security expert, but from what I can understand this can be a potential issue for OpenVPN as well. Anyhow, the solution is most probably not to fix OpenVPN but the TLS protocol. But I do
see one
Quoted 1 line
Quoted 1 line
Quoted 1 line
feature which can make OpenVPN a little bit safer in the mean
time, more
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
on that later on.
A simple explanation, how I've understood it: The problem is that the TLS and SSL protocols allows a renegotiation of the secured channel. This even happens in clear text, as far as I can understand. The problem is that this is now discovered to be prune to a MITM attack. The attacker can issue such a renegotiation request to an already on-going secured channel, and then the attacker will send the
agreed TLS
Quoted 1 line
Quoted 1 line
Quoted 1 line
handshake further to the client. The attacker will not be able to
read
Quoted 1 line
Quoted 1 line
Quoted 1 line
the the client-server traffic, but when the attacker can now
contact the
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
server, where the server do not differentiate the traffic from the attacker or the real client.
The proposed solution is to extend the TLS protocol with a 12
bytes long
Quoted 1 line
Quoted 1 line
Quoted 1 line
string with information generated during the first initial
negotiation,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
as a way to authenticate the renegotiation request. On clients which supports this sends this info to a server and the server do not
respond
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
back in this information, it should close the connection.
On the server side, the server should decline to renegotiate the
channel
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
unless the client supports this new feature. That way, a connection will not be closed on the server side with older clients which don't support this feature but prevents a MITM attack.
In regards to OpenVPN, I don't know how OpenVPN will react if it receives network packets which the OpenSSL implementation believes is from a trusted host, while it in reality is a attacker. And
further, I
Quoted 1 line
Quoted 1 line
Quoted 1 line
don't know how OpenVPN will handle the situation of one real
client and
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
in parallel having an active channel to an attacker. I don't believe the OpenVPN protocol does any kind of authentication of the decrypted OpenVPN packets. This should really be investigated further, to
see the
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
complete impact of this failure in the SSL/TLS protocols.
The solution which I believe can be OpenVPN's way how to handle this situation until OpenSSL is fixed is to make use of the --tls-auth feature. This implies the clients must have a distributed static
key in
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
addition, and the OpenVPN server will not respond to network packets which do not provide correct HMAC control packets which is based
on this
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
static key.
kind regards,
David Sommerseth
[1]
<http://svn.resiprocate.org/rep/ietf-drafts/ekr/draft-rescorla-tls-renegotiate.txt>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkr2AA0ACgkQDC186MBRfrpicwCfRH/opiP9uu089kEVTS2rCpml oBAAnA/PfonQetaogJfL49ntXDT6rMPe
=z6Ww
-----END PGP SIGNATURE-----
Quoted 6 lines · David Sommerseth
Well said! Thank you for emphasising this. In my earlier posts, I never intended to suggest that this was a work around, just to be clear about that. But --tls-auth is now, how I see it, the only way currently available "immediately" (vs. waiting for openssl to be widely available on all distros) which can make you safer against the current SSL/TLS flaw.
Can anybody explain, how the "current SSL/TLS flaw" can be used to exploit OpenVPN.
As far as I can understand this flaw is ability to upgrade secure connection from non-authenticated to authenticated transparently to application layer. If then application applies security context of the upgraded connection retroactively to the data send by non-authenticated client before upgrading, exploit is possible.
This is typical behavoir of HTTP servers, which allows https connection without client authentication, and then request renegotiation based on URL send by encrypted, but not-authenticated connection, and if proper client certificate is supplied - perform request send before authentication.
Moreover, attacker cannot even read result of this request, because it is send over upgraded coonection.
So, it is not really applicable to any connection-based protocols which maintain state. Only stateless HTTPS is vulnerable.
I cannot imagine even IMAP exploit, because IMAP severely limits set of commands, available in the pre-auth state.
But OpenVPN uses TLS for authentication and key negotiation only. So, non-authenticated man-in-the-middle attacker cannot send any commands which would be executed after attacker hand connection over to legitimate client.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 32 lines · Victor Wagner
Quoted 6 lines · David Sommerseth
Well said! Thank you for emphasising this. In my earlier posts, I never intended to suggest that this was a work around, just to be clear about that. But --tls-auth is now, how I see it, the only way currently available "immediately" (vs. waiting for openssl to be widely available on all distros) which can make you safer against the current SSL/TLS flaw.
Can anybody explain, how the "current SSL/TLS flaw" can be used to exploit OpenVPN.
As far as I can understand this flaw is ability to upgrade secure connection from non-authenticated to authenticated transparently to application layer. If then application applies security context of the upgraded connection retroactively to the data send by non-authenticated client before upgrading, exploit is possible.
This is typical behavoir of HTTP servers, which allows https connection without client authentication, and then request renegotiation based on URL send by encrypted, but not-authenticated connection, and if proper client certificate is supplied - perform request send before authentication.
Moreover, attacker cannot even read result of this request, because it is send over upgraded coonection.
So, it is not really applicable to any connection-based protocols which maintain state. Only stateless HTTPS is vulnerable.
I cannot imagine even IMAP exploit, because IMAP severely limits set of commands, available in the pre-auth state.
Quoted 4 lines
But OpenVPN uses TLS for authentication and key negotiation only. So, non-authenticated man-in-the-middle attacker cannot send any commands which would be executed after attacker hand connection over to legitimate client.
This flaw makes it, how I have understood it, possible to "duplicate" an on-going SSL connection (or transaction, which it often is referred to), making the SSL based server believe those two connections are the same client.
The MITM attacker sends a SSL/TLS protocol renegotiation request to the server, the server responds to it back to the attacker, where the attacker and the server agrees on a new transaction protocol. Then the attacker sends this server response back to the original client, and the client continues as before.
I also understand it that the attacker cannot read the traffic from the client, but the attacker now got an accepted channel which the server now recognises equally as the client channel. So it is kind of like a hidden hijack of an on-going connection.
OpenVPN does not do authentication of the clients continuously, it only does it on the initial TLS connections, and during the the --reneg-* configured phases. I don't know if this authentication is also triggered when the SSL/TLS protocol initiates a protocol renegotiation.
And my fear is that it does not do that, which means such an attack can
let you sneak in into an VPN connection.
My reason for this fear, is that this protocol renegotiation is normally handled by OpenSSL. But as OpenVPN seems to use OpenSSL in a little bit different way than normal implementations, it might be that this implementation is safer against this particular flaw - this is really unclear to me right now.
The reason for my suspicion is that the --tls-auth mechanism seems to be encapsulated on top of the TLS layer. It seems like OpenVPN interacts with the packets before it is sent to the OpenSSL layer. While a more traditional implementation just passes the established TCP connection straight to the OpenSSL layer and uses OpenSSL functions to read and write data.
Another thing is that, how I've understood the OpenSSL implementation, the traditional implementations requires TCP for SSL to work, while OpenVPN also supports SSL over UDP. So OpenVPN has to do something which is much more different than what other more traditional OpenSSL implementations does.
Anyhow, if --tls-auth only triggers is a HMAC calculation on the packets received before sending it to OpenSSL layer and the rest of the implementation is more like traditional implementations, this makes it required to use --tls-auth to avoid this SSL/TLS protocol flaw. But if OpenVPN have used an even more untraditional OpenSSL implementation, it could be that the OpenVPN in theory is safer against this flaw. This is what I'm wondering about.
A few words on the more specifics about OpenVPN and its OpenSSL implementation from the core developers would really be highly appreciated now, to clear up the real facts and false assumptions.
For now, it seems to me that --tls-auth is the only way to protect yourself against this flaw. But if I'm wrong, I would like to know that as well, to avoid spreading false information :)
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkr2sq8ACgkQDC186MBRfrrPUwCgkb4x8ivi+j2RSC1m5TySeDcA HycAnA1cWagvX2lY6BZZ5Dc/djPkHaMh
=Li4/
-----END PGP SIGNATURE-----
Quoted 12 lines · David Sommerseth
This flaw makes it, how I have understood it, possible to "duplicate" an on-going SSL connection (or transaction, which it often is referred to), making the SSL based server believe those two connections are the same client.
The MITM attacker sends a SSL/TLS protocol renegotiation request to the server, the server responds to it back to the attacker, where the attacker and the server agrees on a new transaction protocol. Then the attacker sends this server response back to the original client, and the client continues as before.
Quoted 4 lines
I also understand it that the attacker cannot read the traffic from the client, but the attacker now got an accepted channel which the server now recognises equally as the client channel. So it is kind of like a hidden hijack of an on-going connection.
No. It only makes it possible to send few packetes which server would misinterpret as coming from legitimate client. Once real ClientHelo message from legitimate client is send, and renegotiation takes place, attacker can't neither read nor send any information to the server.
Problem is that HTTPS server typically don't care whether information was send before renegotiation or after. It assembles both information into one HTTP request and executes it.
Attack is only applicable to the situation where same server accepts both non-authenticated and authenticated connections on the same port, and allows clients to upgrade connection from non-authenticated to authenticated.
I'm not sure that this behavoir is not possible at all with OpenVPN, but I've never seen such a configuration. Either client certificates are required (so MitM cannot perform first handshake) or are not required at all.
With HTTPS it is also possible to hijack connection with basic auth (i.e with username/password send via TLS=encrypted channel) using this renegotiation mechanism. But only because action is send as first line of HTTP-request and WWW-Authenticate header - later.
For any protocol which requires client to authenticate itself before sending commands, this attack is not applicable.
This is why this flaw go unnoticed for so many years.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · David Sommerseth
But to be honest, it would be greatly appreciated if an official statement about how the developers see the situation as well. This is such a critical flaw which really need some critical eyes into the OpenVPN code by someone who can understand it well. Just to confirm or reject the current assumptions. I'm not comfortable with the little discussion this thread has generated.
Just a little follow up, with a clearer explanation of this flaw:
<http://www.educatedguesswork.org/2009/11/understanding_the_tls_renegoti.html>
kind regards,
David Sommerseth
Quoted 81 lines
Quoted 6 lines
Mr. Olli escreveu:
Quoted 5 lines
Hi,
I understand your point. tls-auth seems to be the best work-around currently.
(further info about mail thread from openvpn-users list)
Quoted 8 lines · David Sommerseth
Quoted 7 lines
Quoted 7 lines · Mike Tancsa
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi Everyone,
Just wondering if the issue identified at
http://extendedsubset.com/ impacts OpenVPN.I've read through the proposed RFC [1] for a fix to the TLS
protocol. I
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
am by no means a security expert, but from what I can understand this can be a potential issue for OpenVPN as well. Anyhow, the solution is most probably not to fix OpenVPN but the TLS protocol. But I do
see one
Quoted 1 line
Quoted 1 line
Quoted 1 line
feature which can make OpenVPN a little bit safer in the mean
time, more
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
on that later on.
A simple explanation, how I've understood it: The problem is that the TLS and SSL protocols allows a renegotiation of the secured channel. This even happens in clear text, as far as I can understand. The problem is that this is now discovered to be prune to a MITM attack. The attacker can issue such a renegotiation request to an already on-going secured channel, and then the attacker will send the
agreed TLS
Quoted 1 line
Quoted 1 line
Quoted 1 line
handshake further to the client. The attacker will not be able to
read
Quoted 1 line
Quoted 1 line
Quoted 1 line
the the client-server traffic, but when the attacker can now
contact the
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
server, where the server do not differentiate the traffic from the attacker or the real client.
The proposed solution is to extend the TLS protocol with a 12
bytes long
Quoted 1 line
Quoted 1 line
Quoted 1 line
string with information generated during the first initial
negotiation,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
as a way to authenticate the renegotiation request. On clients which supports this sends this info to a server and the server do not
respond
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
back in this information, it should close the connection.
On the server side, the server should decline to renegotiate the
channel
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
unless the client supports this new feature. That way, a connection will not be closed on the server side with older clients which don't support this feature but prevents a MITM attack.
In regards to OpenVPN, I don't know how OpenVPN will react if it receives network packets which the OpenSSL implementation believes is from a trusted host, while it in reality is a attacker. And
further, I
Quoted 1 line
Quoted 1 line
Quoted 1 line
don't know how OpenVPN will handle the situation of one real
client and
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
in parallel having an active channel to an attacker. I don't believe the OpenVPN protocol does any kind of authentication of the decrypted OpenVPN packets. This should really be investigated further, to
see the
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
complete impact of this failure in the SSL/TLS protocols.
The solution which I believe can be OpenVPN's way how to handle this situation until OpenSSL is fixed is to make use of the --tls-auth feature. This implies the clients must have a distributed static
key in
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
addition, and the OpenVPN server will not respond to network packets which do not provide correct HMAC control packets which is based
on this
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
static key.
kind regards,
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
David Sommerseth
[1]
<http://svn.resiprocate.org/rep/ietf-drafts/ekr/draft-rescorla-tls-renegotiate.txt>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
- -
-
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkr4MyMACgkQDC186MBRfroEkQCgla+Wn1+E5pjEUE2x80zGlHYq 5jAAoKSgj5Ch0mGSco+9/MzllQqIsy/K
=G7eM
-----END PGP SIGNATURE-----