diff --git a/glibc.spec b/glibc.spec index f0c47183e7e5811ccfac4afd0fc2ba1fbed33368..e8684168ce6f52dfe4242b1588730d017b3d3ef9 100644 --- a/glibc.spec +++ b/glibc.spec @@ -66,7 +66,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 50 +Release: 51 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -176,7 +176,7 @@ Patch88: i386-Remove-broken-CAN_USE_REGISTER_ASM_EBP-bug-2877.patch Patch89: x86-use-default-cache-size-if-it-cannot-be-determine.patch Patch90: x86-Fix-__wcsncmp_avx2-in-strcmp-avx2.S-BZ-28755.patch Patch91: x86-Fix-__wcsncmp_evex-in-strcmp-evex.S-BZ-28755.patch -Patch92: fix-CVE-2019-1010023.patch +Patch92: linux-__get_nprocs_sched-do-not-feed-CPU_COUNT_S-wit.patch Patch9000: turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch Patch9001: delete-no-hard-link-to-avoid-all_language-package-to.patch @@ -190,6 +190,7 @@ Patch9008: 0007-add-lowlevellock_2_17_c.patch Patch9009: 0008-add-pause_nocancel_2_17.patch Patch9010: 0009-add-unwind-with-longjmp.patch Patch9011: delete-check-installed-headers-c-and-check-installed.patch +Patch9012: fix-CVE-2019-1010023.patch Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) @@ -1278,6 +1279,10 @@ fi %endif %changelog +* Mon Feb 7 2022 Qingqing Li - 2.34-51 +- Pass the actual number of bytes returned by the kernel. + Fixes: 33099d72e41c ("linux: Simplify get_nprocs") + * Fri Jan 28 2022 Yang Yanchao - 2.34-50 - The default debuginfo management mechanism is deleted. Instead, Use the default macro of RPM. diff --git a/linux-__get_nprocs_sched-do-not-feed-CPU_COUNT_S-wit.patch b/linux-__get_nprocs_sched-do-not-feed-CPU_COUNT_S-wit.patch new file mode 100644 index 0000000000000000000000000000000000000000..0bf8f6d588959340370bc8550602f9fc7acae0a8 --- /dev/null +++ b/linux-__get_nprocs_sched-do-not-feed-CPU_COUNT_S-wit.patch @@ -0,0 +1,30 @@ +From 97ba273b505763325efd802dc3a9562dbba79579 Mon Sep 17 00:00:00 2001 +From: Gleb Fotengauer-Malinovskiy +Date: Tue, 1 Feb 2022 22:39:02 +0000 +Subject: [PATCH] linux: __get_nprocs_sched: do not feed CPU_COUNT_S with + garbage [BZ #28850] + +Pass the actual number of bytes returned by the kernel. + +Fixes: 33099d72e41c ("linux: Simplify get_nprocs") +Reviewed-by: Dmitry V. Levin +--- + sysdeps/unix/sysv/linux/getsysstats.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c +index 4798cc3..c98c8ce 100644 +--- a/sysdeps/unix/sysv/linux/getsysstats.c ++++ b/sysdeps/unix/sysv/linux/getsysstats.c +@@ -44,7 +44,7 @@ __get_nprocs_sched (void) + int r = INTERNAL_SYSCALL_CALL (sched_getaffinity, 0, cpu_bits_size, + cpu_bits); + if (r > 0) +- return CPU_COUNT_S (cpu_bits_size, (cpu_set_t*) cpu_bits); ++ return CPU_COUNT_S (r, (cpu_set_t*) cpu_bits); + else if (r == -EINVAL) + /* The input buffer is still not enough to store the number of cpus. This + is an arbitrary values assuming such systems should be rare and there +-- +1.8.3.1 +