OpenSSL Security Advisory [corrected CVE id]

2024-05-16 Thread Tomas Mraz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

OpenSSL Security Advisory [16th May 2024]
=

Excessive time spent checking DSA keys and parameters (CVE-2024-4603)
=

Severity: Low

Issue summary: Checking excessively long DSA keys or parameters may be very
slow.

Impact summary: Applications that use the functions EVP_PKEY_param_check()
or EVP_PKEY_public_check() to check a DSA public key or DSA parameters may
experience long delays. Where the key or parameters that are being checked
have been obtained from an untrusted source this may lead to a Denial of
Service.

The functions EVP_PKEY_param_check() or EVP_PKEY_public_check() perform
various checks on DSA parameters. Some of those computations take a long time
if the modulus ("p" parameter) is too large.

Trying to use a very large modulus is slow and OpenSSL will not allow using
public keys with a modulus which is over 10,000 bits in length for signature
verification. However the key and parameter check functions do not limit
the modulus size when performing the checks.

An application that calls EVP_PKEY_param_check() or EVP_PKEY_public_check()
and supplies a key or parameters obtained from an untrusted source could be
vulnerable to a Denial of Service attack.

These functions are not called by OpenSSL itself on untrusted DSA keys so
only applications that directly call these functions may be vulnerable.

Also vulnerable are the OpenSSL pkey and pkeyparam command line applications
when using the "-check" option.

The OpenSSL SSL/TLS implementation is not affected by this issue.

The OpenSSL 3.0 and 3.1 FIPS providers are affected by this issue.

OpenSSL 3.3, 3.2, 3.1 and 3.0 are vulnerable to this issue.

OpenSSL 1.1.1 and 1.0.2 are not affected by this issue.

Due to the low severity of this issue we are not issuing new releases of
OpenSSL at this time. The fix will be included in the next releases when they
become available. The fix is also available in commit 53ea0648 (for 3.3),
commit da343d06 (for 3.2), commit 9c39b385 (for 3.1) and commit 3559e868
(for 3.0) in the OpenSSL git repository.

OSSfuzz first detected and automatically reported this issue on 13th February
2024 using a fuzzer recently added to OpenSSL written by Kurt Roeckx. The fix
was developed by Tomas Mraz.

General Advisory Notes
==

URL for this Security Advisory:
https://www.openssl.org/news/secadv/20240516.txt

Note: the online version of the advisory may be updated with additional details
over time.

For details of OpenSSL severity classifications please see:
https://www.openssl.org/policies/secpolicy.html
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEE3HAyZir4heL0fyQ/UnRmohynnm0FAmZGLbUACgkQUnRmohyn
nm27iRAAkvc/HNdfAY3l6kBJ2GVUbvPLODxFhzpei5DW1JxUojQwPXe3cXZlBs9D
PDtw85WX4IPULvcrq7BeGxOs4hDR1xkUfzr/5b0t7a9olFy1oYE/and0qpQx3AzP
eS7O9b001ssXtAs43aO6S4H0L5+3lRXPnLhyDfeh4odty4fbSIP8apLXtmaTKt6P
hdm+JLJdrx92aKjraKBcc1YKl2HgCBNRsxBnimKJzZGZVokUZsF0mIZ/G1SZVs0J
W4usEF1JuRD2vAUWcSDU92tZd0Bkz55SjVC7NVPqvqSUAo04f3LhZj1c7rMjSD5p
zjbG6c4PiCC08LRCHRtZUu56Kp1tBYy+X7zZrzDiPF1R/TY9pYYA1JKS6EvbBb/d
8IB3cxeeTzW0StnuxKmOchrMsGJtizh9hGIhy7yzjbQ8oMkhcRsUlbZDQwiHvCUk
qgXP2v0pnqBmVEBfqCBvUOKAy19XMVOUH69JBsuMEPIKzx2k7Y5QvVKZNq3DtboA
lOc0zkfLbtXrNZFDUDqpq2megmVbVlTw619NQE51jN/LPzo7b+fdw1cHTTnQE2Gt
rSQYZnklb0fmfQQJOl4HpCK16SfVebPYU4hRDJ1Yqk6jcClFbit1F7Fz6Ypjv4nM
iTOJAAoat2jQhmqg2VTpuUQGjRMAADvKlpABL4dTYCvJv6RMXTk=
=Efz1
-END PGP SIGNATURE-


OpenSSL Security Advisory

2024-05-16 Thread Tomas Mraz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

OpenSSL Security Advisory [16th May 2024]
=

Excessive time spent checking DSA keys and parameters (CVE-2023-3446)
=

Severity: Low

Issue summary: Checking excessively long DSA keys or parameters may be very
slow.

Impact summary: Applications that use the functions EVP_PKEY_param_check()
or EVP_PKEY_public_check() to check a DSA public key or DSA parameters may
experience long delays. Where the key or parameters that are being checked
have been obtained from an untrusted source this may lead to a Denial of
Service.

