Commit Graph

85 Commits

Author SHA1 Message Date
Thomas Perale
0ec6cf7f69 package/libopenssl: bump to v3.4.2
For more information, see:
 - https://github.com/openssl/openssl/releases/tag/openssl-3.4.2
 - https://github.com/openssl/openssl/compare/openssl-3.4.1...openssl-3.4.2

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-08-07 11:07:00 +02:00
Peter Korsgaard
1f07498068 Revert "package/libopenssl do not build in parallel"
This reverts commit 27ab880ebb.

With the (proposed) fix from the openssl developers added as
0004-Serialize-install-process-to-avoid-multiple-make-dep.patch, the
workaround can now be dropped so openssl can again be built and installed in
parallel, significantly speeding up builds.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 86f173a744)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-04-16 11:32:32 +02:00
Peter Korsgaard
f60abbcef8 package/libopenssl: add (proposed) upstream fix for parallel installation
The openssl developers have proposed a fix for the parallel installation
issue worked around by commit 27ab880ebb (package/libopenssl do not build
in parallel).

Add the fix here so the workaround can dropped again.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 36b0a3ef9c)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-04-16 11:32:30 +02:00
Yann E. MORIN
27ab880ebb package/libopenssl do not build in parallel
With highly parallel builds on a heavily loaded machine, the libopenssl
build often (about half of the time) fails with spurious missing rules
in its Makefile:

    >>> host-libopenssl 3.4.1 Installing to host directory
    [...] /usr/bin/make  -C [...]/build/host-libopenssl-3.4.1 install
    "/usr/bin/make" depend && "/usr/bin/make" _build_libs
    "/usr/bin/make" depend && "/usr/bin/make" _build_modules
    "/usr/bin/make" depend && "/usr/bin/make" _build_programs
    [...]
    make[3]: *** No rule to make target '_build_modules'.  Stop.
    make[2]: *** [Makefile:3159: build_modules] Error 2
    make[2]: *** Waiting for unfinished jobs....
    make[3]: Nothing to be done for '_build_programs'.
    make[3]: Nothing to be done for '_build_libs'.
    make[1]: *** [package/pkg-generic.mk:283: [...]/build/host-libopenssl-3.4.1/.stamp_host_installed] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [...]
    make: *** [Makefile:23: _all] Error 2

Ideally, we'd like to fix the issue. However, the Nakefile is generated
by the Configure script, written in perl, from the template in
Configurations/unix-Makefile.tmpl, which also uses some kind of special
(perl-related, probably) templating language. That makes it pretty
difficult to see what is going on, though, and nigh impossible to fix
without a deep understanding of the openssl buildsystem.

So, we can only disable parallel builds until the issue is fixed
upstream [0]. Add a comment to both build commands (host and target) to
reference the upstream issue report.

Note that the issue has mostly been observed in the build of the host
variant so far, but there is no reason why it can't happen in the build
of the target variant.

[0] https://github.com/openssl/openssl/issues/27074

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-03-17 18:32:11 +01:00
Peter Korsgaard
e11413a23e package/libopenssl: security bump to version 3.4.1
Fixes the following security issues:

CVE-2024-13176: Timing side-channel in ECDSA signature computation
https://openssl-library.org/news/vulnerabilities/index.html#CVE-2024-13176

CVE-2024-12797: RFC7250 handshakes with unauthenticated servers don't abort
as expected
https://openssl-library.org/news/vulnerabilities/index.html#CVE-2024-12797

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-11 19:12:17 +01:00
Bernd Kuhls
69588600e5 package/libopenssl: security bump version to 3.4.0
Release notes:
https://github.com/openssl/openssl/blob/openssl-3.4.0/NEWS.md#openssl-34

