package/mbedtls: make compression support a config option
PATCH 1/1 package/mbedtls: make compression support a config option
Enabling TLS compression may make mbedTLS vulnerable to the CRIME attack [1]. It should not be enabled unless is is sure CRIME and similar attacks are not applicable to the particulare situation.
As zlib is probably enabled in most systems, the user might end up with a vulnerable system without knowing. So, instead of enabling compression support if the zlib package is available, we make the compression support a config option. This way, the user has to explicitly enable compression support and is warned by the help text about the risk.
[1] https://tls.mbed.org/kb/how-to/deflate-compression-in-ssl-tls
--- package/mbedtls/Config.in | 12 ++++++++++++ package/mbedtls/mbedtls.mk | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)
package/mbedtls/Config.in +12 -0
@@ -17,4 +17,16 @@ config BR2_PACKAGE_MBEDTLS_PROGRAMS This option enables the installation and the build of mbed TLS companion programs. +config BR2_PACKAGE_MBEDTLS_COMPRESSION + bool "enable compression support" + select BR2_PACKAGE_ZLIB + help + Enable support for compression of the content data before it + enters the secure channel as described in RFC 3749. + + Warning: TLS compression may make you vulnerable to the CRIME + attack. You shoud not enable it unless you know for sure CRIME + and similar attacks are not applicable to your particular + situation. + endif
package/mbedtls/mbedtls.mk +1 -1
@@ -39,7 +39,7 @@ MBEDTLS_CONF_OPTS += \ -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=OFF endif -ifeq ($(BR2_PACKAGE_ZLIB),y) +ifeq ($(BR2_PACKAGE_MBEDTLS_COMPRESSION),y) MBEDTLS_CONF_OPTS += -DENABLE_ZLIB_SUPPORT=ON MBEDTLS_DEPENDENCIES += zlib define MBEDTLS_ENABLE_ZLIB
Signature · 1 line
2.11.1
PATCH 1/1 package/mbedtls: make compression support a config option
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"J?rg" == J?rg Krause <[email protected]> writes:
Enabling TLS compression may make mbedTLS vulnerable to the CRIME attack [1]. It should not be enabled unless is is sure CRIME and similar attacks are not applicable to the particulare situation.
As zlib is probably enabled in most systems, the user might end up with a vulnerable system without knowing. So, instead of enabling compression support if the zlib package is available, we make the compression support a config option. This way, the user has to explicitly enable compression support and is warned by the help text about the risk.
[1] https://tls.mbed.org/kb/how-to/deflate-compression-in-ssl-tls
Signed-off-by J?rg Krause <[email protected]>--- package/mbedtls/Config.in | 12 ++++++++++++ package/mbedtls/mbedtls.mk | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)package/mbedtls/Config.in +0
-0@@ -17,4 +17,16 @@ config BR2_PACKAGE_MBEDTLS_PROGRAMS This option enables the installation and the build of mbed TLS companion programs.
package/mbedtls/Config.in config BR2_PACKAGE_MBEDTLS_PROGRAMS · line 28
Quoted 10 lines
package/mbedtls/Config.in +9
-0+config BR2_PACKAGE_MBEDTLS_COMPRESSION + bool "enable compression support" + select BR2_PACKAGE_ZLIB + help + Enable support for compression of the content data before it + enters the secure channel as described in RFC 3749. + + Warning: TLS compression may make you vulnerable to the CRIME + attack. You shoud not enable it unless you know for sure CRIME
s/shoud/should/
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard