|
|
242c1e |
From af1e2888699afc985d7f354b875c517531dff4ea Mon Sep 17 00:00:00 2001
|
|
|
242c1e |
From: "Dmitry V. Levin" <ldv@altlinux.org>
|
|
|
242c1e |
Date: Sat, 12 Sep 2020 08:00:00 +0000
|
|
|
242c1e |
Subject: [PATCH 157/162] tests/ipc_msg.c: disable TEST_MSGCTL_BOGUS_ADDR on
|
|
|
242c1e |
glibc >= 2.32
|
|
|
242c1e |
|
|
|
242c1e |
Starting with commit glibc-2.32~83, on every 32-bit architecture where
|
|
|
242c1e |
32-bit time_t support is enabled, glibc tries to retrieve the data
|
|
|
242c1e |
provided in the third argument of msgctl call. This results to
|
|
|
242c1e |
segfaults inside glibc if TEST_MSGCTL_BOGUS_ADDR is enabled.
|
|
|
242c1e |
|
|
|
242c1e |
* tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 32) && __TIMESIZE != 64]
|
|
|
242c1e |
(TEST_MSGCTL_BOGUS_ADDR): Define to 0.
|
|
|
242c1e |
|
|
|
242c1e |
Reported-by: Ruinland ChuanTzu Tsai <ruinland@andestech.com>
|
|
|
242c1e |
---
|
|
|
242c1e |
tests/ipc_msg.c | 11 ++++++++++-
|
|
|
242c1e |
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
242c1e |
|
|
|
242c1e |
diff --git a/tests/ipc_msg.c b/tests/ipc_msg.c
|
|
|
242c1e |
index dd0f303..3ab8b90 100644
|
|
|
242c1e |
--- a/tests/ipc_msg.c
|
|
|
242c1e |
+++ b/tests/ipc_msg.c
|
|
|
242c1e |
@@ -20,12 +20,21 @@
|
|
|
242c1e |
# define MSG_STAT_ANY 13
|
|
|
242c1e |
#endif
|
|
|
242c1e |
|
|
|
242c1e |
+#undef TEST_MSGCTL_BOGUS_ADDR
|
|
|
242c1e |
+
|
|
|
242c1e |
+/*
|
|
|
242c1e |
+ * Starting with commit glibc-2.32~83, on every 32-bit architecture
|
|
|
242c1e |
+ * where 32-bit time_t support is enabled, glibc tries to retrieve
|
|
|
242c1e |
+ * the data provided in the third argument of msgctl call.
|
|
|
242c1e |
+ */
|
|
|
242c1e |
+#if GLIBC_PREREQ_GE(2, 32) && defined __TIMESIZE && __TIMESIZE != 64
|
|
|
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 |
-#undef TEST_MSGCTL_BOGUS_ADDR
|
|
|
242c1e |
#if GLIBC_PREREQ_LT(2, 23) && (defined POWERPC64 || defined POWERPC64LE)
|
|
|
242c1e |
# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
#endif
|
|
|
242c1e |
diff --git a/tests-m32/ipc_msg.c b/tests-m32/ipc_msg.c
|
|
|
242c1e |
index dd0f303..3ab8b90 100644
|
|
|
242c1e |
--- a/tests-m32/ipc_msg.c
|
|
|
242c1e |
+++ b/tests-m32/ipc_msg.c
|
|
|
242c1e |
@@ -20,12 +20,21 @@
|
|
|
242c1e |
# define MSG_STAT_ANY 13
|
|
|
242c1e |
#endif
|
|
|
242c1e |
|
|
|
242c1e |
+#undef TEST_MSGCTL_BOGUS_ADDR
|
|
|
242c1e |
+
|
|
|
242c1e |
+/*
|
|
|
242c1e |
+ * Starting with commit glibc-2.32~83, on every 32-bit architecture
|
|
|
242c1e |
+ * where 32-bit time_t support is enabled, glibc tries to retrieve
|
|
|
242c1e |
+ * the data provided in the third argument of msgctl call.
|
|
|
242c1e |
+ */
|
|
|
242c1e |
+#if GLIBC_PREREQ_GE(2, 32) && defined __TIMESIZE && __TIMESIZE != 64
|
|
|
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 |
-#undef TEST_MSGCTL_BOGUS_ADDR
|
|
|
242c1e |
#if GLIBC_PREREQ_LT(2, 23) && (defined POWERPC64 || defined POWERPC64LE)
|
|
|
242c1e |
# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
#endif
|
|
|
242c1e |
diff --git a/tests-mx32/ipc_msg.c b/tests-mx32/ipc_msg.c
|
|
|
242c1e |
index dd0f303..3ab8b90 100644
|
|
|
242c1e |
--- a/tests-mx32/ipc_msg.c
|
|
|
242c1e |
+++ b/tests-mx32/ipc_msg.c
|
|
|
242c1e |
@@ -20,12 +20,21 @@
|
|
|
242c1e |
# define MSG_STAT_ANY 13
|
|
|
242c1e |
#endif
|
|
|
242c1e |
|
|
|
242c1e |
+#undef TEST_MSGCTL_BOGUS_ADDR
|
|
|
242c1e |
+
|
|
|
242c1e |
+/*
|
|
|
242c1e |
+ * Starting with commit glibc-2.32~83, on every 32-bit architecture
|
|
|
242c1e |
+ * where 32-bit time_t support is enabled, glibc tries to retrieve
|
|
|
242c1e |
+ * the data provided in the third argument of msgctl call.
|
|
|
242c1e |
+ */
|
|
|
242c1e |
+#if GLIBC_PREREQ_GE(2, 32) && defined __TIMESIZE && __TIMESIZE != 64
|
|
|
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 |
-#undef TEST_MSGCTL_BOGUS_ADDR
|
|
|
242c1e |
#if GLIBC_PREREQ_LT(2, 23) && (defined POWERPC64 || defined POWERPC64LE)
|
|
|
242c1e |
# define TEST_MSGCTL_BOGUS_ADDR 0
|
|
|
242c1e |
#endif
|
|
|
242c1e |
--
|
|
|
242c1e |
2.1.4
|
|
|
242c1e |
|