The functions EVP_PKEY_param_check() or EVP_PKEY_public_check() perform
various checks on DSA parameters. Some of those computations take a long time
if the modulus ("p" parameter) is too large.

Trying to use a very large modulus is slow and OpenSSL will not allow using
public keys with a modulus which is over 10,000 bits in length for signature
verification. However the key and parameter check functions do not limit
the modulus size when performing the checks.

An application that calls EVP_PKEY_param_check() or EVP_PKEY_public_check()
and supplies a key or parameters obtained from an untrusted source could be
vulnerable to a Denial of Service attack.

These functions are not called by OpenSSL itself on untrusted DSA keys so
only applications that directly call these functions may be vulnerable.

Also vulnerable are the OpenSSL pkey and pkeyparam command line applications
when using the "-check" option.

The OpenSSL SSL/TLS implementation is not affected by this issue.

The OpenSSL 3.0 and 3.1 FIPS providers are affected by this issue.

OpenSSL 3.3, 3.2, 3.1 and 3.0 are vulnerable to this issue.

OpenSSL 1.1.1 and 1.0.2 are not affected by this issue.

Due to the low severity of this issue we are not issuing new releases of
OpenSSL at this time. The fix will be included in the next releases when they
become available. The fix is also available in commit 53ea0648 (for 3.3),
commit da343d06 (for 3.2), commit 9c39b385 (for 3.1) and commit 3559e868
(for 3.0) in the OpenSSL git repository.

OSSfuzz first detected and automatically reported this issue on 13th February
2024 using a fuzzer recently added to OpenSSL written by Kurt Roeckx. The fix
was developed by Tomas Mraz.

General Advisory Notes
==

URL for this Security Advisory:
https://www.openssl.org/news/secadv/20240516.txt

Note: the online version of the advisory may be updated with additional details
over time.

For details of OpenSSL severity classifications please see:
https://www.openssl.org/policies/secpolicy.html
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEE3HAyZir4heL0fyQ/UnRmohynnm0FAmZGJOMACgkQUnRmohyn
nm3/cg/+JJtAXf0cyAEoDbPX3mTygHN1U3dqpCVFPMwYi23Bqce33wqXrXZqBxsF
m9IM3KRFHsdoArt1q1WWPGpMGLVColq56JwkjGzpaKjooLrb0cEbt6vKp5oepUCW
cv1ieLF5Z5dvYrWfgiO1mu5r88SY6OLCmxJdPIWMgTrgd1+h7AtzGF+olTgLHovp
qEQUNhCYax6RLaFtqcPY6eHuxlH6ARuERPJaPxasv6bPi8VQfYQ349G7ks4adgw9
b0I0qt/wZuGa0p/rpZ99Ev1VAFo9iOxcB8Vftm4nQzBfjCsieKcX+cM7aTnLPUjR
RFr/KmAGY9RcRFOI6UT2xemLP5xb4A3/wgeLjdPbWDeZ5eBe2nvOE07ndHZYxQIC
AxTMVFlWgcVpu2bDEHuhiNvYMW+AZYAfsN2jEOBl13SjN4ty9uLt/KMtM0Dp7p0J
KiDTTaGgX3jlEUt6gy/X314rEeCn5rNrupOfeQNPKnzdlInjP0yKvxF/boXDfQa3
KM7Sp+eZb674n2c83CuUPVfdIF2jmzm6VdB8a4zIAYoiPyw0HljayzPhAuUBhgOO
Q9nrooNs3+aZm/UXEcs0V0X+LPz7+w22z3aQ220sRYuQuZYNkvEfRi+yRzkqqoPd
0Bs7VAdzs6WryLWabkRmfTFagQ9UT9LtXsR+7h6P0By3ps8MaaU=
=DJFm
-END PGP SIGNATURE-


Re: OpenSSL version 3.3.0 published

2024-05-16 Thread Neil Horman
Glad its working a bit better for you.  If you are inclined, please feel
free to open a PR with your changes for review.

Best
Neil


On Thu, May 16, 2024 at 7:40 AM Dennis Clarke  wrote:

> On 5/15/24 18:34, Neil Horman wrote:
> > You are correct, the files you reference (most of them in fact) get built
> > into separate objects in the event the build flags are different for
> shared
> > and static libraries, and should be unrelated to the issue you are seeing
> >
>
>  I was somewhat puzzled by this also. Yes.
>
> > As for the undefined symbols, thats definitely a mystery.  most notably,
> > the symbols referenced are internal.  That is to say they shouldn't be
> > exported in the symbol table for libssl.so (though a quick look with
> > objectdump shows they are, which may be a separate issue)
> >
> > Looking at the sources, I can see what _might_ be happening
> >
> > cert_comp_tests.c includes "../ssl/ssl_local.h"
> > if quic is enabled (i.e. OPENSSL_NO_QUIC is undefined), ssl_local.h
> > includes quic/quic_local.h
> > quic_local.h includes internal/quic_txp.h
> > quic_txp.h includes internal/quic_stream_map.h
> > quic_stream_map.h defines a static inline function
> > named ossl_quic_stream_recv_get_final_size which calls
> > ossl_quic_rxfc_get_final_size, which in turn
> > calls ossl_quic_rxfc_get_final_size
> >
> > I'm guessing the other symbols have simmilar patterns.
> >
>
>  I am still digging into the issue.
>  I thank you the thoughtful reply.
>
>
> > As to why its happening my first guess would be that more recent
> compilers
> > like gcc and clang do lazy symbol resolution, only resolving a
> subordonate
> > symbol, when its calling parent is found to be used.  Given
> > ossl_quic_stream_recv_get_final_size isn't called anywhere in
> > comp_stream_test.c, the compiler disposes of the symbol prior to any need
> > to resolve its called symbols, and so everything is ok.
> >
>
>  I also suspect a linker issue here and the sad fact is that the GNU
>   ld just will not suffice in this server. C'est la vie ici.
>
>
> > conversely (again, I'm guessing here) the solaris 5.10 compiler likely
> take
> > a more bulldozer-ish approach, leaving everything in the object file and
> > only stripping symbols after all resolutions are complete, leading to the
> > missing symbols error, despite its not being needed.
> >
>
>  I have to laugh at the "bulldozer" idea as you are likely quite
> correct there.
>
>
> > As to what to do about this...I'm unsure.  The quick hack I would imagine
> > would be to move the definition of ossl_quic_stream_recv_get_final_size
> > into a c file (likely quic_stream_map.c) and just declare a prototype in
> > the quic_stream_map.h header, so as to avoid the unneeded symbol
> > resolution.  You would have to lather rinse  repeat with the other
> missing
> > symbols of course.
> >
> > As to your prior question about how long the ability to support SunOS
> will
> > last, well, unfortunately I don't think any of us can say.  I believe the
> > platoform you are building on is on our unadpoted platform list:
> > https://www.openssl.org/policies/general-supplemental/platforms.html
> >
> > And while we endeavor to keep openssl building on as many platforms as
> > possible, its not feasible to cover all the currently
> > unmaintained platforms.  You do have some agency here however. If you are
> > willing and interested, you could volunteer to be a community platform
> > maintainer for your target platform.  This would entail you building
> > openssl on your adopted platform, and running the test suite routinely,
> > reporting bugs and fixing errors as they occur.  Its not a small amount
> of
> > work, but it would be a significant contribution toward ensuring that
> > openssl stays viable on the targets you need.
> >
> I can tell you that this morning I see :
>
> .
> .
> .
> All tests successful.
> Files=312, Tests=3182, 6714 wallclock secs (25.22 usr  3.10 sys +
> 6370.32 cusr 170.55 csys = 6569.19 CPU)
> Result: PASS
> `test' is up to date.
>
> hubble $ pwd
> /opt/bw/build/openssl-3.3.0_SunOS_5.10_SPARC64.005
>
> hubble $
> hubble $ psrinfo -pv
> The physical processor has 8 virtual processors (0-7)
>SPARC64-VII+ (portid 1024 impl 0x7 ver 0xa1 clock 2860 MHz)
> hubble $
> hubble $ uname -a
> SunOS hubble 5.10 Generic_150400-67 sun4u sparc SUNW,SPARC-Enterprise
> hubble $
>
> hubble $ hash -r
> hubble $ which openssl
> /opt/bw/bin/openssl
> hubble $
>
> hubble $ ldd /opt/bw/bin/openssl
>  libssl.so.3 =>   /opt/bw/lib/libssl.so.3
>  libcrypto.so.3 =>/opt/bw/lib/libcrypto.so.3
>  libsocket.so.1 =>/lib/64/libsocket.so.1
>  libnsl.so.1 =>   /lib/64/libnsl.so.1
>  libdl.so.1 =>/lib/64/libdl.so.1
>  librt.so.1 =>/lib/64/librt.so.1
>  libstatomic.so.1 =>  /opt/bw/lib/libstatomic.so.1
>  libc.so.1 => /lib/64/libc.so.1
>  libmp.so.2 =>/lib/64/libmp.so.2
>  libmd.s

Re: OpenSSL version 3.3.0 published

2024-05-16 Thread Dennis Clarke via openssl-users

On 5/15/24 18:34, Neil Horman wrote:

You are correct, the files you reference (most of them in fact) get built
into separate objects in the event the build flags are different for shared
and static libraries, and should be unrelated to the issue you are seeing



I was somewhat puzzled by this also. Yes.


As for the undefined symbols, thats definitely a mystery.  most notably,
the symbols referenced are internal.  That is to say they shouldn't be
exported in the symbol table for libssl.so (though a quick look with
objectdump shows they are, which may be a separate issue)

Looking at the sources, I can see what _might_ be happening

cert_comp_tests.c includes "../ssl/ssl_local.h"
if quic is enabled (i.e. OPENSSL_NO_QUIC is undefined), ssl_local.h
includes quic/quic_local.h
quic_local.h includes internal/quic_txp.h
quic_txp.h includes internal/quic_stream_map.h
quic_stream_map.h defines a static inline function
named ossl_quic_stream_recv_get_final_size which calls
ossl_quic_rxfc_get_final_size, which in turn
calls ossl_quic_rxfc_get_final_size

I'm guessing the other symbols have simmilar patterns.



I am still digging into the issue.
I thank you the thoughtful reply.



As to why its happening my first guess would be that more recent compilers
like gcc and clang do lazy symbol resolution, only resolving a subordonate
symbol, when its calling parent is found to be used.  Given
ossl_quic_stream_recv_get_final_size isn't called anywhere in
comp_stream_test.c, the compiler disposes of the symbol prior to any need
to resolve its called symbols, and so everything is ok.



I also suspect a linker issue here and the sad fact is that the GNU
 ld just will not suffice in this server. C'est la vie ici.



conversely (again, I'm guessing here) the solaris 5.10 compiler likely take
a more bulldozer-ish approach, leaving everything in the object file and
only stripping symbols after all resolutions are complete, leading to the
missing symbols error, despite its not being needed.



I have to laugh at the "bulldozer" idea as you are likely quite 
correct there.




As to what to do about this...I'm unsure.  The quick hack I would imagine
would be to move the definition of ossl_quic_stream_recv_get_final_size
into a c file (likely quic_stream_map.c) and just declare a prototype in
the quic_stream_map.h header, so as to avoid the unneeded symbol
resolution.  You would have to lather rinse  repeat with the other missing
symbols of course.

As to your prior question about how long the ability to support SunOS will
last, well, unfortunately I don't think any of us can say.  I believe the
platoform you are building on is on our unadpoted platform list:
https://www.openssl.org/policies/general-supplemental/platforms.html

And while we endeavor to keep openssl building on as many platforms as
possible, its not feasible to cover all the currently
unmaintained platforms.  You do have some agency here however. If you are
willing and interested, you could volunteer to be a community platform
maintainer for your target platform.  This would entail you building
openssl on your adopted platform, and running the test suite routinely,
reporting bugs and fixing errors as they occur.  Its not a small amount of
work, but it would be a significant contribution toward ensuring that
openssl stays viable on the targets you need.


I can tell you that this morning I see :

.
.
.
All tests successful.
Files=312, Tests=3182, 6714 wallclock secs (25.22 usr  3.10 sys + 
6370.32 cusr 170.55 csys = 6569.19 CPU)

Result: PASS
`test' is up to date.

hubble $ pwd
/opt/bw/build/openssl-3.3.0_SunOS_5.10_SPARC64.005

hubble $
hubble $ psrinfo -pv
The physical processor has 8 virtual processors (0-7)
  SPARC64-VII+ (portid 1024 impl 0x7 ver 0xa1 clock 2860 MHz)
hubble $
hubble $ uname -a
SunOS hubble 5.10 Generic_150400-67 sun4u sparc SUNW,SPARC-Enterprise
hubble $

hubble $ hash -r
hubble $ which openssl
/opt/bw/bin/openssl
hubble $

hubble $ ldd /opt/bw/bin/openssl
libssl.so.3 =>   /opt/bw/lib/libssl.so.3
libcrypto.so.3 =>/opt/bw/lib/libcrypto.so.3
libsocket.so.1 =>/lib/64/libsocket.so.1
libnsl.so.1 =>   /lib/64/libnsl.so.1
libdl.so.1 =>/lib/64/libdl.so.1
librt.so.1 =>/lib/64/librt.so.1
libstatomic.so.1 =>  /opt/bw/lib/libstatomic.so.1
libc.so.1 => /lib/64/libc.so.1
libmp.so.2 =>/lib/64/libmp.so.2
libmd.so.1 =>/lib/64/libmd.so.1
libscf.so.1 =>   /lib/64/libscf.so.1
libaio.so.1 =>   /lib/64/libaio.so.1
libdoor.so.1 =>  /lib/64/libdoor.so.1
libuutil.so.1 => /lib/64/libuutil.so.1
libgen.so.1 =>   /lib/64/libgen.so.1
libm.so.2 => /lib/64/libm.so.2
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
hubble $ /opt/bw/bin/openssl version
OpenSSL 3.3.0 9 Apr 2024 (Library: OpenSSL 3.3.0 9 Apr 202