File dbus-cve-2012-3524-2.patch of Package dbus-1.openSUSE_Evergreen_11.4
From 4b351918b9f70eaedbdb3ab39208bc1f131efae0 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 28 Sep 2012 01:35:22 +0000
Subject: hardening: Ensure _dbus_check_setuid() is initialized threadsafe manner
This is a highly theoretical concern, but we might as well.
https://bugs.freedesktop.org/show_bug.cgi?id=52202
---
diff --git a/dbus/dbus-sysdeps-pthread.c b/dbus/dbus-sysdeps-pthread.c
index c9ec9e5..c60457b 100644
--- a/dbus/dbus-sysdeps-pthread.c
+++ b/dbus/dbus-sysdeps-pthread.c
@@ -359,6 +359,11 @@ check_monotonic_clock (void)
dbus_bool_t
_dbus_threads_init_platform_specific (void)
{
+ /* These have static variables, and we need to handle both the case
+ * where dbus_threads_init() has been called and when it hasn't;
+ * so initialize them before any threads are allowed to enter.
+ */
check_monotonic_clock ();
+ (void) _dbus_check_setuid ();
return dbus_threads_init (&pthread_functions);
}
--
cgit v0.9.0.2-2-gbebe