update to 3.8.0
This commit is contained in:
parent
caa92c7784
commit
802cd2d96a
@ -1,45 +0,0 @@
|
||||
From 80a6ce8ddb02477cd724cd5b2944791aaddb702a Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Sosedkin <asosedkin@redhat.com>
|
||||
Date: Tue, 9 Aug 2022 16:05:53 +0200
|
||||
Subject: [PATCH 1/2] auth/rsa: side-step potential side-channel
|
||||
|
||||
Remove branching that depends on secret data.
|
||||
|
||||
Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
|
||||
Signed-off-by: Hubert Kario <hkario@redhat.com>
|
||||
Tested-by: Hubert Kario <hkario@redhat.com>
|
||||
---
|
||||
lib/auth/rsa.c | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c
|
||||
index 8108ee8..6b158ba 100644
|
||||
--- a/lib/auth/rsa.c
|
||||
+++ b/lib/auth/rsa.c
|
||||
@@ -155,7 +155,6 @@ static int
|
||||
proc_rsa_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
size_t _data_size)
|
||||
{
|
||||
- const char attack_error[] = "auth_rsa: Possible PKCS #1 attack\n";
|
||||
gnutls_datum_t ciphertext;
|
||||
int ret, dsize;
|
||||
ssize_t data_size = _data_size;
|
||||
@@ -235,15 +234,6 @@ proc_rsa_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
ok &= CONSTCHECK_NOT_EQUAL(check_ver_min, 0) &
|
||||
CONSTCHECK_EQUAL(session->key.key.data[1], ver_min);
|
||||
|
||||
- if (ok) {
|
||||
- /* call logging function unconditionally so all branches are
|
||||
- * indistinguishable for timing and cache access when debug
|
||||
- * logging is disabled */
|
||||
- _gnutls_no_log("%s", attack_error);
|
||||
- } else {
|
||||
- _gnutls_debug_log("%s", attack_error);
|
||||
- }
|
||||
-
|
||||
/* This is here to avoid the version check attack
|
||||
* discussed above.
|
||||
*/
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
From 4b7ff428291c7ed77c6d2635577c83a43bbae558 Mon Sep 17 00:00:00 2001
|
||||
From: Hubert Kario <hkario@redhat.com>
|
||||
Date: Wed, 8 Feb 2023 14:32:09 +0100
|
||||
Subject: [PATCH 2/2] rsa: remove dead code
|
||||
|
||||
since the `ok` variable isn't used any more, we can remove all code
|
||||
used to calculate it
|
||||
|
||||
Signed-off-by: Hubert Kario <hkario@redhat.com>
|
||||
---
|
||||
lib/auth/rsa.c | 20 +++-----------------
|
||||
1 file changed, 3 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c
|
||||
index 562518d93..492ec119f 100644
|
||||
--- a/lib/auth/rsa.c
|
||||
+++ b/lib/auth/rsa.c
|
||||
|
||||
diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c
|
||||
index 6b158ba..d9635a9 100644
|
||||
--- a/lib/auth/rsa.c
|
||||
+++ b/lib/auth/rsa.c
|
||||
@@ -159,8 +159,6 @@ proc_rsa_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
int ret, dsize;
|
||||
ssize_t data_size = _data_size;
|
||||
volatile uint8_t ver_maj, ver_min;
|
||||
- volatile uint8_t check_ver_min;
|
||||
- volatile uint32_t ok;
|
||||
|
||||
#ifdef ENABLE_SSL3
|
||||
if (get_num_version(session) == GNUTLS_SSL3) {
|
||||
@@ -186,7 +184,6 @@ proc_rsa_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
|
||||
ver_maj = _gnutls_get_adv_version_major(session);
|
||||
ver_min = _gnutls_get_adv_version_minor(session);
|
||||
- check_ver_min = (session->internals.allow_wrong_pms == 0);
|
||||
|
||||
session->key.key.data = gnutls_malloc(GNUTLS_MASTER_SIZE);
|
||||
if (session->key.key.data == NULL) {
|
||||
@@ -205,10 +202,9 @@ proc_rsa_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
return ret;
|
||||
}
|
||||
|
||||
- ret =
|
||||
- gnutls_privkey_decrypt_data2(session->internals.selected_key,
|
||||
- 0, &ciphertext, session->key.key.data,
|
||||
- session->key.key.size);
|
||||
+ gnutls_privkey_decrypt_data2(session->internals.selected_key,
|
||||
+ 0, &ciphertext, session->key.key.data,
|
||||
+ session->key.key.size);
|
||||
/* After this point, any conditional on failure that cause differences
|
||||
* in execution may create a timing or cache access pattern side
|
||||
* channel that can be used as an oracle, so treat very carefully */
|
||||
@@ -224,16 +220,6 @@ proc_rsa_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
* Vlastimil Klima, Ondej Pokorny and Tomas Rosa.
|
||||
*/
|
||||
|
||||
- /* ok is 0 in case of error and 1 in case of success. */
|
||||
-
|
||||
- /* if ret < 0 */
|
||||
- ok = CONSTCHECK_EQUAL(ret, 0);
|
||||
- /* session->key.key.data[0] must equal ver_maj */
|
||||
- ok &= CONSTCHECK_EQUAL(session->key.key.data[0], ver_maj);
|
||||
- /* if check_ver_min then session->key.key.data[1] must equal ver_min */
|
||||
- ok &= CONSTCHECK_NOT_EQUAL(check_ver_min, 0) &
|
||||
- CONSTCHECK_EQUAL(session->key.key.data[1], ver_min);
|
||||
-
|
||||
/* This is here to avoid the version check attack
|
||||
* discussed above.
|
||||
*/
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -15,17 +15,17 @@ diff --git a/lib/ext/server_name.c b/lib/ext/server_name.c
|
||||
index 259dc99..f61c1f2 100644
|
||||
--- a/lib/ext/server_name.c
|
||||
+++ b/lib/ext/server_name.c
|
||||
@@ -105,7 +105,9 @@ _gnutls_server_name_recv_params(gnutls_session_t session,
|
||||
@@ -112,7 +112,9 @@ _gnutls_server_name_recv_params(gnutls_session_t session,
|
||||
DECR_LEN(data_size, len);
|
||||
|
||||
if (type == 0) { /* NAME_DNS */
|
||||
- if (!_gnutls_dnsname_is_valid((char*)p, len)) {
|
||||
if (type == 0) { /* NAME_DNS */
|
||||
- if (!_gnutls_dnsname_is_valid((char *)p, len)) {
|
||||
+ _gnutls_debug_log("HSK[%p]: recieve server name: '%.*s'\n", session, len, p);
|
||||
+ /* fix ipv6 format server name invaild problem */
|
||||
+ if (!_gnutls_dnsname_is_valid((char*)p, len) && !_gnutls_ipv6_is_valid((char*)p, len)) {
|
||||
_gnutls_handshake_log
|
||||
("HSK[%p]: Server name is not acceptable: '%.*s'\n",
|
||||
session, (int) len, p);
|
||||
session, (int)len, p);
|
||||
diff --git a/lib/str.h b/lib/str.h
|
||||
index 9f0e7d6..e0bca4b 100644
|
||||
--- a/lib/str.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
gnutls-3.8.0.tar.xz
Normal file
BIN
gnutls-3.8.0.tar.xz
Normal file
Binary file not shown.
BIN
gnutls-3.8.0.tar.xz.sig
Normal file
BIN
gnutls-3.8.0.tar.xz.sig
Normal file
Binary file not shown.
16
gnutls.spec
16
gnutls.spec
@ -1,16 +1,14 @@
|
||||
Name: gnutls
|
||||
Version: 3.7.8
|
||||
Release: 2
|
||||
Version: 3.8.0
|
||||
Release: 1
|
||||
Summary: The GNU Secure Communication Protocol Library
|
||||
|
||||
License: LGPLv2.1+ and GPLv3+
|
||||
URL: https://www.gnutls.org/
|
||||
Source0: https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7/%{name}-%{version}.tar.xz
|
||||
Source1: https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7/%{name}-%{version}.tar.xz.sig
|
||||
Source0: https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/%{name}-%{version}.tar.xz
|
||||
Source1: https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/%{name}-%{version}.tar.xz.sig
|
||||
|
||||
Patch1: fix-ipv6-handshake-failed.patch
|
||||
Patch2: backport-01-CVE-2023-0361.patch
|
||||
Patch3: backport-02-CVE-2023-0361.patch
|
||||
Patch0: fix-ipv6-handshake-failed.patch
|
||||
|
||||
%bcond_without dane
|
||||
%bcond_with guile
|
||||
@ -163,7 +161,6 @@ make check %{?_smp_mflags}
|
||||
%{_bindir}/ocsptool
|
||||
%{_bindir}/psktool
|
||||
%{_bindir}/p11tool
|
||||
%{_bindir}/srptool
|
||||
%{_bindir}/gnutls*
|
||||
%if %{with dane}
|
||||
%{_bindir}/danetool
|
||||
@ -201,6 +198,9 @@ make check %{?_smp_mflags}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Jul 20 2023 zhengxiaoxiao <zhengxiaoxiao2@huawei.com> - 3.8.0-1
|
||||
- update to 3.8.0
|
||||
|
||||
* Wed Feb 15 2023 xuraoqing <xuraoqing@huawei.com> - 3.7.8-2
|
||||
- fix CVE-2023-0361
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user