Patch review
cover Patch review
Please review this set of changes for kirkstone and have comments back by end of day Tuesday, February 3
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/911
The following changes since commit 077aab43f2c928eb8da71934405c62327010f552:
classes/qemu: use tune to select QEMU_EXTRAOPTIONS, not package architecture (2025-01-20 06:06:07 -0800)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut
Deepesh Varatharajan (1):
glibc: stable 2.35 branch updates
Peter Marko (1):
openssl: patch CVE-2024-13176
Yash Shinde (2):
binutils: internal gdb: Fix CVE-2024-53589
gdb: Fix CVE-2024-53589
.../openssl/openssl/CVE-2024-13176.patch | 125 ++++++++++++++++++ .../openssl/openssl_3.0.15.bb | 1 + meta/recipes-core/glibc/glibc-version.inc | 2 +- .../binutils/binutils-2.38.inc | 1 + .../binutils/0037-CVE-2024-53589.patch | 92 +++++++++++++ meta/recipes-devtools/gdb/gdb.inc | 1 + .../gdb/gdb/0014-CVE-2024-53589.patch | 92 +++++++++++++ 7 files changed, 313 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-13176.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0037-CVE-2024-53589.patch create mode 100644 meta/recipes-devtools/gdb/gdb/0014-CVE-2024-53589.patch
Signature · 1 line
2.43.0
PATCH 1/4 openssl: patch CVE-2024-13176
From: Peter Marko <[email protected]>
Picked [1] per link in [2].
[1] https://github.com/openssl/openssl/commit/07272b05b04836a762b4baa874958af51d513844
[2] https://nvd.nist.gov/vuln/detail/CVE-2024-13176
--- .../openssl/openssl/CVE-2024-13176.patch | 125 ++++++++++++++++++ .../openssl/openssl_3.0.15.bb | 1 + 2 files changed, 126 insertions(+) create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-13176.patch
meta/recipes-connectivity/openssl/openssl/CVE-2024-13176.patch new file +125 -0
@@ -0,0 +1,125 @@ +From 07272b05b04836a762b4baa874958af51d513844 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz <[email protected]> +Date: Wed, 15 Jan 2025 18:27:02 +0100 +Subject: [PATCH] Fix timing side-channel in ECDSA signature computation + +There is a timing signal of around 300 nanoseconds when the top word of +the inverted ECDSA nonce value is zero. This can happen with significant +probability only for some of the supported elliptic curves. In particular +the NIST P-521 curve is affected. To be able to measure this leak, the +attacker process must either be located in the same physical computer or +must have a very fast network connection with low latency. + +Attacks on ECDSA nonce are also known as Minerva attack. + +Fixes CVE-2024-13176 + +Reviewed-by: Tim Hudson <[email protected]> +Reviewed-by: Neil Horman <[email protected]> +Reviewed-by: Paul Dale <[email protected]> +(Merged from https://github.com/openssl/openssl/pull/26429) + +(cherry picked from commit 63c40a66c5dc287485705d06122d3a6e74a6a203) + +CVE: CVE-2024-13176 +Upstream-Status: Backport [https://github.com/openssl/openssl/commit/07272b05b04836a762b4baa874958af51d513844] +Signed-off-by: Peter Marko <[email protected]> +--- + crypto/bn/bn_exp.c | 21 +++++++++++++++------ + crypto/ec/ec_lib.c | 7 ++++--- + include/crypto/bn.h | 3 +++ + 3 files changed, 22 insertions(+), 9 deletions(-) + +diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c +index 598a592ca1397..d84c7de18a6b6 100644 +--- a/crypto/bn/bn_exp.c ++++ b/crypto/bn/bn_exp.c +@@ -606,7 +606,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, + * out by Colin Percival, + * http://www.daemonology.net/hyperthreading-considered-harmful/) + */ +-int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, ++int bn_mod_exp_mont_fixed_top(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *in_mont) + { +@@ -623,10 +623,6 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + unsigned int t4 = 0; + #endif + +- bn_check_top(a); +- bn_check_top(p); +- bn_check_top(m); +- + if (!BN_is_odd(m)) { + ERR_raise(ERR_LIB_BN, BN_R_CALLED_WITH_EVEN_MODULUS); + return 0; +@@ -1146,7 +1142,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + goto err; + } else + #endif +- if (!BN_from_montgomery(rr, &tmp, mont, ctx)) ++ if (!bn_from_mont_fixed_top(rr, &tmp, mont, ctx)) + goto err; + ret = 1; + err: +@@ -1160,6 +1156,19 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + return ret; + } + ++int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, ++ BN_MONT_CTX *in_mont) ++{ ++ bn_check_top(a); ++ bn_check_top(p); ++ bn_check_top(m); ++ if (!bn_mod_exp_mont_fixed_top(rr, a, p, m, ctx, in_mont)) ++ return 0; ++ bn_correct_top(rr); ++ return 1; ++} ++ + int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) + { +diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c +index b1696d93bd6dd..1f0bf1ec795fa 100644 +--- a/crypto/ec/ec_lib.c ++++ b/crypto/ec/ec_lib.c +@@ -20,6 +20,7 @@ + #include <openssl/err.h> + #include <openssl/opensslv.h> + #include "crypto/ec.h" ++#include "crypto/bn.h" + #include "internal/nelem.h" + #include "ec_local.h" + +@@ -1262,10 +1263,10 @@ static int ec_field_inverse_mod_ord(const EC_GROUP *group, BIGNUM *r, + if (!BN_sub(e, group->order, e)) + goto err; + /*- +- * Exponent e is public. +- * No need for scatter-gather or BN_FLG_CONSTTIME. ++ * Although the exponent is public we want the result to be ++ * fixed top. + */ +- if (!BN_mod_exp_mont(r, x, e, group->order, ctx, group->mont_data)) ++ if (!bn_mod_exp_mont_fixed_top(r, x, e, group->order, ctx, group->mont_data)) + goto err; + + ret = 1; +diff --git a/include/crypto/bn.h b/include/crypto/bn.h +index c5f328156d3a9..59a629b9f6288 100644 +--- a/include/crypto/bn.h ++++ b/include/crypto/bn.h +@@ -73,6 +73,9 @@ int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words); + */ + int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + BN_MONT_CTX *mont, BN_CTX *ctx); ++int bn_mod_exp_mont_fixed_top(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, ++ BN_MONT_CTX *in_mont); + int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, + BN_CTX *ctx); + int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
meta/recipes-connectivity/openssl/openssl_3.0.15.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI = "https://github.com/openssl/openssl/releases/download/openssl-${PV}/op file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ file://CVE-2024-9143.patch \ + file://CVE-2024-13176.patch \ " SRC_URI:append:class-nativesdk = " \
Signature · 1 line
2.43.0
PATCH 2/4 binutils: internal gdb: Fix CVE-2024-53589
In reply to Steve SakomanFrom: Yash Shinde <[email protected]>
CVE: CVE-2024-53589
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0037-CVE-2024-53589.patch | 92 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0037-CVE-2024-53589.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -71,5 +71,6 @@ SRC_URI = "\ file://0034-CVE-2022-48064.patch \ file://0035-CVE-2023-39129.patch \ file://0036-CVE-2023-39130.patch \ + file://0037-CVE-2024-53589.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0037-CVE-2024-53589.patch new file +92 -0
92 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 3/4 gdb: Fix CVE-2024-53589
In reply to Steve SakomanFrom: Yash Shinde <[email protected]>
CVE: CVE-2024-53589
--- meta/recipes-devtools/gdb/gdb.inc | 1 + .../gdb/gdb/0014-CVE-2024-53589.patch | 92 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 meta/recipes-devtools/gdb/gdb/0014-CVE-2024-53589.patch
meta/recipes-devtools/gdb/gdb.inc +1 -0
@@ -17,5 +17,6 @@ SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \ file://0011-CVE-2023-39128.patch \ file://0012-CVE-2023-39129.patch \ file://0013-CVE-2023-39130.patch \ + file://0014-CVE-2024-53589.patch \ " SRC_URI[sha256sum] = "1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32"
meta/recipes-devtools/gdb/gdb/0014-CVE-2024-53589.patch new file +92 -0
92 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 4/4 glibc: stable 2.35 branch updates
In reply to Steve SakomanFrom: Deepesh Varatharajan <[email protected]>
549d831579 stdlib: Test using setenv with updated environ [BZ #32588] 8b5d4be762 Fix underallocation of abort_msg_s struct (CVE-2025-0395) 525e5f13de stdlib: Simplify buffer management in canonicalize 5eae275400 realpath: Bring back GNU extension on ENOENT and EACCES [BZ #28996] 8a82a76a42 realpath: Do not copy result on failure (BZ #28815) e369114462 misc: Add support for Linux uio.h RWF_NOAPPEND flag 3f1ab0ed66 nptl: Convert tst-setuid2 to test-driver76adee6e0f support: Add xpthread_cond_signal wrapperc3beedeb70 elf: Support recursive use of dynamic TLS in interposed malloc f48d763ab8 elf: Avoid some free (NULL) calls in _dl_update_slotinfo 710057676d sysdeps/x86/Makefile: Split and sort testsa4207d4e83 x86: Only align destination to 1x VEC_SIZE in memset 4x loop 889f99c149 elf: Fix slow tls access after dlopen [BZ #19924] 543efedcb3 x86: Check the lower byte of EAX of CPUID leaf 2 [BZ #30643] 41a3e51233 x86_64: Add log1p with FMA0d1c70aa4c x86_64: Add expm1 with FMA516180d399 x86_64: Add log2 with FMA30384b91ad x86_64: Sort fpu/multiarch/Makefiled626c31ce5 x86: Avoid integer truncation with large cache sizes (bug 32470) 7ea35e28b4 nptl: initialize cpu_id_start prior to rseq registration 47d70ca8d9 nptl: initialize rseq area prior to registration
--- meta/recipes-core/glibc/glibc-version.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-version.inc +1 -1
@@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.35/master" PV = "2.35" -SRCREV_glibc ?= "37214df5f103f4075cf0a79a227e70f3e064701c" +SRCREV_glibc ?= "549d8315791aa8176ff1537db3e09c185c6e602f" SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
Signature · 1 line
2.43.0