diff --git a/backport-Use-O_CLOEXEC-in-sysconf-BZ-26791.patch b/backport-Use-O_CLOEXEC-in-sysconf-BZ-26791.patch new file mode 100644 index 0000000000000000000000000000000000000000..fb913cd7088bf36443912f263c7df9ebce79f659 --- /dev/null +++ b/backport-Use-O_CLOEXEC-in-sysconf-BZ-26791.patch @@ -0,0 +1,27 @@ +From d2d714b9fc02e4710d6dc769d8ec2c9dab0eb69a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Maximilian=20Kr=C3=BCger?= +Date: Wed, 11 Nov 2020 11:21:30 +0100 +Subject: [PATCH] Use O_CLOEXEC in sysconf [BZ #26791] + +If sysconf is used in multithreaded processes, various filedescriptors +may leak due to missing O_CLOEXEC. This commit adds the flag. +--- + sysdeps/unix/sysv/linux/sysconf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/unix/sysv/linux/sysconf.c b/sysdeps/unix/sysv/linux/sysconf.c +index 7958a74164..9c5a4cb1a4 100644 +--- a/sysdeps/unix/sysv/linux/sysconf.c ++++ b/sysdeps/unix/sysv/linux/sysconf.c +@@ -81,7 +81,7 @@ __sysconf (int name) + + if (procfname != NULL) + { +- int fd = __open_nocancel (procfname, O_RDONLY); ++ int fd = __open_nocancel (procfname, O_RDONLY | O_CLOEXEC); + if (fd != -1) + { + /* This is more than enough, the file contains a single integer. */ +-- +2.19.1 + diff --git a/backport-aarch64-Add-unwind-information-to-_start-bug-26853.patch b/backport-aarch64-Add-unwind-information-to-_start-bug-26853.patch new file mode 100644 index 0000000000000000000000000000000000000000..6cc49141ad6ad6d58d6172b764bb3358a37329a5 --- /dev/null +++ b/backport-aarch64-Add-unwind-information-to-_start-bug-26853.patch @@ -0,0 +1,41 @@ +From 5edf3d9fd6efe06fda37b2a460e60690a90457a4 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 9 Nov 2020 11:31:04 +0100 +Subject: [PATCH] aarch64: Add unwind information to _start (bug 26853) + +This adds CFI directives which communicate that the stack ends +with this function. + +Fixes bug 26853. +--- + sysdeps/aarch64/start.S | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S +index bad000f5..5360689c 100644 +--- a/sysdeps/aarch64/start.S ++++ b/sysdeps/aarch64/start.S +@@ -43,10 +43,9 @@ + */ + + .text +- .globl _start +- .type _start,#function +-_start: ++ENTRY(_start) + /* Create an initial frame with 0 LR and FP */ ++ cfi_undefined(x30) + mov x29, #0 + mov x30, #0 + +@@ -102,6 +101,7 @@ _start: + __wrap_main: + b main + #endif ++END(_start) + + /* Define a symbol for the first piece of initialized data. */ + .data +-- +2.23.0 + diff --git a/glibc.spec b/glibc.spec index f01fff70b4d30a35b983708475a390c42c6967b1..9204a744722a62ffe42897fd8d9204d280501a34 100644 --- a/glibc.spec +++ b/glibc.spec @@ -59,7 +59,7 @@ ############################################################################## Name: glibc Version: 2.28 -Release: 50 +Release: 51 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -105,6 +105,8 @@ Patch28: backport-aarch64-fix-stack-missing-after-sp-is-updated.patch Patch29: backport-aarch64-push-the-set-of-rules-before-falling-into-sl.patch Patch30: backport-Fix-buffer-overrun-in-EUC-KR-conversion-module-bz-24.patch Patch31: backport-addmntent-Remove-unbounded-alloca-usage-from-getmnte.patch +Patch32: backport-Use-O_CLOEXEC-in-sysconf-BZ-26791.patch +Patch33: backport-aarch64-Add-unwind-information-to-_start-bug-26853.patch Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) @@ -1100,6 +1102,12 @@ fi %doc hesiod/README.hesiod %changelog +* Thu Jan 7 2021 Qingqing Li - 2.28-51 +- Fix bug 26791: Use O_CLOEXEC in sysconf + bugzilla link: https://sourceware.org/bugzilla/show_bug.cgi?id=26791 +- Fix bug 26853: aarch64: Add unwind information to _start + bugzilla link: https://sourceware.org/bugzilla/show_bug.cgi?id=26853 + * Wed Jan 6 2021 Wang Shuo - 2.28-50 - Fix stack missing in _dl_tlsdesc_dynamic Fix buffer overrun in EUC-KR conversion module (bz #24973)