diff options
-rw-r--r-- | meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch | 29 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc_2.40.bb | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch b/meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch new file mode 100644 index 0000000000..c9f3e32f58 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 9d30d58c32fe9d5f8ec6cda79fb11159e6789bcf Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Schwab <schwab@suse.de> | ||
3 | Date: Wed, 25 Sep 2024 11:49:30 +0200 | ||
4 | Subject: [PATCH] Fix missing randomness in __gen_tempname (bug 32214) | ||
5 | |||
6 | Make sure to update the random value also if getrandom fails. | ||
7 | |||
8 | Fixes: 686d542025 ("posix: Sync tempname with gnulib") | ||
9 | |||
10 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=5f62cf88c4530c11904482775b7582bd7f6d80d2] | ||
11 | |||
12 | Signed-off-by: Ola x Nilsson <olani@axis.com> | ||
13 | --- | ||
14 | sysdeps/posix/tempname.c | 2 ++ | ||
15 | 1 file changed, 2 insertions(+) | ||
16 | |||
17 | diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c | ||
18 | index c00fe0c181..fc30958a0c 100644 | ||
19 | --- a/sysdeps/posix/tempname.c | ||
20 | +++ b/sysdeps/posix/tempname.c | ||
21 | @@ -117,6 +117,8 @@ random_bits (random_value *r, random_value s) | ||
22 | succeed. */ | ||
23 | #if !_LIBC | ||
24 | *r = mix_random_values (v, clock ()); | ||
25 | +#else | ||
26 | + *r = v; | ||
27 | #endif | ||
28 | return false; | ||
29 | } | ||
diff --git a/meta/recipes-core/glibc/glibc_2.40.bb b/meta/recipes-core/glibc/glibc_2.40.bb index 71b89ac9ff..3e855b19d8 100644 --- a/meta/recipes-core/glibc/glibc_2.40.bb +++ b/meta/recipes-core/glibc/glibc_2.40.bb | |||
@@ -53,6 +53,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | |||
53 | file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ | 53 | file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ |
54 | file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ | 54 | file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ |
55 | file://0023-tests-Skip-2-qemu-tests-that-can-hang-in-oe-selftest.patch \ | 55 | file://0023-tests-Skip-2-qemu-tests-that-can-hang-in-oe-selftest.patch \ |
56 | file://0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch \ | ||
56 | " | 57 | " |
57 | S = "${WORKDIR}/git" | 58 | S = "${WORKDIR}/git" |
58 | B = "${WORKDIR}/build-${TARGET_SYS}" | 59 | B = "${WORKDIR}/build-${TARGET_SYS}" |