From: Peter Marko <[email protected]> Pick patch per [1].
[1] https://nvd.nist.gov/vuln/detail/CVE-2025-69277 Signed-off-by: Peter Marko <[email protected]> --- .../libsodium/libsodium/CVE-2025-69277.patch | 61 +++++++++++++++++++ .../libsodium/libsodium_1.0.18.bb | 2 + 2 files changed, 63 insertions(+) create mode 100644 meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch diff --git a/meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch b/meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch new file mode 100644 index 0000000000..a0c4a0b33f --- /dev/null +++ b/meta-oe/recipes-crypto/libsodium/libsodium/CVE-2025-69277.patch @@ -0,0 +1,61 @@ +From ad3004ec8731730e93fcfbbc824e67eadc1c1bae Mon Sep 17 00:00:00 2001 +From: Frank Denis <[email protected]> +Date: Mon, 29 Dec 2025 23:22:15 +0100 +Subject: [PATCH] core_ed25519_is_valid_point: check Y==Z in addition to X==0 + +CVE: CVE-2025-69277 +Upstream-Status: Backport [https://github.com/jedisct1/libsodium/commit/ad3004ec8731730e93fcfbbc824e67eadc1c1bae] +Signed-off-by: Peter Marko <[email protected]> +--- + src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c | 5 ++++- + test/default/core_ed25519.c | 7 ++++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +index d3020132..4b824f6d 100644 +--- a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c ++++ b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +@@ -992,10 +992,13 @@ int + ge25519_is_on_main_subgroup(const ge25519_p3 *p) + { + ge25519_p3 pl; ++ fe25519 t; + + ge25519_mul_l(&pl, p); + +- return fe25519_iszero(pl.X); ++ fe25519_sub(t, pl.Y, pl.Z); ++ ++ return fe25519_iszero(pl.X) & fe25519_iszero(t); + } + + int +diff --git a/test/default/core_ed25519.c b/test/default/core_ed25519.c +index bc457493..02f72bd6 100644 +--- a/test/default/core_ed25519.c ++++ b/test/default/core_ed25519.c +@@ -13,6 +13,10 @@ static const unsigned char max_canonical_p[32] = { + 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f + }; ++static const unsigned char not_main_subgroup_p[32] = { ++ 0x95, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, ++ 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 ++}; + + static void + add_P(unsigned char * const S) +@@ -130,11 +134,12 @@ main(void) + assert(crypto_core_ed25519_is_valid_point(p) == 0); + + p[0] = 9; +- assert(crypto_core_ed25519_is_valid_point(p) == 1); ++ assert(crypto_core_ed25519_is_valid_point(p) == 0); + + assert(crypto_core_ed25519_is_valid_point(max_canonical_p) == 1); + assert(crypto_core_ed25519_is_valid_point(non_canonical_invalid_p) == 0); + assert(crypto_core_ed25519_is_valid_point(non_canonical_p) == 0); ++ assert(crypto_core_ed25519_is_valid_point(not_main_subgroup_p) == 0); + + memcpy(p2, p, crypto_core_ed25519_BYTES); + add_P(p2); diff --git a/meta-oe/recipes-crypto/libsodium/libsodium_1.0.18.bb b/meta-oe/recipes-crypto/libsodium/libsodium_1.0.18.bb index 53b3ddc26f..1b22e8d7bc 100644 --- a/meta-oe/recipes-crypto/libsodium/libsodium_1.0.18.bb +++ b/meta-oe/recipes-crypto/libsodium/libsodium_1.0.18.bb @@ -8,6 +8,8 @@ SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz SRC_URI[md5sum] = "3ca9ebc13b6b4735acae0a6a4c4f9a95" SRC_URI[sha256sum] = "6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1" +SRC_URI += "file://CVE-2025-69277.patch" + inherit autotools BBCLASSEXTEND = "native nativesdk"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#123335): https://lists.openembedded.org/g/openembedded-devel/message/123335 Mute This Topic: https://lists.openembedded.org/mt/117196624/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
