Red Hat Bugzilla – Bug 469151
CVE-2008-4311 dbus: incorrect use of [send|receive]_requested_reply policy rule attribute in system.conf
Last modified: 2015-02-17 10:31:36 EST
Joachim Breitner discovered that dbus policy rules with send_requested_reply="true" condition are not evaluated correctly and are also applied to non-reply messages. This may result in the request message being allowed, even though it should have been denied. This occurs when service does not specify explicit <deny> rules and relies on the default <deny send_interface="*"/> rule listed in system.conf file that may be overriden by the <allow send_requested_reply="true"/> rule, resulting in a bypass of the intended access restrictions policy.
Note: Most services using system bus seem to specify context="default" deny rules explicitly without relying on the default system bus access policy.
Brief summary of my upstream comment:
Current behaviour seems to comply with the semantics documented in dbus-daemon(1) man page. Attributes [send|receive]_requested_reply are defined to be ignored for non-reply messages. Therefore default system.conf configuration file seems to rely on an incorrect assumption that rule:
only applies to reply messages, while it's actually <allow/> for non-replies.
We may need to change default system.conf to list:
<allow send_requested_reply="true" send_type="method_return"/>
<allow send_requested_reply="true" send_type="error"/>
(and similar for receive_requested_reply)
to make sure rule only applies to intended message types. Other patches proposed so far change previously defined semantics.
Another update from the upstream bug:
seems to be problematic, as too many applications mistakenly rely on this rule. Each dbus message is checked against policy two times - first to check if sender is permitted to send the message, second to check if receiver is permitted to receive the message.
So the applications may have all send rules defined correctly, very few have any rules receive rules.
Is there a patch for this yet upstream?
Created attachment 323869 [details]
The change I proposed in the upstream bug
Yeah, lets see if davidz can get some upstream comment on it. I don't feel comfortable putting this into RHEL until we get _somebody_ from upstream to sign off on it.
Public now via new upstream release 1.2.6:
From CVE entry:
The default configuration of system.conf in D-Bus (aka DBus) before
1.2.6 omits the send_type attribute in certain rules, which allows
local users to bypass intended access restrictions by (1) sending
messages, related to send_requested_reply; and possibly (2) receiving
messages, related to receive_requested_reply.
Adding other references:
I am going to defer this issue. The fix is very complicated and the risk outweighs the potential reward. This flaw may be fixed in a future dbus update.
Red Hat Enterprise Linux 5 is now in Production 3 Phase of the support and maintenance life cycle. This has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.