Commit Graph

368 Commits

Author SHA1 Message Date
Yi Zhao
756d8ab246 openssl: add fips support
* Add PACKAGECONFIG[fips] to enable fips build.
* Split a new package openssl-ossl-module-fips for fips.so.
* Add pkg_postinst_ontarget for openssl-ossl-module-fips to ensure the
  config file fipsmodule.cnf is created on target. This is because we
  should not use the same fipsmodule.cnf on different machines.
  The 'openssl fipsinstall' commandline in pkg_postinst_ontarget will do
  the following things:
  1. Run the FIPS module self tests on target.
  2. Generate config file fipsmodule.conf containing information about
     the FIPS module such as the calculated MAC of the module.

(From OE-Core rev: 29979937e2d40885e7e91bb9a7e7dca6763e3d52)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 10:55:26 +01:00
Changqing Li
8dcd0f73eb buildtools-tarball: Make buildtools respects host CA certificates
To adapt user network enviroment, buildtools should first try to use
the user configured envs like SSL_CERT_FILE/CURL_CA_BUNDLE/..., if these
envs is not set, then use the auto-detected ca file and ca path, and
finally use the CA certificates in buildtools.

nativesdk-openssl set OPENSSLDIR as "/not/builtin", need set SSL_CERT_FILE/SSL_CERT_DIR to work

nativesdk-curl don't set default ca file, need
SSL_CERT_FILE/SSL_CERT_DIR or CURL_CA_BUNDLE/CURL_CA_PATH to work

nativesdk-git actually use libcurl, and GIT_SSL_CAPATH/GIT_SSL_CAINFO
also works

nativesdk-python3-requests will use cacert.pem under python module certifi by
default, need to set REQUESTS_CA_BUNDLE

(From OE-Core rev: 8a7ec52e9b35654bee48cd948c6c34c63db3e265)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-24 11:27:06 +01:00
Changqing Li
2a1eb07755 buildtools-tarball: move setting of envvars to respective envfile
* make git,curl,python3-requests align with openssl, move the setting of
  envvars into respective envfile
* for environment.d-openssl.sh, also check if ca-certificates.crt exist
  before export envvars

(From OE-Core rev: 9d8ebfcd55ad274e79cb81f162397c8f39f4287b)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-11 11:49:59 +01:00
Peter Marko
92c32a6de9 openssl: upgrade 3.4.1 -> 3.5.0
This is new openssl LTS release.

Release information:
* https://openssl-library.org/post/2025-02-20-openssl-3.5-lts/
* https://openssl-library.org/post/2025-04-08-openssl-35-final-release/
* https://github.com/openssl/openssl/releases/tag/openssl-3.5.0
* https://github.com/openssl/openssl/blob/openssl-3.5.0/NEWS.md#openssl-35

packages-split directory does not show any changes relevant for
packaging change.

There are new config options but they don't seem to be significant
enough to need explicit packageconfig options.

(From OE-Core rev: 6ff6e86a06ba081eb9afd83e62c128f987cce0ef)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-10 11:05:34 +01:00
Dan McGregor
f0a765624b openssl-native(sdk): poision built in paths
Long ago, in the OpenSSL 1.1 days changing CFLAGS worked to override
hard-coded paths in the OpenSSL libraries. Even as far back as
kirkstone this was no longer working.

Override make variables instead to poision the paths that get built
into the native (and nativesdk) libraries so they become relocatable
again.

While here, remove the -isystem<foo> compiler argument from the compiler
command line stored in the library, just like we already remove the
prefix-map and sysroot arguments.

(From OE-Core rev: d1b29222ad6243c15275a04f9de5989cf158cb2e)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-06 11:16:46 +00:00
Rasmus Villemoes
77c10c60a4 openssl: honour calling environment's values in wrapper script
When using openssl with some pkcs#11 plugin module, one (usually)
needs to set the OPENSSL_CONF environment variable
appropriately, and e.g. invoke openssl as

  openssl dgst -engine pkcs11 -keyform engine ...

However, when putting that logic in a bitbake recipe and depending on
openssl-native (and the recipe providing the pkcs#11 engine and the
associated configuration file), the value of OPENSSL_CONF is
unconditionally overridden by the wrapper script.

