diff options
| author | Ola x Nilsson <olani@axis.com> | 2024-10-23 10:49:04 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-11-11 09:16:26 -0800 |
| commit | 2935d1b1d83bbb5ba73e66d4bdb8d9c52aa7c965 (patch) | |
| tree | 4adbf7378f65edb7e2f2377e6991f4cc89030244 /meta | |
| parent | 26e83c3ca2fcc7ca209f567919fc2d27ff6d28ea (diff) | |
| download | poky-2935d1b1d83bbb5ba73e66d4bdb8d9c52aa7c965.tar.gz | |
glibc: Fix missing randomness in __gen_tempname
Backport the fix for glibc bug 32214.
The missing randomness in early boot may cause some systemd services
to fail when they occasionally try to create tempdirs like
/run/systemd/namespace-aaaaaa at the same time.
The error messages can contain things like
"Failed to set up mount namespacing".
(From OE-Core rev: 92cc48d51c763249b2eb8b4181bc20056fc72264)
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -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}" |
