View | Details | Raw Unified | Return to bug 275620 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 / +1 lines)
Lines 1-11 Link Here
1
PORTNAME=	strongswan
1
PORTNAME=	strongswan
2
DISTVERSION=	5.9.11
2
DISTVERSION=	5.9.13
3
PORTREVISION=	3
4
CATEGORIES=	security net-vpn
3
CATEGORIES=	security net-vpn
5
MASTER_SITES=	https://download.strongswan.org/ \
4
MASTER_SITES=	https://download.strongswan.org/ \
6
		https://download2.strongswan.org/
5
		https://download2.strongswan.org/
7
PATCH_SITES=	https://github.com/strongswan/strongswan/commit/
8
PATCHFILES=	a619356b5f21bfe3c13f1576eb1d16c015532ceb.patch:-p1
9
6
10
MAINTAINER=	strongswan@nanoteq.com
7
MAINTAINER=	strongswan@nanoteq.com
11
COMMENT=	Open Source IKEv2 IPsec-based VPN solution
8
COMMENT=	Open Source IKEv2 IPsec-based VPN solution
(-)distinfo (-5 / +3 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1690493412
1
TIMESTAMP = 1702006969
2
SHA256 (strongswan-5.9.11.tar.bz2) = ddf53f1f26ad26979d5f55e8da95bd389552f5de3682e35593f9a70b2584ed2d
2
SHA256 (strongswan-5.9.13.tar.bz2) = 56e30effb578fd9426d8457e3b76c8c3728cd8a5589594b55649b2719308ba55
3
SIZE (strongswan-5.9.11.tar.bz2) = 4786552
3
SIZE (strongswan-5.9.13.tar.bz2) = 4825644
4
SHA256 (a619356b5f21bfe3c13f1576eb1d16c015532ceb.patch) = 31ba77932b88b611f1f1d54478b7d3a024f40e0bcea0b3249f2d62274e1df19f
5
SIZE (a619356b5f21bfe3c13f1576eb1d16c015532ceb.patch) = 3344
(-)files/patch-src_swanctl_charon-tkm_src_tkm_tkm_diffie_hellman.c (-42 lines)
Removed Link Here
1
From 027421cbd2e6e628f5f959c74d722afadc477485 Mon Sep 17 00:00:00 2001
2
From: Tobias Brunner <tobias@strongswan.org>
3
Date: Tue, 11 Jul 2023 12:12:25 +0200
4
Subject: [PATCH] charon-tkm: Validate DH public key to fix potential buffer
5
 overflow
6
7
Seems this was forgotten in the referenced commit and actually could lead
8
to a buffer overflow.  Since charon-tkm is untrusted this isn't that
9
much of an issue but could at least be easily exploited for a DoS attack
10
as DH public values are set when handling IKE_SA_INIT requests.
11
12
Fixes: 0356089d0f94 ("diffie-hellman: Verify public DH values in backends")
13
Fixes: CVE-2023-41913
14
---
15
 src/charon-tkm/src/tkm/tkm_diffie_hellman.c | 7 ++++++-
16
 1 file changed, 6 insertions(+), 1 deletion(-)
17
18
diff --git a/src/charon-tkm/src/tkm/tkm_diffie_hellman.c b/src/charon-tkm/src/tkm/tkm_diffie_hellman.c
19
index 2b2d103d03e9..6999ad360d7e 100644
20
--- src/charon-tkm/src/tkm/tkm_diffie_hellman.c
21
+++ src/charon-tkm/src/tkm/tkm_diffie_hellman.c
22
@@ -70,11 +70,16 @@ METHOD(key_exchange_t, get_shared_secret, bool,
23
 	return TRUE;
24
 }
25
 
26
-
27
 METHOD(key_exchange_t, set_public_key, bool,
28
 	private_tkm_diffie_hellman_t *this, chunk_t value)
29
 {
30
 	dh_pubvalue_type othervalue;
31
+
32
+	if (!key_exchange_verify_pubkey(this->group, value) ||
33
+		value.len > sizeof(othervalue.data))
34
+	{
35
+		return FALSE;
36
+	}
37
 	othervalue.size = value.len;
38
 	memcpy(&othervalue.data, value.ptr, value.len);
39
 
40
-- 
41
2.34.1
42

Return to bug 275620