If openssl was invoked directly in the task function, I could probably
call "openssl.real" instead, but then I miss the proper settings of
the other four variables, which I'd then also have to repeat in my
recipe. Moreover, sometimes openssl is only called via some helper
script (for example rpi-eeprom-digest for signing bootloader images
for RPi), and it's not reasonable to patch every such script to call
openssl.real.

So rewrite the wrapper such that if a variable is already set in the
environment before openssl is invoked, preserve its value.

(From OE-Core rev: 5582ec9d3a21c546b799d2f6d4928f5e1d19eb0a)

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-27 10:55:16 +00:00
Rasmus Villemoes
de80844aa2 openssl: fold result of sed invocation into environment file
A long time ago, the environment.d-openssl.sh file was shared between
openssl 1.0 and openssl 1.1 recipes, and sed was used to make the path
right for the 1.1 version. Nowadays, with only a single recipe, this
is a bit roundabout, so just use the proper path in the file directly.

(From OE-Core rev: 291fe7db623b0974e7831e908e91b1f1259e0506)

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-27 10:55:16 +00:00
Peter Marko
36c3bfa64b openssl: upgrade 3.4.0 -> 3.4.1
Release information:
https://github.com/openssl/openssl/blob/openssl-3.4/NEWS.md#major-changes-between-openssl-340-and-openssl-341-11-feb-2025

Handles CVE-2024-12797 and CVE-2024-13176.

Remove two patches included in the new version.

(From OE-Core rev: d7ac886d91ccf6b91f67fb0c843fc1765d9dafb1)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-18 11:56:03 +00:00
Ross Burton
fca4f4f712 openssl: fix register trampling on aarch64
Backport a patch from upstream to fix register tramping on aarch64.

(From OE-Core rev: 9005321e37030d916f4f26e7201e2f86c85ebdbd)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-10 13:03:57 +00:00
Peter Marko
23e695407e openssl: remove obsolete CVE version suffix
Since 3.0.0 openssl no longer uses characters in version suffix.

(From OE-Core rev: 80151340b0b20610030f3026e9fc71ef5970c2c5)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-20 13:38:59 +00:00
Khem Raj
8689c066e8 openssl: Fix build on risc64/musl
__NR_riscv_hwprobe is not exported in musl's hwprobe.h
this fails to build with newer kernels

Fixes
| :85:20: error: use of undeclared identifier '__NR_riscv_hwprobe'; did you mean 'riscv_hwprobe'?
|    85 |     return syscall(__NR_riscv_hwprobe, pairs, pair_count, cpu_count, cpus, flags);
|       |                    ^~~~~~~~~~~~~~~~~~

(From OE-Core rev: 5271f24643c303d0e6d3d9c12c722f5d818252fe)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-12-09 15:23:28 +00:00
Peter Marko
5c35805fd4 openssl: upgrade 3.3.1 -> 3.4.0
Release information:
https://github.com/openssl/openssl/blob/openssl-3.4/NEWS.md#major-changes-between-openssl-33-and-openssl-340-22-oct-2024

Handles CVE-2024-9143

Refreshed patches.

(From OE-Core rev: 45c6b85ccc8157f0dd31eb3d5138832ced7966d5)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-29 22:13:25 +00:00
Richard Purdie
ce71947065 openssl: Fix SDK environment script to avoid unbound variable
Avoid errors like:

buildtools/sysroots/x86_64-pokysdk-linux/environment-setup.d/openssl.sh: line 6: BB_ENV_PASSTHROUGH_ADDITIONS: unbound variable

by setting an explicit empty default value.

