|
|
242c1e |
From b4623939316807928680913ece9a6cefc23a73b2 Mon Sep 17 00:00:00 2001
|
|
|
242c1e |
From: "Dmitry V. Levin" <ldv@altlinux.org>
|
|
|
242c1e |
Date: Tue, 10 Nov 2020 08:00:00 +0000
|
|
|
242c1e |
Subject: [PATCH 158/162] tests: disable TEST_MSGCTL_BOGUS_ADDR in ipc_msg test
|
|
|
242c1e |
on glibc >= 2.31
|
|
|
242c1e |
|
|
|
242c1e |
Starting with commit glibc-2.31~358, on every architecture where
|
|
|
242c1e |
__ASSUME_SYSVIPC_BROKEN_MODE_T is defined, glibc tries to modify the
|
|
|
242c1e |
data provided in the third argument of msgctl call. This results
|
|
|
242c1e |
to segfaults inside glibc if TEST_MSGCTL_BOGUS_ADDR is enabled.
|
|
|
242c1e |
|
|
|
242c1e |
* tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 31) && (__m68k__ || __s390__ ||
|
|
|
242c1e |
(WORDS_BIGENDIAN && (__arm__ || __microblaze__ || __sh__)))]
|
|
|
242c1e |
(TEST_MSGCTL_BOGUS_ADDR): Define to 0.
|
|
|
242c1e |
|
|
|
242c1e |
Reported-by: Sven Schnelle <svens@linux.ibm.com>
|
|
|
242c1e |
---
|
|
|
242c1e |
tests/ipc_msg.c | 11 +++++++++++
|
|
|
242c1e |
1 file changed, 11 insertions(+)
|
|
|
242c1e |
|
|
|
242c1e |
diff --git a/tests/ipc_msg.c b/tests/ipc_msg.c
|
|
|
242c1e |
index 3ab8b90..f7c36cd 100644
|
|
|
242c1e |
--- a/tests/ipc_msg.c
|
|
|
242c1e |
+++ b/tests/ipc_msg.c
|
|
|
242c1e |
@@ -31,6 +31,17 @@
|
|
|
242c1e |
# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
#endif
|
|
|
242c1e |
/*
|
|
|
242c1e |
+ * Starting with commit glibc-2.31~358, on every architecture where
|
|
|
242c1e |
+ * __ASSUME_SYSVIPC_BROKEN_MODE_T is defined, glibc tries to modify
|
|
|
242c1e |
+ * the data provided in the third argument of msgctl call.
|
|
|
242c1e |
+ */
|
|
|
242c1e |
+#if GLIBC_PREREQ_GE(2, 31) && \
|
|
|
242c1e |
+ (defined __m68k__ || defined __s390__ || \
|
|
|
242c1e |
+ (WORDS_BIGENDIAN && \
|
|
|
242c1e |
+ (defined __arm__ || defined __microblaze__ || defined __sh__)))
|
|
|
242c1e |
+# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
+#endif
|
|
|
242c1e |
+/*
|
|
|
242c1e |
* Before glibc-2.22-122-gbe48165, ppc64 code tried to retrieve data
|
|
|
242c1e |
* provided in third argument of msgctl call (in case of IPC_SET cmd)
|
|
|
242c1e |
* which led to segmentation fault.
|
|
|
242c1e |
diff --git a/tests-m32/ipc_msg.c b/tests-m32/ipc_msg.c
|
|
|
242c1e |
index 3ab8b90..f7c36cd 100644
|
|
|
242c1e |
--- a/tests-m32/ipc_msg.c
|
|
|
242c1e |
+++ b/tests-m32/ipc_msg.c
|
|
|
242c1e |
@@ -31,6 +31,17 @@
|
|
|
242c1e |
# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
#endif
|
|
|
242c1e |
/*
|
|
|
242c1e |
+ * Starting with commit glibc-2.31~358, on every architecture where
|
|
|
242c1e |
+ * __ASSUME_SYSVIPC_BROKEN_MODE_T is defined, glibc tries to modify
|
|
|
242c1e |
+ * the data provided in the third argument of msgctl call.
|
|
|
242c1e |
+ */
|
|
|
242c1e |
+#if GLIBC_PREREQ_GE(2, 31) && \
|
|
|
242c1e |
+ (defined __m68k__ || defined __s390__ || \
|
|
|
242c1e |
+ (WORDS_BIGENDIAN && \
|
|
|
242c1e |
+ (defined __arm__ || defined __microblaze__ || defined __sh__)))
|
|
|
242c1e |
+# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
+#endif
|
|
|
242c1e |
+/*
|
|
|
242c1e |
* Before glibc-2.22-122-gbe48165, ppc64 code tried to retrieve data
|
|
|
242c1e |
* provided in third argument of msgctl call (in case of IPC_SET cmd)
|
|
|
242c1e |
* which led to segmentation fault.
|
|
|
242c1e |
diff --git a/tests-mx32/ipc_msg.c b/tests-mx32/ipc_msg.c
|
|
|
242c1e |
index 3ab8b90..f7c36cd 100644
|
|
|
242c1e |
--- a/tests-mx32/ipc_msg.c
|
|
|
242c1e |
+++ b/tests-mx32/ipc_msg.c
|
|
|
242c1e |
@@ -31,6 +31,17 @@
|
|
|
242c1e |
# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
#endif
|
|
|
242c1e |
/*
|
|
|
242c1e |
+ * Starting with commit glibc-2.31~358, on every architecture where
|
|
|
242c1e |
+ * __ASSUME_SYSVIPC_BROKEN_MODE_T is defined, glibc tries to modify
|
|
|
242c1e |
+ * the data provided in the third argument of msgctl call.
|
|
|
242c1e |
+ */
|
|
|
242c1e |
+#if GLIBC_PREREQ_GE(2, 31) && \
|
|
|
242c1e |
+ (defined __m68k__ || defined __s390__ || \
|
|
|
242c1e |
+ (WORDS_BIGENDIAN && \
|
|
|
242c1e |
+ (defined __arm__ || defined __microblaze__ || defined __sh__)))
|
|
|
242c1e |
+# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
+#endif
|
|
|
242c1e |
+/*
|
|
|
242c1e |
* Before glibc-2.22-122-gbe48165, ppc64 code tried to retrieve data
|
|
|
242c1e |
* provided in third argument of msgctl call (in case of IPC_SET cmd)
|
|
|
242c1e |
* which led to segmentation fault.
|
|
|
242c1e |
--
|
|
|
242c1e |
2.1.4
|
|
|
242c1e |
|