freeradius3: fix CVE-2017-9148

This takes the fix for CVE-2017-9148 from Debian.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens
2017-06-05 19:57:52 +02:00
parent d611ccc298
commit 7bb34ef7fc
3 changed files with 49 additions and 2 deletions
@@ -0,0 +1,47 @@
Description: disable session caching in the server (as opposed to in the
config, which would be way harder to get right) to address
https://security-tracker.debian.org/tracker/CVE-2017-9148
Author: Michael Stapelberg <stapelberg@debian.org>
Forwarded: not-needed
Last-Update: 2017-05-30
---
--- a/src/main/tls.c
+++ b/src/main/tls.c
@@ -369,7 +369,7 @@ tls_session_t *tls_new_session(TALLOC_CT
*
* FIXME: Also do it every N sessions?
*/
- if (conf->session_cache_enable &&
+ if (/*conf->session_cache_enable*/0 &&
((conf->session_last_flushed + ((int)conf->session_timeout * 1800)) <= request->timestamp)){
RDEBUG2("Flushing SSL sessions (of #%ld)", SSL_CTX_sess_number(conf->ctx));
@@ -463,7 +463,7 @@ tls_session_t *tls_new_session(TALLOC_CT
state->mtu = vp->vp_integer;
}
- if (conf->session_cache_enable) state->allow_session_resumption = true; /* otherwise it's false */
+ if (/*conf->session_cache_enable*/0) state->allow_session_resumption = true; /* otherwise it's false */
return state;
}
@@ -2675,7 +2675,7 @@ post_ca:
/*
* Callbacks, etc. for session resumption.
*/
- if (conf->session_cache_enable) {
+ if (/*conf->session_cache_enable*/0) {
/*
* Cache sessions on disk if requested.
*/
@@ -2745,7 +2745,7 @@ post_ca:
/*
* Setup session caching
*/
- if (conf->session_cache_enable) {
+ if (/*conf->session_cache_enable*/0) {
/*
* Create a unique context Id per EAP-TLS configuration.
*/