(From OE-Core rev: 5a2a4910a22668f25679a47deaa9e2ed28665efa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-01 11:53:26 +00:00
Ross Burton
7621286640 openssl: rewrite ptest installation
Rewrite (again) the openssl test suite installation.

Depend on and reuse already installed libraries and modules instead of
installing them twice.

Be more selective when installing from the build tree so we don't install
intermediate .c .d .o files.

This further reduces the size of openssl-dbg from ~120MB to ~18MB.

(From OE-Core rev: 8baa0ce7eae65026cb3a784adaf3a4fc724ce9c9)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-19 17:51:00 +01:00
Ross Burton
45c7150b91 openssl: strip the test suite
The test suite is huge because every test binary is statically linked to
libssl and/or libcrypto. This bloats the size of the -dbg package hugely,
so strip the test suite before packaging.

This reduces the size of openssl-dbg by 90% from ~1.2GB to ~120MB, and
reduces the size of the build tree from ~1.9GB to ~800MB.

(From OE-Core rev: 92f09a4269e45e09643a7e7aafd2811cfd47cb68)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-19 17:51:00 +01:00
Ross Burton
d237e9af27 openssl: disable tests unless ptest is enabled
The upstream Makefile always builds the tests unless they're explicitly
disabled. Whilst this doesn't make a difference to the final package and
sysroot output, disabling the tests for openssl-native reduces the size
of the build tree from 659M to 78M and reduces the CPU time used by 30%.

(From OE-Core rev: dfaf1cba9f30c6b07836fe217e1ebc83bc6aec8a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-18 17:21:39 +01:00
Clément Péron
684ab3c776 openssl: Remove patch already upstreamed
Since the bump to OpenSSL 3.3.1, riscv32 doesn't build anymore due to
the folowing error:
crypto/riscv32cpuid.s:77: Error: symbol `riscv_vlen_asm' is already
defined

This is due to the patch beeing already applied upstream:
Commit: 8702320db98d1346c230aff1282ade3ecdca681a

(From OE-Core rev: 06c4168c7bd6a32cb7de3e003793c8e232714fad)

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-25 11:50:58 +01:00
Peter Marko
bddb08f20b openssl: Upgrade 3.3.0 -> 3.3.1
Handles CVE-2024-4741

Removed included backports.

Release information:
https://github.com/openssl/openssl/blob/openssl-3.3/NEWS.md#major-changes-between-openssl-330-and-openssl-331-4-jun-2024

(From OE-Core rev: 3c7f8f87741702d50e29a5858802f74c5f4aab49)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-06 11:56:03 +01:00
Richard Purdie
06cba9abc4 openssl: Add passthrough variables to work with bitbake
Now that bitbake uses websockets over SSL as hashserv and is correctly
limiting hash equivalence only to things in the orginal SDK, bitbake builds
from buildtools can fail due to broken SSL from buildtools.

The issue is that the relocation variables are being removed from the
environment. This could be fixed within bitbake or it could be fixed
within the SDK environment. This patch does the latter for now. We
really need to improve openssl relocation within the SDK in general.

Fixing this has become more urgent to fix failing builds in automated
testing.

(From OE-Core rev: 6a20667c166fa3d7e2b6e8e8b442dec0fc75f349)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-04 21:37:13 +01:00
Khem Raj
a1d4f0b105 openssl: Fix build on riscv
GCC-14 unearths this bug which is already fixed upstream so backport it

(From OE-Core rev: 0d5c61a1f5099639acf58b33288f466ce47847b5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-23 11:26:39 +01:00
Peter Marko
962d8eebb7 openssl: patch CVE-2024-4603
Advisory: https://github.com/advisories/GHSA-85xr-ghj6-6m46

(From OE-Core rev: f136006676750ac653cd7804396614210d1e5120)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-22 10:21:26 +01:00
Ross Burton
2b963cb51e openssl: fix pkgconfig path problems
OpenSSL 3.3.0 introduced new pkgconfig generators which interact badly
with our incorrect setting of --libdir, which is documented as being
the name of the directory _under $prefix_, not an absolute path.  This
resulted in the pkgconfig files have libdir=/usr which mostly works as
the actual library directory is on the search path, but can break other
recipes (such as tpm2-openssl).

Pass the correct value for --libdir, and also remove the odd handling of
an empty ${prefix} which is very historical[1] and can't happen anymore
as all build variations have a prefix.

[1] Added in oe-classic f725a81c, 2009

(From OE-Core rev: f5e931c5e5932e35113d13ba053419283f472f43)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-09 09:48:58 +01:00
Richard Purdie
0ea63b6a43 recipes: Update WORKDIR references to UNPACKDIR
Since we want to be able to stop unpacking to WORKDIR, correct the WORKDIR
references in recipe do_compile/do_install tasks to use UNPACKDIR in the
appropraite places instead.

(From OE-Core rev: d73595df69667fe9d12ecd407b77a0b8dae2109c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-02 15:15:51 +01:00
Wang Mingyu
e336fee6e5 openssl: upgrade 3.2.1 -> 3.3.0
CVE-2024-2511.patch
revmoed since it's included in 3.3.0

Changelog:
 https://github.com/openssl/openssl/blob/openssl-3.3.0/NEWS.md

(From OE-Core rev: 1d6cb1592d6883cc504ff0776810312f732664ae)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-25 10:06:02 +01:00
Peter Marko
fd794ce87c openssl: openssl: patch CVE-2024-2511
Patch: e9d7083e24
News: b7acb6731a

(From OE-Core rev: b439d1c9e5a115bbb5193a2df25e84291cc07bec)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-16 07:33:19 +01:00
Ross Burton
4a8b005afc openssl: fix crash on aarch64 if BTI is enabled but no Crypto instructions
On aarch64, if the processor doesn't have the Crypto instructions then
OpenSSL will fall back onto the "bit-sliced" assembler routines. When
branch protection (BTI) was enabled in OpenSSL these routines were
missed, so if BTI is available libssl will immediately abort when it
enters this assembler.

Backport a patch submitted upstream to add the required call target
annotations so that BTI doesn't believe the code is being exploited.

(From OE-Core rev: 438a390e8e1811bc2d3820c1cd2b8e099e70064a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:22:19 +00:00
Xiaotian Wu
7b4d8e6b7f openssl: Match target name for loongarch64
This is updated in openssl [1] since opensssl 3.2.0-alpha1 onwards

[1] b625e21e67

(From OE-Core rev: 1e5b30d92da2e51e6a4ba75e2cc1e9ccebc8efe7)

Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-27 11:35:43 +00:00
Simone Weiß
5e21c5d64e meta: Remove some not needed CVE_STATUS
CVE_STATUS was set for those components, but meanwhile databases are updated
with corrected information, so setting the CVE_STATUS is not needed anymore.

(From OE-Core rev: 5ec6057cfa66ceeb33bec013e320f8e3fa7d7ecf)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-24 16:10:23 +00:00
Peter Marko
670bc40b69 openssl: Upgrade 3.2.0 -> 3.2.1
Fixes CVE-2024-0727 and CVE-2023-6237

Removed included patch backports.

New module was implemented in tests and needs to be installed
to successfully pass 04-test_provider.t test.

Release information:
https://github.com/openssl/openssl/blob/openssl-3.2/NEWS.md#major-changes-between-openssl-320-and-openssl-321-30-jan-2024

(From OE-Core rev: b50f1c4ccac12e9dbdeb5a6fec0413c9cd901d88)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:09 +00:00
Ross Burton
e5604d346c openssl: backport fix for CVE-2023-6129
(From OE-Core rev: 7fa10f29b31f8aae572026a00a6354aec539d044)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-02 11:06:17 +00:00
Khem Raj
101580d72f openssl: Fix build on riscv
Backport a typo fix RISCV_HAS_ZKND_ZKNE -> RISCV_HAS_ZKND_AND_ZKNE

(From OE-Core rev: 2b2bf78c7250a23a476f168d3f1789496c1c27e9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Ross Burton
92fd81b7de openssl: mark assembler sections as call targets for PAC/BTI support on aarch64
The assembler sections in OpenSSL were not marked as valid call targets,
so branch protection could not be enabled for libcrypto.so.

(From OE-Core rev: 4bf06bc5487da05e6b4a4895e5ca2da65cdc25d8)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-21 10:38:30 +00:00
Lee Chee Yang
5369e2f5c5 openssl: upgrade to 3.2.0
upgrade include fix for CVE-2023-5678.

Changes in 3.2.0
https://www.openssl.org/news/cl32.txt

drop upstreamed 0001-Link-libatomic-on-riscv32.patch.
drop fix_random_labels.patch as fixed by
0fbc50ef0c

(From OE-Core rev: 5a40f27051a1d40af41e7260b9f693a3c27c321f)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-04 11:23:37 +00:00
William Lyu
02d38393d1 openssl: improve handshake test error reporting
Fixes [YOCTO #15225]

Yocto Bug #15255 is not reproducible. To obtain more useful information
for debugging, the OpenSSL test code is improved so that more detailed
state information in the handshake loop is printed when an error occurs.

(From OE-Core rev: 5bf9a70f580357badd01f39822998985654b0bfc)

Signed-off-by: William Lyu <William.Lyu@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-05 11:28:31 +00:00
Peter Marko
17571e6afc openssl: Upgrade 3.1.3 -> 3.1.4
https://github.com/openssl/openssl/blob/openssl-3.1/NEWS.md#major-changes-between-openssl-313-and-openssl-314-24-oct-2023

Major changes between OpenSSL 3.1.3 and OpenSSL 3.1.4 [24 Oct 2023]
* Mitigate incorrect resize handling for symmetric cipher keys and IVs. (CVE-2023-5363)

(From OE-Core rev: 104ba16de434a08b0c8ba4208be187f0ad1a2cf8)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-26 15:29:35 +01:00
Khem Raj
1221529a69 openssl: Inherit riscv32 config from latomic config on linux
We still need this option for riscv32, the patch is also submitted
upstream

(From OE-Core rev: 2e923a5a67e51463dcf938079c4a199873ccba85)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-25 10:20:39 +01:00
Khem Raj
088207034b openssl: Match target name for riscv64/riscv32
This is updated in openssl [1] [2] since opensssl 3.2 onwards

[1] 42ee6e7be4
[2] c29554245a

(From OE-Core rev: ed280618b40e5c67d475f74569183a11619b52c2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 10:49:19 +01:00
Peter Marko
3a5b23a5c3 openssl: Upgrade 3.1.2 -> 3.1.3
https://github.com/openssl/openssl/blob/openssl-3.1/NEWS.md#major-changes-between-openssl-312-and-openssl-313-19-sep-2023
Major changes between OpenSSL 3.1.2 and OpenSSL 3.1.3 [19 Sep 2023]
* Fix POLY1305 MAC implementation corrupting XMM registers on Windows (CVE-2023-4807)

(From OE-Core rev: eb65fdd971aa30d3fd09a8bc1b33ad2a1197f364)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Alexander Kanavin
df0f70d1b0 openssl: ensure all ptest fails are caught
Piping results through sed may mask failures that sed isn't catching.

(From OE-Core rev: 2b1b0e9e4d5011e7c2fd1b59fc277a7cfdc41194)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-18 08:53:10 +01:00
Alexander Kanavin
befe84272b openssl: parallelize tests
This brings them from 15 minutes to just over 4.

(From OE-Core rev: 9eeee78aa94aaa441da012aeb904a0f1cbcd4d91)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-18 08:53:10 +01:00
Alexander Kanavin
1584613ca8 openssl: build and install manpages only if they are enabled
This significantly speeds up the build by default.

(From OE-Core rev: 2b5ee583c62dbe381cd429da14ecbba5ea32d506)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 14:36:30 +01:00
Peter Marko
71193e58b0 openssl: Upgrade 3.1.1 -> 3.1.2
https://github.com/openssl/openssl/blob/openssl-3.1/NEWS.md#major-changes-between-openssl-311-and-openssl-312-1-aug-2023
Major changes between OpenSSL 3.1.1 and OpenSSL 3.1.2 [1 Aug 2023]
* Fix excessive time spent checking DH q parameter value (CVE-2023-3817)
* Fix DH_check() excessive time with over sized modulus (CVE-2023-3446)
* Do not ignore empty associated data entries with AES-SIV (CVE-2023-2975)
* When building with the enable-fips option and using the resulting FIPS provider, TLS 1.2 will, by default, mandate the use of an extended master secret and the Hash and HMAC DRBGs will not operate with truncated digests.

(From OE-Core rev: e65802383b02df6f502af859a927309d881bbb27)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-16 07:54:38 +01:00
Andrej Valek
c15e506a46 cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS
- Try to add convert and apply statuses for old CVEs
- Drop some obsolete ignores, while they are not relevant for current
  version

(From OE-Core rev: 1634ed4048cf56788cd5c2c1bdc979b70afcdcd7)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Reviewed-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-21 11:52:26 +01:00
Jose Quaresma
a48de87ca7 openssl: use a glob on the PERLEXTERNAL to track updates on the path
The Text-Template was updated from 1.46 to 1.56

| ERROR: openssl-native-3.1.1-r0 do_configure: PERLEXTERNAL '/build/tmp/work/x86_64-linux/openssl-native/3.1.1-r0/openssl-3.1.1/external/perl/Text-Template-1.46/lib' not found!

(From OE-Core rev: b9a7739b01e31d0cc8358d99255e3e1b02a0a1a8)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:06 +01:00
Jose Quaresma
84c75c9660 openssl: add PERLEXTERNAL path to test its existence
When upstream change is better to fail or removing the PERL5LIB
if they are not need anymore.

(From OE-Core rev: 337ac1159644678508990927923ef8af30f34cd7)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:06 +01:00
Dmitry Baryshkov
e16d16ffa6 openssl: fix building on riscv32
On riscv32 configurations OpenSSL fails to build with "undefined
reference to `__atomic_foo'" kind of errors. Change OpenSSL recipe to
use linux-latomic configuration instead of linux-generic32.

(From OE-Core rev: e8ce80fc6d6579554bca2eba057e65d4b12c0793)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-06 23:41:13 +01:00
Tim Orling
9d01c892b4 openssl: upgrade 3.1.0 -> 3.1.1
* Drop CVE-2023-0464.patch (merged upstream).
* Refresh 0001-Configure-do-not-tweak-mips-cflags.patch

https://github.com/openssl/openssl/blob/openssl-3.1.1/NEWS.md

Major changes between OpenSSL 3.1.0 and OpenSSL 3.1.1 [30 May 2023]

* Mitigate for very slow OBJ_obj2txt() performance with gigantic OBJECT IDENTIFIER sub-identities. (CVE-2023-2650)
* Fixed buffer overread in AES-XTS decryption on ARM 64 bit platforms (CVE-2023-1255)
* Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466)
* Fixed handling of invalid certificate policies in leaf certificates (CVE-2023-0465)
* Limited the number of nodes created in a policy tree (CVE-2023-0464)

Security Advisory:
https://www.openssl.org/news/secadv/20230530.txt

CVE: CVE-2023-2650
CVE: CVE-2023-1255
CVE: CVE-2023-0466
CVE: CVE-2023-0465
CVE: CVE-2023-0464

(From OE-Core rev: 26ce9a5fd31c27812ce8784a398b600cc0e9aa80)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-01 08:05:11 +01:00
Siddharth Doshi
97e3d44472 OpenSSL: Security fix for CVE-2023-0464
Upstream-Status: Backport from [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=2017771e2db3e2b96f89bbe8766c3209f6a99545]
(From OE-Core rev: 20ae485ef65bef2ddbffe05fd29cc7d411c38448)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-26 18:50:17 +01:00
Richard Purdie
4e18b5ebb0 openssl: Fix reproducibility issue
Fix an issue introduced in the new openssl version where an assembler file
isn't generated in a reproducible way by seeding the perl random number
generator consistently. It has no crypto impact, it is just used to
avoid function name clashes.

(From OE-Core rev: 448df3e1c02fe224d62f59a236fdcd47ea7e695f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-16 17:49:38 +00:00
Randy MacLeod
1fd13ab7e1 openssl: update from 3.0.8 to 3.1.0
>From the NEWS.md file:

  ### Major changes between OpenSSL 3.0 and OpenSSL 3.1.0 [14 Mar 2023]

  * SSL 3, TLS 1.0, TLS 1.1, and DTLS 1.0 only work at security level 0.
  * Performance enhancements and new platform support including new
    assembler code algorithm implementations.
  * Deprecated LHASH statistics functions.
  * FIPS 140-3 compliance changes.

Drop the upstreamed afalg.patch:
   c425e365f4 Configure: don't try to be clever when configuring afalgeng

(From OE-Core rev: 71c763ed4fbbea22a6a0b145e4e29436c7e59625)

Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-16 17:49:38 +00:00