]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
CVE-2015-0245: prevent forged ActivationFailure from non-root processes
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 26 Jan 2015 20:09:56 +0000 (20:09 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 4 Feb 2015 16:45:16 +0000 (16:45 +0000)
Without either this rule or better checking in dbus-daemon, non-systemd
processes can make dbus-daemon think systemd failed to activate a system
service, resulting in an error reply back to the requester.

This is redundant with the fix in the C code (which I consider to be
the real solution), but is likely to be easier to backport.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88811
Reviewed-by: Alban Crequy
Reviewed-by: David King
Reviewed-by: Philip Withnall
bus/system.conf.in

index 92f4cc420ff302dbff2977ac5d8a791e557aef8c..851b9e6399bfc76273788bc3081e5567e6adfd0a 100644 (file)
     <deny send_destination="org.freedesktop.DBus"
           send_interface="org.freedesktop.DBus"
           send_member="UpdateActivationEnvironment"/>
+    <deny send_destination="org.freedesktop.DBus"
+          send_interface="org.freedesktop.systemd1.Activator"/>
+  </policy>
+
+  <!-- Only systemd, which runs as root, may report activation failures. -->
+  <policy user="root">
+    <allow send_destination="org.freedesktop.DBus"
+           send_interface="org.freedesktop.systemd1.Activator"/>
   </policy>
 
   <!-- Config files are placed here that among other things, punch