Skip to contentSkip to conversation

openssl ouch

Openvpn-devel Jan Just Keijser 4 participants 6 messages Apr 19, 2012 – May 8, 2012

lore
Share & tools
lore
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Jan Just Keijser [mailto:[email protected]...]
Sent: donderdag 19 april 2012 15:56
To: [email protected]
Subject: [Openvpn-devel] openssl ouch

ouch:
http://www.openssl.org/news/secadv_20120419.txt

we need to investigate whether and how openvpn is affected.

Good catch!

OpenVPN does use a number of these functions when loading PKCS#12 files in ssl_openssl.c.

I'm not entirely sure what the impact is yet, as these files should be generated by the same user that actually uses the connection (they contain the user's private key). If the user hasn't generated these files themselves (which I wouldn't recommend), they might be affected.

Adriaan

#3 lore raw
Quoted 8 lines
Quoted 6 lines · Jan Just Keijser

ouch:
http://www.openssl.org/news/secadv_20120419.txt

we need to investigate whether and how openvpn is affected.

Quoted 7 lines

did somebody end up writing an 'authoritative' answer to the question if and how openvpn is affected by this bug?

cheers,

JJK

Asked James to take a look at this.

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
#4 lore raw
In reply to Jan Just Keijser
Quoted 8 lines
Quoted 6 lines · Jan Just Keijser

ouch:
http://www.openssl.org/news/secadv_20120419.txt

we need to investigate whether and how openvpn is affected.

Quoted 7 lines

did somebody end up writing an 'authoritative' answer to the question if and how openvpn is affected by this bug?

cheers,

JJK

Hi all,

Got a response from James:

---

My reading on this is that OpenVPN is probably not vulnerable.

Scanning the OpenVPN source for usage of the vulnerable methods (d2i_*_bio or d2i_*_fp), I'm seeing several calls of the methods in ssl.c, however the data passed to these methods is coming from local sources.

$ grep -Er '\bd2i_.*_(bio|fp)\b' .
./ssl.c:          p12 = d2i_PKCS12_bio(b64, NULL);
./ssl.c:          p12 = d2i_PKCS12_fp(fp, NULL);

For example, above, we are passing the PKCS12 file to OpenSSL methods that have been cited as vulnerable, however the PKCS12 file is locally obtained so there's no capability for a malicious client or server to try to push a malformed file to its peer as a part of the OpenVPN or SSL/TLS protocols.

Aside from this, the vulnerability text says that "In particular the SSL/TLS code of OpenSSL is *not* affected." so the core SSL/TLS implementation in OpenVPN should be immune.

And in general, using the "tls-auth" option gives you another level of protection against any OpenSSL issues that would involve a direct attack on the SSL/TLS protocol.

James

---

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 41 lines · Samuli Seppänen
Quoted 7 lines
Quoted 5 lines · Jan Just Keijser

ouch: http://www.openssl.org/news/secadv_20120419.txt

we need to investigate whether and how openvpn is affected.

Quoted 7 lines

did somebody end up writing an 'authoritative' answer to the question if and how openvpn is affected by this bug?

cheers,

JJK

Hi all,

Got a response from James:

---

My reading on this is that OpenVPN is probably not vulnerable.

Scanning the OpenVPN source for usage of the vulnerable methods (d2i_*_bio or d2i_*_fp), I'm seeing several calls of the methods in
ssl.c, however the data passed to these methods is coming from
local sources.

$ grep -Er '\bd2i_.*_(bio|fp)\b' . ./ssl.c:          p12 =
d2i_PKCS12_bio(b64, NULL); ./ssl.c:          p12 =
d2i_PKCS12_fp(fp, NULL);

For example, above, we are passing the PKCS12 file to OpenSSL methods that have been cited as vulnerable, however the PKCS12 file is locally obtained so there's no capability for a malicious client or server to try to push a malformed file to its peer as a part of the OpenVPN or SSL/TLS protocols.

Aside from this, the vulnerability text says that "In particular the SSL/TLS code of OpenSSL is *not* affected." so the core SSL/TLS
implementation in OpenVPN should be immune.

Quoted 5 lines

And in general, using the "tls-auth" option gives you another level of protection against any OpenSSL issues that would involve a direct attack on the SSL/TLS protocol.

James

I'm not sure which version James checked against, but those code paths shouldn't have changed much since the 2.1 release and to our latest master. And to confirm that:

$ git grep -E '\bd2i_.*_(bio|fp)\b'
src/openvpn/ssl_openssl.c:      p12 = d2i_PKCS12_bio(b64, NULL);
src/openvpn/ssl_openssl.c:      p12 = d2i_PKCS12_fp(fp, NULL);

Which identifies the same file. The ./ssl.c code got moved to ./ssl_openssl.c with Adriaan's PolarSSL implementation and further moved to src/openvpn/ssl_openssl.c with Alon's build clean-up.

So I would say James' statement covers all 2.2, 2.3-alpha and up to the latest git master code.

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+o7oIACgkQDC186MBRfrrLtQCdHfXeKvGypSe4nMRTv5GbCjLs g1oAn34P/Zn6GE9ZVcmDT/zGlf77mrP3
=SWwd
-----END PGP SIGNATURE-----