From 0e3d8f3204aca9c3335ac22e864e5df6f9463170 Mon Sep 17 00:00:00 2001 From: HukunaMatata Date: Sat, 20 Mar 2021 15:04:34 +0800 Subject: [PATCH] Handle SEM_STAT_ANY the same way as SEM_STAT so that the buffer argument of SEM_STAT_ANY is properly passed to the kernel and back. --- ...ANY-the-same-way-as-SEM_STAT-so-that.patch | 41 +++++++++++++++++++ glibc.spec | 8 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Handle-SEM_STAT_ANY-the-same-way-as-SEM_STAT-so-that.patch diff --git a/Handle-SEM_STAT_ANY-the-same-way-as-SEM_STAT-so-that.patch b/Handle-SEM_STAT_ANY-the-same-way-as-SEM_STAT-so-that.patch new file mode 100644 index 0000000..f03cb35 --- /dev/null +++ b/Handle-SEM_STAT_ANY-the-same-way-as-SEM_STAT-so-that.patch @@ -0,0 +1,41 @@ +From 574500a108be1d2a6a0dc97a075c9e98371aba Tue Sep 29 17:10:20 2020 +From: Dmitry V. Levin +Date: Tue, 29 Sep 2020 17:10:20 +0800 +Subject: [PATCH] Handle SEM_STAT_ANY the same way as SEM_STAT so that the + buffer argument of SEM_STAT_ANY is properly passed to the kernel and back. + +--- + sysdeps/unix/sysv/linux/semctl.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c +index 0c3eb093..15ed333b 100644 +--- a/sysdeps/unix/sysv/linux/semctl.c ++++ b/sysdeps/unix/sysv/linux/semctl.c +@@ -72,6 +72,7 @@ __new_semctl (int semid, int semnum, int cmd, ...) + case IPC_STAT: /* arg.buf */ + case IPC_SET: + case SEM_STAT: ++ case SEM_STAT_ANY: + case IPC_INFO: /* arg.__buf */ + case SEM_INFO: + va_start (ap, cmd); +@@ -127,6 +128,7 @@ __semctl_mode16 (int semid, int semnum, int cmd, ...) + case IPC_STAT: /* arg.buf */ + case IPC_SET: + case SEM_STAT: ++ case SEM_STAT_ANY: + case IPC_INFO: /* arg.__buf */ + case SEM_INFO: + va_start (ap, cmd); +@@ -160,6 +162,7 @@ __old_semctl (int semid, int semnum, int cmd, ...) + case IPC_STAT: /* arg.buf */ + case IPC_SET: + case SEM_STAT: ++ case SEM_STAT_ANY: + case IPC_INFO: /* arg.__buf */ + case SEM_INFO: + va_start (ap, cmd); +-- +2.23.0 + diff --git a/glibc.spec b/glibc.spec index 9c49e51..83d20b0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -60,7 +60,7 @@ ############################################################################## Name: glibc Version: 2.31 -Release: 9 +Release: 10 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -94,6 +94,7 @@ Patch6014: Disable-warnings-due-to-deprecated-libselinux-symbol.patch Patch6015: rtld-Avoid-using-up-static-TLS-surplus-for-optimizat.patch Patch6016: Fix-CVE-2020-27618-iconv-Accept-redundant-shift-sequences.patch Patch6017: elf-Allow-dlopen-of-filter-object-to-work-BZ-16272.patch +Patch6018: Handle-SEM_STAT_ANY-the-same-way-as-SEM_STAT-so-that.patch Patch9000: delete-no-hard-link-to-avoid-all_language-package-to.patch Patch9001: build-extra-libpthreadcond-so.patch @@ -1191,6 +1192,11 @@ fi %doc hesiod/README.hesiod %changelog +* Sat Mar 20 2021 xuhuijie - 2.31-10 +- semctl: SEM_STAT_ANY fails to pass the buffer specified by + the caller to the kernel [BZ #26637] + https://sourceware.org/bugzilla/show_bug.cgi?id=26637 + * Tue Jan 26 2021 shanzhikun - 2.31-9 - elf: Allow dlopen of filter object to work [BZ #16272] https://sourceware.org/bugzilla/show_bug.cgi?id=16272 -- Gitee