Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
48
.gitignore
vendored
48
.gitignore
vendored
@ -1 +1,47 @@
|
|||||||
SOURCES/openssl-1.1.1k-hobbled.tar.xz
|
.build*.log
|
||||||
|
clog
|
||||||
|
000*.patch
|
||||||
|
*.src.rpm
|
||||||
|
openssl-1.0.0a-usa.tar.bz2
|
||||||
|
/openssl-1.0.0b-usa.tar.bz2
|
||||||
|
/openssl-1.0.0c-usa.tar.bz2
|
||||||
|
/openssl-1.0.0d-usa.tar.bz2
|
||||||
|
/openssl-1.0.0e-usa.tar.bz2
|
||||||
|
/openssl-1.0.0f-usa.tar.bz2
|
||||||
|
/openssl-1.0.0g-usa.tar.xz
|
||||||
|
/openssl-1.0.1-beta2-usa.tar.xz
|
||||||
|
/openssl-1.0.1-beta3-usa.tar.xz
|
||||||
|
/openssl-1.0.1-usa.tar.xz
|
||||||
|
/openssl-1.0.1a-usa.tar.xz
|
||||||
|
/openssl-1.0.1b-usa.tar.xz
|
||||||
|
/openssl-1.0.1c-usa.tar.xz
|
||||||
|
/openssl-1.0.1e-usa.tar.xz
|
||||||
|
/openssl-1.0.1e-hobbled.tar.xz
|
||||||
|
/openssl-1.0.1g-hobbled.tar.xz
|
||||||
|
/openssl-1.0.1h-hobbled.tar.xz
|
||||||
|
/openssl-1.0.1i-hobbled.tar.xz
|
||||||
|
/openssl-1.0.1j-hobbled.tar.xz
|
||||||
|
/openssl-1.0.1k-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2a-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2c-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2d-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2e-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2f-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2g-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2h-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2i-hobbled.tar.xz
|
||||||
|
/openssl-1.0.2j-hobbled.tar.xz
|
||||||
|
/openssl-1.1.0b-hobbled.tar.xz
|
||||||
|
/openssl-1.1.0c-hobbled.tar.xz
|
||||||
|
/openssl-1.1.0d-hobbled.tar.xz
|
||||||
|
/openssl-1.1.0e-hobbled.tar.xz
|
||||||
|
/openssl-1.1.0f-hobbled.tar.xz
|
||||||
|
/openssl-1.1.0g-hobbled.tar.xz
|
||||||
|
/openssl-1.1.0h-hobbled.tar.xz
|
||||||
|
/openssl-1.1.1-pre8-hobbled.tar.xz
|
||||||
|
/openssl-1.1.1-pre9-hobbled.tar.xz
|
||||||
|
/openssl-1.1.1-hobbled.tar.xz
|
||||||
|
/openssl-1.1.1b-hobbled.tar.xz
|
||||||
|
/openssl-1.1.1c-hobbled.tar.xz
|
||||||
|
/openssl-1.1.1g-hobbled.tar.xz
|
||||||
|
/openssl-1.1.1k-hobbled.tar.xz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
6fde639a66329f2cd9135eb192f2228f2a402c0e SOURCES/openssl-1.1.1k-hobbled.tar.xz
|
|
@ -1,255 +0,0 @@
|
|||||||
From d1d4b56fe0c9a4200276d630f62108e1165e0990 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Barbaro <mbarbaro@redhat.com>
|
|
||||||
Date: Mon, 16 Sep 2024 10:53:53 +0200
|
|
||||||
Subject: [PATCH] Backport openssl: SSL_select_next_proto buffer overread from 3.2
|
|
||||||
|
|
||||||
Ensure that the provided client list is non-NULL and starts with a valid
|
|
||||||
entry. When called from the ALPN callback the client list should already
|
|
||||||
have been validated by OpenSSL so this should not cause a problem. When
|
|
||||||
called from the NPN callback the client list is locally configured and
|
|
||||||
will not have already been validated. Therefore SSL_select_next_proto
|
|
||||||
should not assume that it is correctly formatted.
|
|
||||||
|
|
||||||
We implement stricter checking of the client protocol list. We also do the
|
|
||||||
same for the server list while we are about it.
|
|
||||||
|
|
||||||
CVE-2024-5535
|
|
||||||
|
|
||||||
From: Matt Caswell <matt@openssl.org>
|
|
||||||
Date: Fri, 31 May 2024 11:14:33 +0100
|
|
||||||
Merged from: https://github.com/openssl/openssl/pull/24717.
|
|
||||||
|
|
||||||
Backported-by: Maurizio Barbaro <mbarbaro@redhat.com>
|
|
||||||
we did't ported test changes because rely on internal testing framework.
|
|
||||||
|
|
||||||
---
|
|
||||||
doc/man3/SSL_CTX_set_alpn_select_cb.pod | 28 +++++++----
|
|
||||||
ssl/ssl_lib.c | 64 +++++++++++++++----------
|
|
||||||
ssl/statem/extensions_clnt.c | 30 +++++++++++-
|
|
||||||
ssl/statem/extensions_srvr.c | 3 +-
|
|
||||||
4 files changed, 89 insertions(+), 36 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/man3/SSL_CTX_set_alpn_select_cb.pod b/doc/man3/SSL_CTX_set_alpn_select_cb.pod
|
|
||||||
index e90caec..a3f8dfd 100644
|
|
||||||
--- a/doc/man3/SSL_CTX_set_alpn_select_cb.pod
|
|
||||||
+++ b/doc/man3/SSL_CTX_set_alpn_select_cb.pod
|
|
||||||
@@ -43,7 +43,7 @@ SSL_select_next_proto, SSL_get0_alpn_selected, SSL_get0_next_proto_negotiated
|
|
||||||
const unsigned char *server,
|
|
||||||
unsigned int server_len,
|
|
||||||
const unsigned char *client,
|
|
||||||
- unsigned int client_len)
|
|
||||||
+ unsigned int client_len);
|
|
||||||
void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data,
|
|
||||||
unsigned *len);
|
|
||||||
|
|
||||||
@@ -52,7 +52,8 @@ SSL_select_next_proto, SSL_get0_alpn_selected, SSL_get0_next_proto_negotiated
|
|
||||||
SSL_CTX_set_alpn_protos() and SSL_set_alpn_protos() are used by the client to
|
|
||||||
set the list of protocols available to be negotiated. The B<protos> must be in
|
|
||||||
protocol-list format, described below. The length of B<protos> is specified in
|
|
||||||
-B<protos_len>.
|
|
||||||
+B<protos_len>. Setting B<protos_len> to 0 clears any existing list of ALPN
|
|
||||||
+protocols and no ALPN extension will be sent to the server.
|
|
||||||
|
|
||||||
SSL_CTX_set_alpn_select_cb() sets the application callback B<cb> used by a
|
|
||||||
server to select which protocol to use for the incoming connection. When B<cb>
|
|
||||||
@@ -73,9 +74,16 @@ B<server_len> and B<client>, B<client_len> must be in the protocol-list format
|
|
||||||
described below. The first item in the B<server>, B<server_len> list that
|
|
||||||
matches an item in the B<client>, B<client_len> list is selected, and returned
|
|
||||||
in B<out>, B<outlen>. The B<out> value will point into either B<server> or
|
|
||||||
-B<client>, so it should be copied immediately. If no match is found, the first
|
|
||||||
-item in B<client>, B<client_len> is returned in B<out>, B<outlen>. This
|
|
||||||
-function can also be used in the NPN callback.
|
|
||||||
+B<client>, so it should be copied immediately. The client list must include at
|
|
||||||
+least one valid (nonempty) protocol entry in the list.
|
|
||||||
+
|
|
||||||
+The SSL_select_next_proto() helper function can be useful from either the ALPN
|
|
||||||
+callback or the NPN callback (described below). If no match is found, the first
|
|
||||||
+item in B<client>, B<client_len> is returned in B<out>, B<outlen> and
|
|
||||||
+B<OPENSSL_NPN_NO_OVERLAP> is returned. This can be useful when implementating
|
|
||||||
+the NPN callback. In the ALPN case, the value returned in B<out> and B<outlen>
|
|
||||||
+must be ignored if B<OPENSSL_NPN_NO_OVERLAP> has been returned from
|
|
||||||
+SSL_select_next_proto().
|
|
||||||
|
|
||||||
SSL_CTX_set_next_proto_select_cb() sets a callback B<cb> that is called when a
|
|
||||||
client needs to select a protocol from the server's provided list, and a
|
|
||||||
@@ -85,9 +93,10 @@ must be set to point to the selected protocol (which may be within B<in>).
|
|
||||||
The length of the protocol name must be written into B<outlen>. The
|
|
||||||
server's advertised protocols are provided in B<in> and B<inlen>. The
|
|
||||||
callback can assume that B<in> is syntactically valid. The client must
|
|
||||||
-select a protocol. It is fatal to the connection if this callback returns
|
|
||||||
-a value other than B<SSL_TLSEXT_ERR_OK>. The B<arg> parameter is the pointer
|
|
||||||
-set via SSL_CTX_set_next_proto_select_cb().
|
|
||||||
+select a protocol (although it may be an empty, zero length protocol). It is
|
|
||||||
+fatal to the connection if this callback returns a value other than
|
|
||||||
+B<SSL_TLSEXT_ERR_OK> or if the zero length protocol is selected. The B<arg>
|
|
||||||
+parameter is the pointer set via SSL_CTX_set_next_proto_select_cb().
|
|
||||||
|
|
||||||
SSL_CTX_set_next_protos_advertised_cb() sets a callback B<cb> that is called
|
|
||||||
when a TLS server needs a list of supported protocols for Next Protocol
|
|
||||||
@@ -149,7 +158,8 @@ A match was found and is returned in B<out>, B<outlen>.
|
|
||||||
=item OPENSSL_NPN_NO_OVERLAP
|
|
||||||
|
|
||||||
No match was found. The first item in B<client>, B<client_len> is returned in
|
|
||||||
-B<out>, B<outlen>.
|
|
||||||
+B<out>, B<outlen> (or B<NULL> and 0 in the case where the first entry in
|
|
||||||
+B<client> is invalid).
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
|
|
||||||
index c71c686..21e6c45 100644
|
|
||||||
--- a/ssl/ssl_lib.c
|
|
||||||
+++ b/ssl/ssl_lib.c
|
|
||||||
@@ -2739,38 +2739,54 @@ int SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
|
|
||||||
unsigned int server_len,
|
|
||||||
const unsigned char *client, unsigned int client_len)
|
|
||||||
{
|
|
||||||
- unsigned int i, j;
|
|
||||||
- const unsigned char *result;
|
|
||||||
- int status = OPENSSL_NPN_UNSUPPORTED;
|
|
||||||
+ PACKET cpkt, csubpkt, spkt, ssubpkt;
|
|
||||||
+ if (!PACKET_buf_init(&cpkt, client, client_len)
|
|
||||||
+ || !PACKET_get_length_prefixed_1(&cpkt, &csubpkt)
|
|
||||||
+ || PACKET_remaining(&csubpkt) == 0) {
|
|
||||||
+ *out = NULL;
|
|
||||||
+ *outlen = 0;
|
|
||||||
+ return OPENSSL_NPN_NO_OVERLAP;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Set the default opportunistic protocol. Will be overwritten if we find
|
|
||||||
+ * a match.
|
|
||||||
+ */
|
|
||||||
+ *out = (unsigned char *)PACKET_data(&csubpkt);
|
|
||||||
+ *outlen = (unsigned char)PACKET_remaining(&csubpkt);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* For each protocol in server preference order, see if we support it.
|
|
||||||
*/
|
|
||||||
- for (i = 0; i < server_len;) {
|
|
||||||
- for (j = 0; j < client_len;) {
|
|
||||||
- if (server[i] == client[j] &&
|
|
||||||
- memcmp(&server[i + 1], &client[j + 1], server[i]) == 0) {
|
|
||||||
- /* We found a match */
|
|
||||||
- result = &server[i];
|
|
||||||
- status = OPENSSL_NPN_NEGOTIATED;
|
|
||||||
- goto found;
|
|
||||||
+ if (PACKET_buf_init(&spkt, server, server_len)) {
|
|
||||||
+ while (PACKET_get_length_prefixed_1(&spkt, &ssubpkt)) {
|
|
||||||
+ if (PACKET_remaining(&ssubpkt) == 0)
|
|
||||||
+ continue; /* Invalid - ignore it */
|
|
||||||
+ if (PACKET_buf_init(&cpkt, client, client_len)) {
|
|
||||||
+ while (PACKET_get_length_prefixed_1(&cpkt, &csubpkt)) {
|
|
||||||
+ if (PACKET_equal(&csubpkt, PACKET_data(&ssubpkt),
|
|
||||||
+ PACKET_remaining(&ssubpkt))) {
|
|
||||||
+ /* We found a match */
|
|
||||||
+ *out = (unsigned char *)PACKET_data(&ssubpkt);
|
|
||||||
+ *outlen = (unsigned char)PACKET_remaining(&ssubpkt);
|
|
||||||
+ return OPENSSL_NPN_NEGOTIATED;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ /* Ignore spurious trailing bytes in the client list */
|
|
||||||
+ } else {
|
|
||||||
+ /* This should never happen */
|
|
||||||
+ return OPENSSL_NPN_NO_OVERLAP;
|
|
||||||
}
|
|
||||||
- j += client[j];
|
|
||||||
- j++;
|
|
||||||
}
|
|
||||||
- i += server[i];
|
|
||||||
- i++;
|
|
||||||
+ /* Ignore spurious trailing bytes in the server list */
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* There's no overlap between our protocols and the server's list. */
|
|
||||||
- result = client;
|
|
||||||
- status = OPENSSL_NPN_NO_OVERLAP;
|
|
||||||
-
|
|
||||||
- found:
|
|
||||||
- *out = (unsigned char *)result + 1;
|
|
||||||
- *outlen = result[0];
|
|
||||||
- return status;
|
|
||||||
-}
|
|
||||||
+ /*
|
|
||||||
+ * There's no overlap between our protocols and the server's list. We use
|
|
||||||
+ * the default opportunistic protocol selected earlier
|
|
||||||
+ */
|
|
||||||
+ return OPENSSL_NPN_NO_OVERLAP;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
|
||||||
/*
|
|
||||||
diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c
|
|
||||||
index ce8a757..cfde733 100644
|
|
||||||
--- a/ssl/statem/extensions_clnt.c
|
|
||||||
+++ b/ssl/statem/extensions_clnt.c
|
|
||||||
@@ -1585,8 +1585,8 @@ int tls_parse_stoc_npn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
|
|
||||||
if (s->ctx->ext.npn_select_cb(s, &selected, &selected_len,
|
|
||||||
PACKET_data(pkt),
|
|
||||||
PACKET_remaining(pkt),
|
|
||||||
- s->ctx->ext.npn_select_cb_arg) !=
|
|
||||||
- SSL_TLSEXT_ERR_OK) {
|
|
||||||
+ s->ctx->ext.npn_select_cb_arg) != SSL_TLSEXT_ERR_OK
|
|
||||||
+ || selected_len == 0) {
|
|
||||||
SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_F_TLS_PARSE_STOC_NPN,
|
|
||||||
SSL_R_BAD_EXTENSION);
|
|
||||||
return 0;
|
|
||||||
@@ -1617,6 +1617,8 @@ int tls_parse_stoc_alpn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
|
|
||||||
size_t chainidx)
|
|
||||||
{
|
|
||||||
size_t len;
|
|
||||||
+ PACKET confpkt, protpkt;
|
|
||||||
+ int valid = 0;
|
|
||||||
|
|
||||||
/* We must have requested it. */
|
|
||||||
if (!s->s3->alpn_sent) {
|
|
||||||
@@ -1637,6 +1639,30 @@ int tls_parse_stoc_alpn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
|
|
||||||
SSL_R_BAD_EXTENSION);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ /* It must be a protocol that we sent */
|
|
||||||
+ if (!PACKET_buf_init(&confpkt, s->ext.alpn, s->ext.alpn_len)) {
|
|
||||||
+ SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PARSE_STOC_ALPN,
|
|
||||||
+ ERR_R_INTERNAL_ERROR);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+ while (PACKET_get_length_prefixed_1(&confpkt, &protpkt)) {
|
|
||||||
+ if (PACKET_remaining(&protpkt) != len)
|
|
||||||
+ continue;
|
|
||||||
+ if (memcmp(PACKET_data(pkt), PACKET_data(&protpkt), len) == 0) {
|
|
||||||
+ /* Valid protocol found */
|
|
||||||
+ valid = 1;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!valid) {
|
|
||||||
+ /* The protocol sent from the server does not match one we advertised */
|
|
||||||
+ SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_F_TLS_PARSE_STOC_ALPN,
|
|
||||||
+ SSL_R_BAD_EXTENSION);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
OPENSSL_free(s->s3->alpn_selected);
|
|
||||||
s->s3->alpn_selected = OPENSSL_malloc(len);
|
|
||||||
if (s->s3->alpn_selected == NULL) {
|
|
||||||
diff --git a/ssl/statem/extensions_srvr.c b/ssl/statem/extensions_srvr.c
|
|
||||||
index 3c7395c..4e3cbf8 100644
|
|
||||||
--- a/ssl/statem/extensions_srvr.c
|
|
||||||
+++ b/ssl/statem/extensions_srvr.c
|
|
||||||
@@ -1559,9 +1559,10 @@ EXT_RETURN tls_construct_stoc_next_proto_neg(SSL *s, WPACKET *pkt,
|
|
||||||
return EXT_RETURN_FAIL;
|
|
||||||
}
|
|
||||||
s->s3->npn_seen = 1;
|
|
||||||
+ return EXT_RETURN_SENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
- return EXT_RETURN_SENT;
|
|
||||||
+ return EXT_RETURN_NOT_SENT;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
--
|
|
||||||
2.46.0
|
|
||||||
|
|
15
fixpatch
Executable file
15
fixpatch
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Fixes patch from upstream tracker view
|
||||||
|
gawk '
|
||||||
|
BEGIN {
|
||||||
|
dir=""
|
||||||
|
}
|
||||||
|
/^Index: openssl\// {
|
||||||
|
dir = $2
|
||||||
|
}
|
||||||
|
/^(---|\+\+\+)/ {
|
||||||
|
$2 = dir
|
||||||
|
}
|
||||||
|
{
|
||||||
|
print
|
||||||
|
}'
|
9
gating.yaml
Normal file
9
gating.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.userspace-fips-mode.functional}
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tedude.validation}
|
@ -1,11 +1,13 @@
|
|||||||
diff -up openssl-1.1.1k/ssl/statem/extensions.c.cleanup-reneg openssl-1.1.1k/ssl/statem/extensions.c
|
diff -up openssl-1.1.1k/ssl/statem/extensions.c.cleanup-reneg openssl-1.1.1k/ssl/statem/extensions.c
|
||||||
--- openssl-1.1.1k/ssl/statem/extensions.c.cleanup-reneg 2021-03-25 14:28:38.000000000 +0100
|
--- openssl-1.1.1k/ssl/statem/extensions.c.cleanup-reneg 2021-03-25 14:28:38.000000000 +0100
|
||||||
+++ openssl-1.1.1k/ssl/statem/extensions.c 2021-06-24 16:16:19.526181743 +0200
|
+++ openssl-1.1.1k/ssl/statem/extensions.c 2021-06-24 16:16:19.526181743 +0200
|
||||||
@@ -42,6 +42,7 @@ static int tls_parse_certificate_authori
|
@@ -42,6 +42,9 @@ static int tls_parse_certificate_authori
|
||||||
#ifndef OPENSSL_NO_SRP
|
#ifndef OPENSSL_NO_SRP
|
||||||
static int init_srp(SSL *s, unsigned int context);
|
static int init_srp(SSL *s, unsigned int context);
|
||||||
#endif
|
#endif
|
||||||
|
+#ifndef OPENSSL_NO_EC
|
||||||
+static int init_ec_point_formats(SSL *s, unsigned int context);
|
+static int init_ec_point_formats(SSL *s, unsigned int context);
|
||||||
|
+#endif
|
||||||
static int init_etm(SSL *s, unsigned int context);
|
static int init_etm(SSL *s, unsigned int context);
|
||||||
static int init_ems(SSL *s, unsigned int context);
|
static int init_ems(SSL *s, unsigned int context);
|
||||||
static int final_ems(SSL *s, unsigned int context, int sent);
|
static int final_ems(SSL *s, unsigned int context, int sent);
|
||||||
@ -18,10 +20,11 @@ diff -up openssl-1.1.1k/ssl/statem/extensions.c.cleanup-reneg openssl-1.1.1k/ssl
|
|||||||
tls_construct_stoc_ec_pt_formats, tls_construct_ctos_ec_pt_formats,
|
tls_construct_stoc_ec_pt_formats, tls_construct_ctos_ec_pt_formats,
|
||||||
final_ec_pt_formats
|
final_ec_pt_formats
|
||||||
},
|
},
|
||||||
@@ -1164,6 +1165,15 @@ static int init_srp(SSL *s, unsigned int
|
@@ -1164,6 +1165,17 @@ static int init_srp(SSL *s, unsigned int
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
+#ifndef OPENSSL_NO_EC
|
||||||
+static int init_ec_point_formats(SSL *s, unsigned int context)
|
+static int init_ec_point_formats(SSL *s, unsigned int context)
|
||||||
+{
|
+{
|
||||||
+ OPENSSL_free(s->ext.peer_ecpointformats);
|
+ OPENSSL_free(s->ext.peer_ecpointformats);
|
||||||
@ -30,6 +33,7 @@ diff -up openssl-1.1.1k/ssl/statem/extensions.c.cleanup-reneg openssl-1.1.1k/ssl
|
|||||||
+
|
+
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
|
+#endif
|
||||||
+
|
+
|
||||||
static int init_etm(SSL *s, unsigned int context)
|
static int init_etm(SSL *s, unsigned int context)
|
||||||
{
|
{
|
14
openssl-1.1.1-ignore-bound.patch
Normal file
14
openssl-1.1.1-ignore-bound.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Do not return failure when setting version bound on fixed protocol
|
||||||
|
version method.
|
||||||
|
diff -up openssl-1.1.1-pre8/ssl/statem/statem_lib.c.ignore-bound openssl-1.1.1-pre8/ssl/statem/statem_lib.c
|
||||||
|
--- openssl-1.1.1-pre8/ssl/statem/statem_lib.c.ignore-bound 2018-06-20 16:48:13.000000000 +0200
|
||||||
|
+++ openssl-1.1.1-pre8/ssl/statem/statem_lib.c 2018-08-13 11:07:52.826304045 +0200
|
||||||
|
@@ -1595,7 +1595,7 @@ int ssl_set_version_bound(int method_ver
|
||||||
|
* methods are not subject to controls that disable individual protocol
|
||||||
|
* versions.
|
||||||
|
*/
|
||||||
|
- return 0;
|
||||||
|
+ return 1;
|
||||||
|
|
||||||
|
case TLS_ANY_VERSION:
|
||||||
|
if (version < SSL3_VERSION || version > TLS_MAX_VERSION)
|
@ -22,7 +22,7 @@
|
|||||||
Summary: Utilities from the general purpose cryptography library with TLS implementation
|
Summary: Utilities from the general purpose cryptography library with TLS implementation
|
||||||
Name: openssl
|
Name: openssl
|
||||||
Version: 1.1.1k
|
Version: 1.1.1k
|
||||||
Release: 14%{?dist}
|
Release: 12%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
# We have to remove certain patented algorithms from the openssl source
|
# We have to remove certain patented algorithms from the openssl source
|
||||||
# tarball with the hobble-openssl script which is included below.
|
# tarball with the hobble-openssl script which is included below.
|
||||||
@ -99,9 +99,6 @@ Patch107: openssl-1.1.1-cve-2023-5678.patch
|
|||||||
# Backport from OpenSSL 3.2/RHEL 9
|
# Backport from OpenSSL 3.2/RHEL 9
|
||||||
# Proper fix for CVE-2020-25659
|
# Proper fix for CVE-2020-25659
|
||||||
Patch108: openssl-1.1.1-pkcs1-implicit-rejection.patch
|
Patch108: openssl-1.1.1-pkcs1-implicit-rejection.patch
|
||||||
# Backport from OpenSSL 3.2
|
|
||||||
# Fix for CVE-2024-5535
|
|
||||||
Patch109: openssl-1.1.1-fix-ssl-select-next-proto.patch
|
|
||||||
|
|
||||||
License: OpenSSL and ASL 2.0
|
License: OpenSSL and ASL 2.0
|
||||||
URL: http://www.openssl.org/
|
URL: http://www.openssl.org/
|
||||||
@ -235,7 +232,6 @@ cp %{SOURCE13} test/
|
|||||||
%patch106 -p1 -b .cve-2023-3817
|
%patch106 -p1 -b .cve-2023-3817
|
||||||
%patch107 -p1 -b .cve-2023-5678
|
%patch107 -p1 -b .cve-2023-5678
|
||||||
%patch108 -p1 -b .pkcs15imprejection
|
%patch108 -p1 -b .pkcs15imprejection
|
||||||
%patch109 -p1 -b .cve-2024-5535
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Figure out which flags we want to use.
|
# Figure out which flags we want to use.
|
||||||
@ -519,52 +515,49 @@ export LD_LIBRARY_PATH
|
|||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Sep 17 2024 Maurizio Barbaro <mbarbaro@redhat.com> - 1:1.1.1k-14
|
|
||||||
- Backport fix SSL_select_next proto from OpenSSL 3.2
|
|
||||||
Fix CVE-2024-5535
|
|
||||||
Resolves: RHEL-45654
|
|
||||||
|
|
||||||
* Thu Nov 30 2023 Dmitry Belyavskiy <dbelyavs@redhat.com> - 1:1.1.1k-12
|
* Thu Nov 30 2023 Dmitry Belyavskiy <dbelyavs@redhat.com> - 1:1.1.1k-12
|
||||||
- Backport implicit rejection mechanism for RSA PKCS#1 v1.5 to RHEL-8 series
|
- Backport implicit rejection mechanism for RSA PKCS#1 v1.5 to RHEL-8 series
|
||||||
(a proper fix for CVE-2020-25659)
|
(a proper fix for CVE-2020-25659)
|
||||||
Resolves: RHEL-17694
|
Resolves: RHEL-17696
|
||||||
|
|
||||||
* Wed Nov 15 2023 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-11
|
* Wed Nov 15 2023 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-11
|
||||||
- Fix CVE-2023-5678: Generating excessively long X9.42 DH keys or checking
|
- Fix CVE-2023-5678: Generating excessively long X9.42 DH keys or checking
|
||||||
excessively long X9.42 DH keys or parameters may be very slow
|
excessively long X9.42 DH keys or parameters may be very slow
|
||||||
Resolves: RHEL-16536
|
Resolves: RHEL-16538
|
||||||
|
|
||||||
* Thu Oct 19 2023 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-10
|
* Thu Oct 19 2023 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-10
|
||||||
- Fix CVE-2023-3446: Excessive time spent checking DH keys and parameters
|
- Fix CVE-2023-3446: Excessive time spent checking DH keys and parameters
|
||||||
Resolves: RHEL-14243
|
Resolves: RHEL-14245
|
||||||
- Fix CVE-2023-3817: Excessive time spent checking DH q parameter value
|
- Fix CVE-2023-3817: Excessive time spent checking DH q parameter value
|
||||||
Resolves: RHEL-14237
|
Resolves: RHEL-14239
|
||||||
|
|
||||||
* Thu May 04 2023 Dmitry Belyavskiy <dbelyavs@redhat.com> - 1:1.1.1k-9
|
* Wed Feb 08 2023 Dmitry Belyavskiy <dbelyavs@redhat.com> - 1:1.1.1k-9
|
||||||
- Fixed Timing Oracle in RSA Decryption
|
- Fixed Timing Oracle in RSA Decryption
|
||||||
Resolves: CVE-2022-4304
|
Resolves: CVE-2022-4304
|
||||||
- Fixed Double free after calling PEM_read_bio_ex
|
- Fixed Double free after calling PEM_read_bio_ex
|
||||||
Resolves: CVE-2022-4450
|
Resolves: CVE-2022-4450
|
||||||
- Fixed Use-after-free following BIO_new_NDEF
|
- Fixed Use-after-free following BIO_new_NDEF
|
||||||
Resolves: CVE-2023-0215
|
Resolves: CVE-2023-0215
|
||||||
|
|
||||||
* Wed Feb 08 2023 Dmitry Belyavskiy <dbelyavs@redhat.com> - 1:1.1.1k-8
|
|
||||||
- Fixed X.400 address type confusion in X.509 GeneralName
|
- Fixed X.400 address type confusion in X.509 GeneralName
|
||||||
Resolves: CVE-2023-0286
|
Resolves: CVE-2023-0286
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Dmitry Belyavskiy <dbelyavs@redhat.com> - 1:1.1.1k-8
|
||||||
|
- Fix no-ec build
|
||||||
|
Resolves: rhbz#2071020
|
||||||
|
|
||||||
* Tue Jul 05 2022 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-7
|
* Tue Jul 05 2022 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-7
|
||||||
- Fix CVE-2022-2097: AES OCB fails to encrypt some bytes on 32-bit x86
|
- Fix CVE-2022-2097: AES OCB fails to encrypt some bytes on 32-bit x86
|
||||||
Resolves: CVE-2022-2097
|
Resolves: CVE-2022-2097
|
||||||
- Update expired certificates used in the testsuite
|
- Update expired certificates used in the testsuite
|
||||||
Resolves: rhbz#2100554
|
Resolves: rhbz#2092462
|
||||||
- Fix CVE-2022-1292: openssl: c_rehash script allows command injection
|
- Fix CVE-2022-1292: openssl: c_rehash script allows command injection
|
||||||
Resolves: rhbz#2090371
|
Resolves: rhbz#2090372
|
||||||
- Fix CVE-2022-2068: the c_rehash script allows command injection
|
- Fix CVE-2022-2068: the c_rehash script allows command injection
|
||||||
Resolves: rhbz#2098278
|
Resolves: rhbz#2098279
|
||||||
|
|
||||||
* Wed Mar 23 2022 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-6
|
* Wed Mar 23 2022 Clemens Lang <cllang@redhat.com> - 1:1.1.1k-6
|
||||||
- Fixes CVE-2022-0778 openssl: Infinite loop in BN_mod_sqrt() reachable when parsing certificates
|
- Fixes CVE-2022-0778 openssl: Infinite loop in BN_mod_sqrt() reachable when parsing certificates
|
||||||
- Resolves: rhbz#2067145
|
- Resolves: rhbz#2067146
|
||||||
|
|
||||||
* Tue Nov 16 2021 Sahana Prasad <sahana@redhat.com> - 1:1.1.1k-5
|
* Tue Nov 16 2021 Sahana Prasad <sahana@redhat.com> - 1:1.1.1k-5
|
||||||
- Fixes CVE-2021-3712 openssl: Read buffer overruns processing ASN.1 strings
|
- Fixes CVE-2021-3712 openssl: Read buffer overruns processing ASN.1 strings
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (openssl-1.1.1k-hobbled.tar.xz) = dd48b6200bcda1938c362888789bf0dbac7dbcc80b15a32794e25f6cbe8f727b6f8d1302a2bc43708da79124db9e5a5d27446ec1c91cf1e270aba1d8664d65d8
|
63
tests/simple-rsapss-test/Makefile
Normal file
63
tests/simple-rsapss-test/Makefile
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /CoreOS/openssl/Sanity/simple-rsapss-test
|
||||||
|
# Description: Test if RSA-PSS signature scheme is supported
|
||||||
|
# Author: Hubert Kario <hkario@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/CoreOS/openssl/Sanity/simple-rsapss-test
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
-include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Hubert Kario <hkario@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Test if RSA-PSS signature scheme is supported" >> $(METADATA)
|
||||||
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
|
@echo "TestTime: 1m" >> $(METADATA)
|
||||||
|
@echo "RunFor: openssl" >> $(METADATA)
|
||||||
|
@echo "Requires: openssl man man-db" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
3
tests/simple-rsapss-test/PURPOSE
Normal file
3
tests/simple-rsapss-test/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE of /CoreOS/openssl/Sanity/simple-rsapss-test
|
||||||
|
Description: Test if RSA-PSS signature scheme is supported
|
||||||
|
Author: Hubert Kario <hkario@redhat.com>
|
74
tests/simple-rsapss-test/runtest.sh
Executable file
74
tests/simple-rsapss-test/runtest.sh
Executable file
@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /CoreOS/openssl/Sanity/simple-rsapss-test
|
||||||
|
# Description: Test if RSA-PSS signature scheme is supported
|
||||||
|
# Author: Hubert Kario <hkario@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
PACKAGE="openssl"
|
||||||
|
|
||||||
|
PUB_KEY="rsa_pubkey.pem"
|
||||||
|
PRIV_KEY="rsa_key.pem"
|
||||||
|
FILE="text.txt"
|
||||||
|
SIG="text.sig"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlRun "openssl genrsa -out $PRIV_KEY 2048" 0 "Generate RSA key"
|
||||||
|
rlRun "openssl rsa -in $PRIV_KEY -out $PUB_KEY -pubout" 0 "Split the public key from private key"
|
||||||
|
rlRun "echo 'sign me!' > $FILE" 0 "Create file for signing"
|
||||||
|
rlAssertExists $FILE
|
||||||
|
rlAssertExists $PRIV_KEY
|
||||||
|
rlAssertExists $PUB_KEY
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Test RSA-PSS padding mode"
|
||||||
|
set -o pipefail
|
||||||
|
rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:32 -out $SIG -sign $PRIV_KEY $FILE" 0 "Sign the file"
|
||||||
|
rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:32 -prverify $PRIV_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using the private key file"
|
||||||
|
rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:32 -verify $PUB_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using public key file"
|
||||||
|
rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -prverify $PRIV_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using the private key file without specifying salt length"
|
||||||
|
rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -verify $PUB_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using public key file without specifying salt length"
|
||||||
|
set +o pipefail
|
||||||
|
rlRun "sed -i 's/sign/Sign/' $FILE" 0 "Modify signed file"
|
||||||
|
rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -verify $PUB_KEY -signature $SIG $FILE | grep 'Verification Failure'" 0 "Verify that the signature is no longer valid"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Documentation check"
|
||||||
|
[ -e "$(rpm -ql openssl | grep dgst)"] && rlRun "man dgst | col -b | grep -- -sigopt" 0 "Check if -sigopt option is described in man page"
|
||||||
|
rlRun "openssl dgst -help 2>&1 | grep -- -sigopt" 0 "Check if -sigopt option is present in help message"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
15
tests/tests.yml
Normal file
15
tests/tests.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
# This first play always runs on the local staging system
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-beakerlib
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
- container
|
||||||
|
tests:
|
||||||
|
- simple-rsapss-test
|
||||||
|
required_packages:
|
||||||
|
- findutils # beakerlib needs find command
|
||||||
|
- man # needed by simple-rsapss-test
|
||||||
|
- man-db # needed by simple-rsapss-test
|
||||||
|
- openssl # needed by simple-rsapss-test
|
Loading…
Reference in New Issue
Block a user