[Pkg-swan-devel] [Git][debian/strongswan][debian/bookworm] 3 commits: d/patches: add fix for CVE-2023-41913
Yves-Alexis Perez (@corsac)
gitlab at salsa.debian.org
Sun Jan 21 13:50:05 GMT 2024
Yves-Alexis Perez pushed to branch debian/bookworm at Debian / strongswan
Commits:
6b500fb7 by Yves-Alexis Perez at 2023-11-13T21:06:20+01:00
d/patches: add fix for CVE-2023-41913
Buffer Overflow When Handling DH Public Values
- - - - -
9b939c20 by Yves-Alexis Perez at 2023-11-13T21:29:24+01:00
finalize changelog
- - - - -
616fc622 by Yves-Alexis Perez at 2023-11-13T22:04:01+01:00
upload strongSwan 5.9.8-5+deb12u1 to bookworm-security
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/0006-charon-tkm-Validate-DH-public-key-to-fix-potential-b.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+strongswan (5.9.8-5+deb12u1) bookworm-security; urgency=medium
+
+ * d/patches: add fix for CVE-2023-41913 in charon-tkm
+ Buffer Overflow When Handling DH Public Values
+
+ -- Yves-Alexis Perez <corsac at debian.org> Mon, 13 Nov 2023 21:29:34 +0100
+
strongswan (5.9.8-5) unstable; urgency=medium
* No-change upload for source-only upload.
=====================================
debian/patches/0006-charon-tkm-Validate-DH-public-key-to-fix-potential-b.patch
=====================================
@@ -0,0 +1,37 @@
+From: Tobias Brunner <tobias at strongswan.org>
+Date: Tue, 11 Jul 2023 12:12:25 +0200
+Subject: charon-tkm: Validate DH public key to fix potential buffer overflow
+
+Seems this was forgotten in the referenced commit and actually could lead
+to a buffer overflow. Since charon-tkm is untrusted this isn't that
+much of an issue but could at least be easily exploited for a DoS attack
+as DH public values are set when handling IKE_SA_INIT requests.
+
+Fixes: 0356089d0f94 ("diffie-hellman: Verify public DH values in backends")
+Fixes: CVE-2023-41913
+---
+ src/charon-tkm/src/tkm/tkm_diffie_hellman.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/charon-tkm/src/tkm/tkm_diffie_hellman.c b/src/charon-tkm/src/tkm/tkm_diffie_hellman.c
+index 2b2d103..6999ad3 100644
+--- a/src/charon-tkm/src/tkm/tkm_diffie_hellman.c
++++ b/src/charon-tkm/src/tkm/tkm_diffie_hellman.c
+@@ -70,11 +70,16 @@ METHOD(key_exchange_t, get_shared_secret, bool,
+ return TRUE;
+ }
+
+-
+ METHOD(key_exchange_t, set_public_key, bool,
+ private_tkm_diffie_hellman_t *this, chunk_t value)
+ {
+ dh_pubvalue_type othervalue;
++
++ if (!key_exchange_verify_pubkey(this->group, value) ||
++ value.len > sizeof(othervalue.data))
++ {
++ return FALSE;
++ }
+ othervalue.size = value.len;
+ memcpy(&othervalue.data, value.ptr, value.len);
+
=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@
04_disable-libtls-tests.patch
dont-load-kernel-libipsec-plugin-by-default.patch
0005-libtls-Fix-authentication-bypass-and-expired-pointer.patch
+0006-charon-tkm-Validate-DH-public-key-to-fix-potential-b.patch
View it on GitLab: https://salsa.debian.org/debian/strongswan/-/compare/55db63e5f588a6b04e1b9324be57d84dd1fc6a90...616fc622aa7a33fbac68e442e5f05c39d35b35b6
--
View it on GitLab: https://salsa.debian.org/debian/strongswan/-/compare/55db63e5f588a6b04e1b9324be57d84dd1fc6a90...616fc622aa7a33fbac68e442e5f05c39d35b35b6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-swan-devel/attachments/20240121/3b7f1453/attachment-0001.htm>
More information about the Pkg-swan-devel
mailing list