From: Simon McVittie Date: Fri, 7 Oct 2016 20:25:08 +0000 (+0100) Subject: bus_driver_handle_message: reject ActivationFailure if unprivileged X-Git-Tag: dbus-1.11.6~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3da9ad2a9fcd9ae07f6c04b00594349806aad1f9;p=thirdparty%2Fdbus.git bus_driver_handle_message: reject ActivationFailure if unprivileged Specifically, this will allow ActivationFailure messages from our own uid or from root, but reject them otherwise, even if the bus configuration for who can own org.freedesktop.systemd1 is entirely wrong due to something like CVE-2014-8148. Signed-off-by: Simon McVittie Reviewed-by: Colin Walters Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98157 --- diff --git a/bus/driver.c b/bus/driver.c index 39157bd7b..24ac44f70 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -2637,6 +2637,15 @@ bus_driver_handle_message (DBusConnection *connection, BusContext *context; DBusConnection *systemd; + /* This is a directed signal, not a method call, so the log message + * is a little weird (it talks about "calling" ActivationFailure), + * but it's close enough */ + if (!bus_driver_check_caller_is_privileged (connection, + transaction, + message, + error)) + return FALSE; + context = bus_connection_get_context (connection); systemd = bus_driver_get_owner_of_name (connection, "org.freedesktop.systemd1");