summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Kozemcak <andrej.kozemcak@siemens.com>2026-03-16 14:51:43 +0100
committerKhem Raj <raj.khem@gmail.com>2026-03-18 14:33:28 -0700
commit04ef8fb242afed697f0740925247a3fe5b41381e (patch)
treee95cc58008641587722ba219dde5882f3f01edc4
parent510ea4db5780882d9f1ad17b234d89bb691ed3fb (diff)
downloadmeta-openembedded-04ef8fb242afed697f0740925247a3fe5b41381e.tar.gz
libsodium: upgrade 1.0.20 -> 1.0.21
License-Update: copyright years refreshed Removed patch included in this release Add path to fix compilation with gcc on aarch64 Changelog: https://github.com/jedisct1/libsodium/releases/tag/1.0.21-RELEASE Changes: Version 1.0.21 - security fix for the crypto_core_ed25519_is_valid_point() function - new crypto_ipcrypt_* functions - sodium_bin2ip and sodium_ip2bin helper functions - XOF: the crypto_xof_shake* and crypto_xof_turboshake* functions Version 1.0.20-stable - XCFramework: cross-compilation is now forced on Apple Silicon to avoid Rosetta-related build issues - The Fil-C compiler is supported out of the box - The CompCert compiler is supported out of the box - MSVC 2026 (Visual Studio 2026) is now supported - Zig builds now support FreeBSD targets - Performance of AES256-GCM and AEGIS on ARM has been improved with some compilers - Android binaries have been added to the NuGet package - Windows ARM binaries have been added to the NuGet package - The Android build script has been improved. The base SDK is now 27c, and the default platform is 21, supporting 16 KB page sizes. - The library can now be compiled with Zig 0.15 and Zig 0.16 - Zig builds now generate position-independent static libraries by default on targets that support PIC - arm64e builds have been added to the XCFramework packages - XCFramework packages are now full builds instead of minimal builds - MSVC builds have been enabled for ARM64 - iOS 32-bit (armv7/armv7s) support has been removed from the XCFramework build script - Security: optblockers have been introduced in critical code paths to prevent compilers from introducing unwanted side channels via conditional jumps. This was observed on RISC-V targets with specific compilers and options. - Security: crypto_core_ed25519_is_valid_point() now properly rejects small-order points that are not in the main subgroup - ((nonnull)) attributes have been relaxed on some crypto_stream* functions to allow NULL output buffers when the output length is zero - A cross-compilation issue with old clang versions has been fixed - JavaScript: support for Cloudflare Workers has been added - JavaScript: WASM_BIGINT is forcibly disabled to retain compatibility with older runtimes - A compilation issue with old toolchains on Solaris has been fixed - crypto_aead_aes256gcm_is_available is exported to JavaScript - libsodium is now compatible with Emscripten 4.x - Security: memory fences have been added after MAC verification in AEAD to prevent speculative access to plaintext before authentication is complete - Assembly files now include .gnu.property notes for proper IBT and Shadow Stack support when building with CET instrumentation. Signed-off-by: Andrej Kozemcak <andrej.kozemcak@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-crypto/libsodium/libsodium/0001-Fix-compilation-with-GCC-on-aarch64.patch49
-rw-r--r--meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch61
-rw-r--r--meta-oe/recipes-crypto/libsodium/libsodium_1.0.21.bb (renamed from meta-oe/recipes-crypto/libsodium/libsodium_1.0.20.bb)9
3 files changed, 54 insertions, 65 deletions
diff --git a/meta-oe/recipes-crypto/libsodium/libsodium/0001-Fix-compilation-with-GCC-on-aarch64.patch b/meta-oe/recipes-crypto/libsodium/libsodium/0001-Fix-compilation-with-GCC-on-aarch64.patch
new file mode 100644
index 0000000000..c5c0d12b87
--- /dev/null
+++ b/meta-oe/recipes-crypto/libsodium/libsodium/0001-Fix-compilation-with-GCC-on-aarch64.patch
@@ -0,0 +1,49 @@
1From fc66d1bd0d3db6392424a1fd10dcf4343ce72c52 Mon Sep 17 00:00:00 2001
2From: Frank Denis <github@pureftpd.org>
3Date: Wed, 7 Jan 2026 12:00:49 +0100
4Subject: [PATCH] Fix compilation with GCC on aarch64
5
6Use unsigned NEON intrinsics everywhere
7
8Fixes #1502
9
10Upstream-Status: Backport [https://github.com/jedisct1/libsodium/commit/6702f69bef6044163acc7715e6ac7e430890ce78]
11---
12 src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c | 14 +++++++-------
13 1 file changed, 7 insertions(+), 7 deletions(-)
14
15diff --git a/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c b/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
16index c5a27e92..bad4ce38 100644
17--- a/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
18+++ b/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
19@@ -37,7 +37,7 @@ typedef uint64x2_t BlockVec;
20 # define XOR128_3(a, b, c) veorq_u64(veorq_u64((a), (b)), (c))
21 # define SET64x2(a, b) vsetq_lane_u64((uint64_t) (a), vmovq_n_u64((uint64_t) (b)), 1)
22 # define BYTESHL128(a, b) \
23- vreinterpretq_u64_u8(vextq_s8(vdupq_n_s8(0), vreinterpretq_s8_u64(a), 16 - (b)))
24+ vreinterpretq_u64_u8(vextq_u8(vdupq_n_u8(0), vreinterpretq_u8_u64(a), 16 - (b)))
25
26 # define AES_XENCRYPT(block_vec, rkey) \
27 vreinterpretq_u64_u8( \
28@@ -348,12 +348,12 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_index, const uint8_t bit_va
29 static void
30 pfx_shift_left(uint8_t ip16[16])
31 {
32- BlockVec v = LOAD128(ip16);
33- const BlockVec shl = vshlq_n_u8(vreinterpretq_u8_u64(v), 1);
34- const BlockVec msb = vshrq_n_u8(vreinterpretq_u8_u64(v), 7);
35- const BlockVec zero = vdupq_n_u8(0);
36- const BlockVec carries = vextq_u8(vreinterpretq_u8_u64(msb), zero, 1);
37- v = vreinterpretq_u64_u8(vorrq_u8(shl, carries));
38+ BlockVec v = LOAD128(ip16);
39+ const uint8x16_t shl = vshlq_n_u8(vreinterpretq_u8_u64(v), 1);
40+ const uint8x16_t msb = vshrq_n_u8(vreinterpretq_u8_u64(v), 7);
41+ const uint8x16_t zero = vdupq_n_u8(0);
42+ const uint8x16_t carries = vextq_u8(msb, zero, 1);
43+ v = vreinterpretq_u64_u8(vorrq_u8(shl, carries));
44 STORE128(ip16, v);
45 }
46
47--
482.47.3
49
diff --git a/meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch b/meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch
deleted file mode 100644
index a2ced62760..0000000000
--- a/meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1From ad3004ec8731730e93fcfbbc824e67eadc1c1bae Mon Sep 17 00:00:00 2001
2From: Frank Denis <github@pureftpd.org>
3Date: Mon, 29 Dec 2025 23:22:15 +0100
4Subject: [PATCH] core_ed25519_is_valid_point: check Y==Z in addition to X==0
5
6CVE: CVE-2025-69277
7Upstream-Status: Backport [https://github.com/jedisct1/libsodium/commit/ad3004ec8731730e93fcfbbc824e67eadc1c1bae]
8Signed-off-by: Peter Marko <peter.marko@siemens.com>
9---
10 src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c | 5 ++++-
11 test/default/core_ed25519.c | 7 ++++++-
12 2 files changed, 10 insertions(+), 2 deletions(-)
13
14diff --git a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c
15index d3020132..4b824f6d 100644
16--- a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c
17+++ b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c
18@@ -1141,10 +1141,13 @@ int
19 ge25519_is_on_main_subgroup(const ge25519_p3 *p)
20 {
21 ge25519_p3 pl;
22+ fe25519 t;
23
24 ge25519_mul_l(&pl, p);
25
26- return fe25519_iszero(pl.X);
27+ fe25519_sub(t, pl.Y, pl.Z);
28+
29+ return fe25519_iszero(pl.X) & fe25519_iszero(t);
30 }
31
32 int
33diff --git a/test/default/core_ed25519.c b/test/default/core_ed25519.c
34index bc457493..02f72bd6 100644
35--- a/test/default/core_ed25519.c
36+++ b/test/default/core_ed25519.c
37@@ -13,6 +13,10 @@ static const unsigned char max_canonical_p[32] = {
38 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
39 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f
40 };
41+static const unsigned char not_main_subgroup_p[32] = {
42+ 0x95, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
43+ 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99
44+};
45 static const unsigned char L_p1[32] = {
46 0xee, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14,
47 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10
48@@ -133,11 +137,12 @@ main(void)
49 assert(crypto_core_ed25519_is_valid_point(p) == 0);
50
51 p[0] = 9;
52- assert(crypto_core_ed25519_is_valid_point(p) == 1);
53+ assert(crypto_core_ed25519_is_valid_point(p) == 0);
54
55 assert(crypto_core_ed25519_is_valid_point(max_canonical_p) == 1);
56 assert(crypto_core_ed25519_is_valid_point(non_canonical_invalid_p) == 0);
57 assert(crypto_core_ed25519_is_valid_point(non_canonical_p) == 0);
58+ assert(crypto_core_ed25519_is_valid_point(not_main_subgroup_p) == 0);
59
60 memcpy(p2, p, crypto_core_ed25519_BYTES);
61 add_P(p2);
diff --git a/meta-oe/recipes-crypto/libsodium/libsodium_1.0.20.bb b/meta-oe/recipes-crypto/libsodium/libsodium_1.0.21.bb
index 972b8b8694..9f07634c41 100644
--- a/meta-oe/recipes-crypto/libsodium/libsodium_1.0.20.bb
+++ b/meta-oe/recipes-crypto/libsodium/libsodium_1.0.21.bb
@@ -2,12 +2,13 @@ SUMMARY = "The Sodium crypto library"
2HOMEPAGE = "http://libsodium.org/" 2HOMEPAGE = "http://libsodium.org/"
3BUGTRACKER = "https://github.com/jedisct1/libsodium/issues" 3BUGTRACKER = "https://github.com/jedisct1/libsodium/issues"
4LICENSE = "ISC" 4LICENSE = "ISC"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=c59be7bb29f8e431b5f2d690b6734185" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=4942a8ebbbc7f2212bd68a47df264a4f"
6 6
7SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz" 7SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz \
8SRC_URI[sha256sum] = "ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19" 8 file://0001-Fix-compilation-with-GCC-on-aarch64.patch \
9 "
10SRC_URI[sha256sum] = "9e4285c7a419e82dedb0be63a72eea357d6943bc3e28e6735bf600dd4883feaf"
9 11
10SRC_URI += "file://CVE-2025-69277.patch"
11 12
12inherit autotools 13inherit autotools
13 14