[Pkg-swan-devel] [strongswan] 01/02: Fix CVE-2015-4171
Yves-Alexis Perez
corsac at moszumanska.debian.org
Fri Jun 12 05:47:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
corsac pushed a commit to branch squeeze-security
in repository strongswan.
commit 00cfbd11aedb1b6b37b660260ba9a1e1d14d8b6b
Author: Yves-Alexis Perez <corsac at debian.org>
Date: Thu Jun 11 21:56:46 2015 +0200
Fix CVE-2015-4171
* Non-maintainer upload by the Security Team.
* debian/patches:
- CVE-2015-4171_enforce_remote_auth added, fix potential leak of
authentication credential to rogue serveur when using PSK or EAP. This is
CVE-2015-4171.
---
debian/changelog | 10 ++
.../CVE-2015-4171_enforce_remote_auth.patch | 102 +++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 113 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 62e4449..5c03be5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+strongswan (4.4.1-5.7) UNRELEASED; urgency=high
+
+ * Non-maintainer upload by the Security Team.
+ * debian/patches:
+ - CVE-2015-4171_enforce_remote_auth added, fix potential leak of
+ authentication credential to rogue serveur when using PSK or EAP. This is
+ CVE-2015-4171.
+
+ -- Yves-Alexis Perez <corsac at debian.org> Thu, 11 Jun 2015 21:54:16 +0200
+
strongswan (4.4.1-5.6) squeeze-security; urgency=high
* Non-maintainer upload by the Security Team.
diff --git a/debian/patches/CVE-2015-4171_enforce_remote_auth.patch b/debian/patches/CVE-2015-4171_enforce_remote_auth.patch
new file mode 100644
index 0000000..490b142
--- /dev/null
+++ b/debian/patches/CVE-2015-4171_enforce_remote_auth.patch
@@ -0,0 +1,102 @@
+From bd72f43df80a7b3086acc94b47a0569b1e9d3487 Mon Sep 17 00:00:00 2001
+From: Martin Willi <martin at strongswan.org>
+Date: Wed, 3 Jun 2015 10:52:34 +0200
+Subject: [PATCH] ikev2: Enforce remote authentication config before proceeding
+ with own authentication
+
+Previously the constraints in the authentication configuration of an
+initiator were enforced only after all authentication rounds were
+complete. This posed a problem if an initiator used EAP or PSK
+authentication while the responder was authenticated with a certificate
+and if a rogue server was able to authenticate itself with a valid
+certificate issued by any CA the initiator trusted.
+
+Because any constraints for the responder's identity (rightid) or other
+aspects of the authentication (e.g. rightca) the initiator had were not
+enforced until the initiator itself finished its authentication such a rogue
+responder was able to acquire usernames and password hashes from the client.
+And if a client supported EAP-GTC it was even possible to trick it into
+sending plaintext passwords.
+
+This patch enforces the configured constraints right after the responder's
+authentication successfully finished for each round and before the initiator
+starts with its own authentication.
+
+Fixes CVE-2015-4171.
+---
+ src/libcharon/sa/tasks/ike_auth.c | 44 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 44 insertions(+)
+
+diff --git a/src/libcharon/sa/tasks/ike_auth.c b/src/libcharon/sa/tasks/ike_auth.c
+index b440ec811f72..6f9f1e7e1738 100644
+--- a/src/libcharon/sa/tasks/ike_auth.c
++++ b/src/libcharon/sa/tasks/ike_auth.c
+@@ -101,6 +101,11 @@ struct private_ike_auth_t {
+ * should we send a AUTHENTICATION_FAILED notify?
+ */
+ bool authentication_failed;
++
++ /**
++ * Is EAP acceptable, did we strictly authenticate peer?
++ */
++ bool eap_acceptable;
+ };
+
+ /**
+@@ -773,6 +778,37 @@ static status_t build_r(private_ike_auth_t *this, message_t *message)
+ }
+
+ /**
++ * Check if strict constraint fullfillment required to continue current auth
++ */
++static bool require_strict(private_ike_auth_t *this, bool mutual_eap)
++{
++ auth_cfg_t *cfg;
++
++ if (this->eap_acceptable)
++ {
++ return FALSE;
++ }
++
++ cfg = this->ike_sa->get_auth_cfg(this->ike_sa, TRUE);
++ switch ((uintptr_t)cfg->get(cfg, AUTH_RULE_AUTH_CLASS))
++ {
++ case AUTH_CLASS_EAP:
++ if (mutual_eap && this->my_auth)
++ {
++ this->eap_acceptable = TRUE;
++ return !this->my_auth->is_mutual(this->my_auth);
++ }
++ return TRUE;
++ case AUTH_CLASS_PSK:
++ return TRUE;
++ case AUTH_CLASS_PUBKEY:
++ case AUTH_CLASS_ANY:
++ default:
++ return FALSE;
++ }
++}
++
++/**
+ * Implementation of task_t.process for initiator
+ */
+ static status_t process_i(private_ike_auth_t *this, message_t *message)
+@@ -906,6 +942,14 @@ static status_t process_i(private_ike_auth_t *this, message_t *message)
+ }
+ }
+
++ if (require_strict(this, mutual_eap))
++ {
++ if (!update_cfg_candidates(this, TRUE))
++ {
++ return FAILED;
++ }
++ }
++
+ if (this->my_auth)
+ {
+ switch (this->my_auth->process(this->my_auth, message))
+--
+1.9.1
+
+
diff --git a/debian/patches/series b/debian/patches/series
index 1860b4f..d84c169 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ debian-changes-4.4.1-5
CVE-2013-6075.patch
CVE-2014-2338-4.x.patch
CVE-2014-2891.patch
+CVE-2015-4171_enforce_remote_auth.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-swan/strongswan.git
More information about the Pkg-swan-devel
mailing list