Fixes CVE-2024-6119:
https://openssl-library.org/news/vulnerabilities/index.html
c47d9d7ec8

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-27 19:14:00 +01:00
Dario Binacchi
d2f6d6da32 package/libopenssl: add new configuration options
The transition from version 1.1 to 3.0.9, and subsequently to 3.3.1,
added new compilation options. This led to a significant increase in the
size of the library. These options allow user to disable these features
to obtain a smaller library size.

To ensure backward compatibility, all items are selected by default.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-21 21:54:20 +02:00
Bernd Kuhls
8de200895c package/libopenssl: security bump version to 3.3.2
Fixes the following security issues:

- CVE-2024-6119: Possible denial of service in X.509 name checks [Moderate
  severity]
  https://openssl-library.org/news/secadv/20240903.txt

- CVE-2024-5535: SSL_select_next_proto buffer overread [Low severity]
  https://openssl-library.org/news/secadv/20240528.txt

Updated _SITE and project URL according to
https://openssl-library.org/post/2024-04-30-releases-distribution-changes/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Peter: add CVE details]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-05 08:04:28 +02:00
Dario Binacchi
1b6144a9ad package/libopenssl: update the patches to be applied with fuzz 0
This commit allows the package patches to be applied with fuzz factor 0.
The fuzz factor specifies how many lines of the patch can be inexactly
matched, so the value 0 requires all lines to be exactly matched.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-06-24 21:38:14 +02:00
Dario Binacchi
623d3bbe43 package/libopenssl: no-engine
Even though the "no-engine" option effectively disables the compilation
of the engine, it still creates the installation directory, which ends up
being empty. For this reason, the patch does not remove the hook for
removing the directory if the BR2_PACKAGE_LIBOPENSSL_ENGINES option is
not enabled.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-23 22:24:57 +02:00
Dario Binacchi
e0bdc5ddb8 package/libopenssl: use `no-apps' configuration option
With version 3.2.0 of OpenSSL, the "no-apps" configuration option was
added, which does not build apps, e.g. the openssl program. This is
handy for minimization. This option also disables tests.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-23 22:17:03 +02:00
Dario Binacchi
c2761b5266 package/libopenssl: use consistent logic
The patch expresses the same condition in positive logic, consistent
with what has been coded in other parts of the module and generally
in Buildroot.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-23 22:15:07 +02:00
Dario Binacchi
7f9291bfe4 package/libopenssl: replace engines-1.1 to engines-3
The bump to version 3.0.9 in commit 3c66f65a6a (package/libopenssl:
bump version to 3.0.9), and all subsequent updates, forgot to change
the directory name, which remained that of version 1.1. The patch
fixes the directory name to be consistent with the version.

In the case the library was not built with engine support, this resulted
in the presence of files in the root file system that should have been
removed.

Fixes: 3c66f65a6a
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-23 22:13:48 +02:00
Dario Binacchi
b39286acfc package/libopenssl: use $(RM) instead of rm
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-23 22:05:47 +02:00
Peter Seiderer
c3344a3a5f package/libopenssl: security bump to version 3.3.1
Fixes CVE-2024-4741 (for details see [1]).

[1] https://www.openssl.org/news/secadv/20240528.txt

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-06 10:55:29 +02:00
Bernd Kuhls
6d5ce8609f package/libopenssl: bump version to 3.3.0
Changelog: https://www.openssl.org/news/cl33.txt

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-05-02 09:46:34 +02:00
Peter Korsgaard
ce4d278739 package/libopenssl: security bump to version 3.2.1
And drop the now upstreamed patches.

Fixes the following (low severity) issues:

- CVE-2023-6129 POLY1305 MAC implementation corrupts vector registers on
  PowerPC
  https://www.openssl.org/news/secadv/20240109.txt

- CVE-2023-6237 Excessive time spent checking invalid RSA public keys
  https://www.openssl.org/news/secadv/20240115.txt

- CVE-2024-0727 PKCS12 Decoding crashes
  https://www.openssl.org/news/secadv/20240125.txt

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-02-11 22:43:00 +01:00
Martin Kurbanov
55c6ae5656 package/libopenssl: add patches fixing hangs asn1parse
The asn1parse command hangs forever on 3.2.0 when the genstr or genconf
option is passed.

This commit fixes the issue by adding upstream commits [1] [2].

[1] a552c23c65
[2] 749fcc0e3c

Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-07 19:51:23 +01:00
Fabrice Fontaine
98684ba788 package/libopenssl: fix build without MMU
Commit 973b1eba5a removed third patch
because of
78634e8ac2
however OPENSSL_NO_MADVISE wasn't updated to reflect the new
HAVE_MADVISE logic resulting in the following build failure without MMU:

/home/buildroot/autobuild/instance-2/output-1/host/riscv64-buildroot-linux-uclibc/bin/ld.real: libcrypto.a(libcrypto-lib-mem_sec.o): in function `sh_init':
/home/buildroot/autobuild/instance-2/output-1/build/libopenssl-3.2.0/crypto/mem_sec.c:557: undefined reference to `madvise'

Fixes:
 - http://autobuild.buildroot.org/results/4328c025f6f2bcd2ebc5a4368c78e00da0aea1ae

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-01-02 21:06:31 +01:00
Fabrice Fontaine
a5cacb6308 package/libopenssl: fix s390x build
Use linux64-s390x configure target to fix the following s390x build
failure raised since bump to version 3.2.0 in commit
973b1eba5a and
79040cf29e:

/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/s390x-buildroot-linux-gnu/13.2.0/../../../../s390x-buildroot-linux-gnu/bin/ld: libcrypto.a(libcrypto-lib-dh_key.o): in function `dh_bn_mod_exp':
dh_key.c:(.text+0x3c8): undefined reference to `s390x_mod_exp'
/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/s390x-buildroot-linux-gnu/13.2.0/../../../../s390x-buildroot-linux-gnu/bin/ld: libcrypto.a(libcrypto-lib-rsa_ossl.o): in function `rsa_ossl_s390x_mod_exp':
rsa_ossl.c:(.text+0xd2c): undefined reference to `s390x_crt'

Fixes:
 - http://autobuild.buildroot.org/results/77c5e13127de67a69782f138aa28c8b0ad951941

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-01-02 21:06:12 +01:00
Grant Nichol
fc8eff0c76 package/libopenssl: use riscv-specific configure target
Adds BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH for riscv32 and riscv64.
Otherwise, riscv targets fall back to the linux-generic libopenssl
configs. This exacerbates the issue partially addressed in
openssl/openssl#22871 which causes build failures.

Fixes a mispelling in upstream causing 0builds for riscv32 to fail when
linking.

Signed-off-by: Grant Nichol <me@grantnichol.com>
[yann.morin.1998@free.fr: squash the two commits together]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-12-23 11:39:37 +01:00
Bernd Kuhls
973b1eba5a package/libopenssl: bump version to 3.2.0
Release notes:
https://www.openssl.org/blog/blog/2023/11/23/OpenSSL32/

Removed patch 0001 and added no-docs configure option due to
956b4c75dc

Removed patch 0003 due to
78634e8ac2

Removed patch 0006 which is included in this release
e1b6ecbab4

Renumbered remaining patches.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-12-18 09:09:45 +01:00
Bernd Kuhls
c4006bff7c package/libopenssl: security bump version to 3.1.4
Fixes CVE-2023-5363:
https://www.openssl.org/news/secadv/20231024.txt
https://www.openssl.org/news/vulnerabilities.html

Changelog: https://www.openssl.org/news/cl31.txt

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-10-29 09:32:52 +01:00
Bernd Kuhls
fb8999f59b package/libopenssl: bump version to 3.1.3
Fixes CVE-2023-4807 (Windows-only):
https://www.openssl.org/news/vulnerabilities.html

Changelog: https://www.openssl.org/news/cl31.txt

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-09-24 12:24:23 +02:00
Adam Duskett
94d48acba3 package/libopenssl: bump version to 3.1.2
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-09-02 09:36:52 +02:00
Bernd Kuhls
fdbe83166f package/libopenssl: security bump version to 3.0.10
Fixes
CVE-2023-2975: https://www.openssl.org/news/secadv/20230714.txt
CVE-2023-3446: https://www.openssl.org/news/secadv/20230719.txt
CVE-2023-3817: https://www.openssl.org/news/secadv/20230731.txt

Changelog: https://www.openssl.org/news/cl30.txt

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-08-03 21:19:00 +02:00
Thomas Petazzoni
c4f4ae1f15 package/libopenssl: remove patch numbering within patch
Fixes:

  package/libopenssl/0006-Add-linux-x86-latomic-target.patch:4: generate your patches with 'git format-patch -N'

In:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/4763324039

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-28 22:09:56 +02:00
Bernd Kuhls
0ba58baca6 package/libopenssl: fix libatomic dependency for x86 builds
Fixes:
autobuild.buildroot.net/results/ba9/ba926fc27cf3d97274729b3ec1cadb3229bd3af3/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-28 21:22:03 +02:00
Bernd Kuhls
e930965f54 package/libopenssl: renumber patch
Commit ea3e60229b added a patch with a
wrong number.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-28 21:21:59 +02:00
Bernd Kuhls
b7644af3c0 package/libopenssl: update configure option for libatomic
Without this patch openssl adds -latomic twice to Libs.private in
libcrypto.pc:

cat output/per-package/opensc/host/arceb-buildroot-linux-uclibc/sysroot/usr/lib/pkgconfig/libcrypto.pc | grep atomic
Libs.private: -ldl -pthread -latomic -latomic

Instead of passing -latomic to Configure we use the target arch
"linux-latomic" which is provided by upstream since version 3.0.0
especially for libatomic handling:
535130c39d
cdf2986a70

To be noted: the build still fails for both bootlin-armv7m-uclibc and
bootlin-m68k-5208-uclibc, but this is not a regression due to this
patch, and is tracked as #15709.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-07-25 22:46:10 +02:00
Bernd Kuhls
ea3e60229b package/libopenssl: enable threads on static builds
Revert upstream commit as proposed on the upstream bugtracker.

Fixes:
http://autobuild.buildroot.net/results/b8e/b8efae5bf6ac3b51e8443951ef1dd88824af3f2b/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-22 23:24:25 +02:00
Bernd Kuhls
3ecf0baa74 package/libopenssl: remove deprecated options
Fixes configure warning:
***** Deprecated options: no-crypto-mdebug-backtrace, no-ssl2

no-ssl2 option was re-added in 2016:
e80381e1a3
"We warn that it's deprecated, and ignore it otherwise."
Quoting https://www.openssl.org/docs/man3.0/man3/SSLv23_method.html
"Support for SSLv2 [... was] removed in OpenSSL 1.1.0."
Therefore we do not need any legacy handling for
BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2.

no-crypto-mdebug-backtrace was removed in OpenSSL 3.0:
https://github.com/openssl/openssl/blob/master/NEWS.md?plain=1#L161

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-21 23:02:37 +02:00
Danny Wood
3c66f65a6a package/libopenssl: bump version to 3.0.9
Rebase patches onto new version

Remove 0005-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch,
0006-Add-support-for-io_pgetevents_time64-syscall.patch, and
0007-Fixup-support-for-io_pgetevents_time64-syscall.patch as these are
already applied upstream

Updated license after switch to Apache license:
https://www.openssl.org/blog/blog/2021/06/17/OpenSSL3.0ReleaseCandidate/

[Bernd: fixed license file/hash]

Signed-off-by: Danny Wood <danny@rotronics.co.uk>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Peter: update .checkpackageignore]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-07-15 16:39:28 +02:00
Bernd Kuhls
8ebfce3c70 package/ocf-linux: remove package
Fixes:
http://autobuild.buildroot.net/results/88b/88b5d14b315af1669fff04f8c11c321cc4c107c7/

The package seems to be unmaintainted, asking for support of kernels
>= 5.6 a year ago was unanswered:
https://sourceforge.net/p/ocf-linux/mailman/message/37662698/

This patch follow Thomas' suggestion to remove the package:
https://lists.buildroot.org/pipermail/buildroot/2022-November/654688.html

Remove the virtual package cryptodev which is not needed anymore.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-11 23:47:04 +02:00
Francois Perrad
2bcfcec502 package/libopenssl: security bump to version 1.1.1u
fix CVE-2023-2650  Possible DoS translating ASN.1 object identifiers

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-06-02 20:50:46 +02:00
Peter Seiderer
040896bd43 package/libopenssl: security bump to version 1.1.1t
Changelog (for details see [1] and [2]):

 Changes between 1.1.1s and 1.1.1t [7 Feb 2023]

  *) Fixed X.400 address type confusion in X.509 GeneralName.

     There is a type confusion vulnerability relating to X.400 address processing
     inside an X.509 GeneralName. X.400 addresses were parsed as an ASN1_STRING
     but subsequently interpreted by GENERAL_NAME_cmp as an ASN1_TYPE. This
     vulnerability may allow an attacker who can provide a certificate chain and
     CRL (neither of which need have a valid signature) to pass arbitrary
     pointers to a memcmp call, creating a possible read primitive, subject to
     some constraints. Refer to the advisory for more information. Thanks to
     David Benjamin for discovering this issue. (CVE-2023-0286)

     This issue has been fixed by changing the public header file definition of
     GENERAL_NAME so that x400Address reflects the implementation. It was not
     possible for any existing application to successfully use the existing
     definition; however, if any application references the x400Address field
     (e.g. in dead code), note that the type of this field has changed. There is
     no ABI change.
     [Hugo Landau]

  *) Fixed Use-after-free following BIO_new_NDEF.

     The public API function BIO_new_NDEF is a helper function used for
     streaming ASN.1 data via a BIO. It is primarily used internally to OpenSSL
     to support the SMIME, CMS and PKCS7 streaming capabilities, but may also
     be called directly by end user applications.

     The function receives a BIO from the caller, prepends a new BIO_f_asn1
     filter BIO onto the front of it to form a BIO chain, and then returns
     the new head of the BIO chain to the caller. Under certain conditions,
     for example if a CMS recipient public key is invalid, the new filter BIO
     is freed and the function returns a NULL result indicating a failure.
     However, in this case, the BIO chain is not properly cleaned up and the
     BIO passed by the caller still retains internal pointers to the previously
     freed filter BIO. If the caller then goes on to call BIO_pop() on the BIO
     then a use-after-free will occur. This will most likely result in a crash.
     (CVE-2023-0215)
     [Viktor Dukhovni, Matt Caswell]

  *) Fixed Double free after calling PEM_read_bio_ex.

     The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and
     decodes the "name" (e.g. "CERTIFICATE"), any header data and the payload
     data. If the function succeeds then the "name_out", "header" and "data"
     arguments are populated with pointers to buffers containing the relevant
     decoded data. The caller is responsible for freeing those buffers. It is
     possible to construct a PEM file that results in 0 bytes of payload data.
     In this case PEM_read_bio_ex() will return a failure code but will populate
     the header argument with a pointer to a buffer that has already been freed.
     If the caller also frees this buffer then a double free will occur. This
     will most likely lead to a crash.

     The functions PEM_read_bio() and PEM_read() are simple wrappers around
     PEM_read_bio_ex() and therefore these functions are also directly affected.

     These functions are also called indirectly by a number of other OpenSSL
     functions including PEM_X509_INFO_read_bio_ex() and
     SSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL
     internal uses of these functions are not vulnerable because the caller does
     not free the header argument if PEM_read_bio_ex() returns a failure code.
     (CVE-2022-4450)
     [Kurt Roeckx, Matt Caswell]

  *) Fixed Timing Oracle in RSA Decryption.

     A timing based side channel exists in the OpenSSL RSA Decryption
     implementation which could be sufficient to recover a plaintext across
     a network in a Bleichenbacher style attack. To achieve a successful
     decryption an attacker would have to be able to send a very large number
     of trial messages for decryption. The vulnerability affects all RSA padding
     modes: PKCS#1 v1.5, RSA-OEAP and RSASVE.
     (CVE-2022-4304)
     [Dmitry Belyavsky, Hubert Kario]

 Changes between 1.1.1r and 1.1.1s [1 Nov 2022]

  *) Fixed a regression introduced in 1.1.1r version not refreshing the
     certificate data to be signed before signing the certificate.
     [Gibeom Gwon]

 Changes between 1.1.1q and 1.1.1r [11 Oct 2022]

  *) Fixed the linux-mips64 Configure target which was missing the
     SIXTY_FOUR_BIT bn_ops flag. This was causing heap corruption on that
     platform.
     [Adam Joseph]

  *) Fixed a strict aliasing problem in bn_nist. Clang-14 optimisation was
     causing incorrect results in some cases as a result.
     [Paul Dale]

  *) Fixed SSL_pending() and SSL_has_pending() with DTLS which were failing to
     report correct results in some cases
     [Matt Caswell]

  *) Fixed a regression introduced in 1.1.1o for re-signing certificates with
     different key sizes
     [Todd Short]

  *) Added the loongarch64 target
     [Shi Pujin]

  *) Fixed a DRBG seed propagation thread safety issue
     [Bernd Edlinger]

  *) Fixed a memory leak in tls13_generate_secret
     [Bernd Edlinger]

  *) Fixed reported performance degradation on aarch64. Restored the
     implementation prior to commit 2621751 ("aes/asm/aesv8-armx.pl: avoid
     32-bit lane assignment in CTR mode") for 64bit targets only, since it is
     reportedly 2-17% slower and the silicon errata only affects 32bit targets.
     The new algorithm is still used for 32 bit targets.
     [Bernd Edlinger]

  *) Added a missing header for memcmp that caused compilation failure on some
     platforms
     [Gregor Jasny]

[1] https://www.openssl.org/news/cl111.txt
[2] https://www.openssl.org/news/vulnerabilities.html

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-08 17:42:32 +01:00
Yann E. MORIN
45bb69c2bd package.libopenssl: fix enabling/disabling mdc2
Commit 3dbc86f098 (openssl: bump version, enable mdc2+camellia+tlsext)
form 2010-06-03, forced the build of mdc2. Commit a83d41867c
(package/libopenssl: add option to enable some features) added an option
to explicitly disable mdc2, but forgot to amend the existing enabling
option.

It appears that, like most (all?) openssl config options, mdc2 ends up
enabled unless explicitly disabled.

Additionally, mdc2 depends on DES, so without DES, mdc2 gets disabled.

So, drop the explicit enabling option, and make mdc2 select DES.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: "GAUTRON, Erwan" <erwan.gautron@bertin.fr>
Cc: "Weber, Matthew L Collins" <Matthew.Weber@collins.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2022-11-24 13:42:45 +01:00
Yann E. MORIN
d7178dd432 package/libopenssl: drop useless option for rc5
Commit a83d41867c (package/libopenssl: add option to enable some
features) added an option to enable rc5. However, since commit
1fff941219 (Fixup non-x86 openssl build), dated 2002-12-30, rc5
has always been forcibly disabled in Buildroot.

Given that it was unconditionally disabled all this time, and no
one complained, it means there is virtually no-one using rc5, so we
can just drop the option.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: "GAUTRON, Erwan" <erwan.gautron@bertin.fr>
Cc: "Weber, Matthew L Collins" <Matthew.Weber@collins.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2022-11-24 13:39:36 +01:00
Nuno Gonçalves
adc1c5d8f1 package/libopenssl: don't build the afalg engine
The openssl configure script disables the afalg engine when it detects
cross-compilation, but the detection missfires because it is based on
the CROSS_COMPILE environment variable, which we do not set (as we pass
fully qualified CC et al.).

So, the afalg engine is built, but it is built for the host, not the
target, so it does not make sense to build and install it. Besides, it
leaks build host info.

Signed-off-by: Nuno Gonçalves <nunog@fr24.com>
[yann.morin.1998@free.fr: extend commit log]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-11-05 16:03:30 +01:00
Fabrice Fontaine
a7c4f8e485 package/libopenssl: fix BR2_OPTIMIZE_FAST build
Drop unneeded SED hacks (including build_tests) to fix the following
build failure with BR2_OPTIMIZE_FAST:

In file included from crypto/async/arch/../async_local.h:30,
                 from crypto/async/arch/async_null.c:11:
crypto/async/arch/../arch/async_posix.h:32:5: error: unknown type name 'ucontext_t'
   32 |     ucontext_t fibre;
      |     ^~~~~~~~~~

While at it, also "drop parentheses as all it does is spawn a useless
sub-shell" as noticed by Yann E. Morin

Fixes:
 - http://autobuild.buildroot.org/results/3ce202f11a821940ff55eafa1dc7cea54b8c0da2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-20 13:51:32 +02:00
Peter Korsgaard
9cf73b3fe1 package/libopenssl: security bump to version 1.1.1q
Fixes the following security issues:

AES OCB fails to encrypt some bytes (CVE-2022-2097)
===================================================

Severity: MODERATE

AES OCB mode for 32-bit x86 platforms using the AES-NI assembly optimised
implementation will not encrypt the entirety of the data under some
circumstances.  This could reveal sixteen bytes of data that was
preexisting in the memory that wasn't written.  In the special case of
"in place" encryption, sixteen bytes of the plaintext would be revealed.

Since OpenSSL does not support OCB based cipher suites for TLS and DTLS,
they are both unaffected.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-07-08 22:22:55 +02:00
Fabrice Fontaine
026f35d9e7 package/libopenssl: security bump to version 1.1.1p
The c_rehash script allows command injection (CVE-2022-2068)
============================================================

Severity: Moderate

In addition to the c_rehash shell command injection identified in
CVE-2022-1292, further circumstances where the c_rehash script does not
properly sanitise shell metacharacters to prevent command injection were
found by code review.

When the CVE-2022-1292 was fixed it was not discovered that there
are other places in the script where the file names of certificates
being hashed were possibly passed to a command executed through the
shell.

This script is distributed by some operating systems in a manner where
it is automatically executed.  On such operating systems, an attacker
could execute arbitrary commands with the privileges of the script.

Use of the c_rehash script is considered obsolete and should be replaced
by the OpenSSL rehash command line tool.

https://www.openssl.org/news/secadv/20220621.txt

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-04 18:53:11 +02:00
Peter Korsgaard
96a4aee289 package/libopenssl: security bump to version 1.1.1o
Fixes the following security issues:

- The c_rehash script allows command injection (CVE-2022-1292)

The c_rehash script does not properly sanitise shell metacharacters to
prevent command injection.  This script is distributed by some operating
systems in a manner where it is automatically executed.  On such operating
systems, an attacker could execute arbitrary commands with the privileges of
the script.

Use of the c_rehash script is considered obsolete and should be replaced by
the OpenSSL rehash command line tool.

https://www.openssl.org/news/secadv/20220503.txt

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-04 21:38:31 +02:00
Peter Seiderer
66868e9fab package/libopenssl: bump version to 1.1.1n
Changes between 1.1.1m and 1.1.1n [15 Mar 2022]

  *) Fixed a bug in the BN_mod_sqrt() function that can cause it to loop forever
     for non-prime moduli.

     Internally this function is used when parsing certificates that contain
     elliptic curve public keys in compressed form or explicit elliptic curve
     parameters with a base point encoded in compressed form.

     It is possible to trigger the infinite loop by crafting a certificate that
     has invalid explicit curve parameters.

     Since certificate parsing happens prior to verification of the certificate
     signature, any process that parses an externally supplied certificate may
     thus be subject to a denial of service attack. The infinite loop can also
     be reached when parsing crafted private keys as they can contain explicit
     elliptic curve parameters.

     Thus vulnerable situations include:

      - TLS clients consuming server certificates
      - TLS servers consuming client certificates
      - Hosting providers taking certificates or private keys from customers
      - Certificate authorities parsing certification requests from subscribers
      - Anything else which parses ASN.1 elliptic curve parameters

     Also any other applications that use the BN_mod_sqrt() where the attacker
     can control the parameter values are vulnerable to this DoS issue.
     (CVE-2022-0778)
     [Tomáš Mráz]

  *) Add ciphersuites based on DHE_PSK (RFC 4279) and ECDHE_PSK (RFC 5489)
     to the list of ciphersuites providing Perfect Forward Secrecy as
     required by SECLEVEL >= 3.

     [Dmitry Belyavskiy, Nicola Tuveri]

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-03-16 22:34:07 +01:00
Peter Korsgaard
2b906b975a package/libopenssl: bump version to 1.1.1m
Minor bugfix release:

 Changes between 1.1.1l and 1.1.1m [14 Dec 2021]

  *) Avoid loading of a dynamic engine twice.
     [Bernd Edlinger]

  *) Fixed building on Debian with kfreebsd kernels
     [Mattias Ellert]

  *) Prioritise DANE TLSA issuer certs over peer certs
     [Viktor Dukhovni]

  *) Fixed random API for MacOS prior to 10.12
     These MacOS versions don't support the CommonCrypto APIs
     [Lenny Primak]

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-12-16 20:23:09 +01:00
Michael Fischer
5eace9d35c package/libopenssl: security bump version to 1.1.1l
Signed-off-by: Michael Fischer <mf@go-sys.de>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-08-25 22:05:11 +02:00
Yann E. MORIN
04e3dc3e4b package/libopenssl: md5 is not optional
Commit a83d41867c (package/libopenssl: add option to enable some
features) made md5 an optional feature.

However, md5 has not been optional since 1.1.0, released in 2016.

Drop that option.

Fixes:
   - http://autobuild.buildroot.net/results/9d79c9f313ff989449e9b47c1ff0afd3a167fd2d/

Reported-by: "Weber, Matthew L Collins" <Matthew.Weber@collins.com>
Reviewed-by: "Matthew Weber" <Matthew.Weber@collins.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-05-20 09:09:49 +02:00
GAUTRON, Erwan
a83d41867c package/libopenssl: add option to enable some features
Openssl implements lot of algorithms that are not required in some
emdedded devices and cyphers known as weak. Secure embedded systems
shall disable unused algorithms (and weak algo) in order to be
certified.

This patch allows to select weak algorithms and mecanims to enable
such as md5.

To ensure backward compatibility, all items are selected by default.

Signed-off-by: Erwan GAUTRON <erwan.gautron@bertin.fr>
[yann.morin.1998@free.fr:
  - drop help texts that just repeat the prompts
  - fix check-package
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-05-16 18:59:38 +02:00
Fabrice Fontaine
67d19f6014 package/libopenssl: fix performance issue in static build
Revert commit 8c2c959b02 as no-dso has
been added back to openssl since version 1.1.1e and
8dcd574619
and because gcc no-asm has performance issue

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=13751

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-05-04 21:22:52 +02:00
Bernd Kuhls
198e20921f package/libopenssl: security bump version to 1.1.1k
Fixes CVE-2021-3449 & CVE-2021-3450:
https://www.openssl.org/news/vulnerabilities-1.1.1.html

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-03-26 23:53:25 +01:00