Commit 7ee5f2b5 authored by Simon McVittie's avatar Simon McVittie

BecomeMonitor: do not overwrite error with another error

If the user gave us a syntactically invalid error name, we'd
overwrite the MatchRuleInvalid error with NoMemory, causing an
assertion failure (crash) in the dbus-daemon.

This is not a denial-of-service vulnerability on the system bus,
because monitoring is a privileged action, and root privilege
is checked before this code is reached. However, it's an annoying
bug on the session bus.

Bug: Philip Withnall's avatarPhilip Withnall <>
Reviewed-by: Ralf Habacker's avatarRalf Habacker <>
Signed-off-by: default avatarSimon McVittie <>
parent c99d733f
......@@ -2006,10 +2006,7 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
rule = bus_match_rule_parse (connection, &str, error);
if (rule == NULL)
BUS_SET_OOM (error);
goto out;
goto out;
/* monitors always eavesdrop */
bus_match_rule_set_client_is_eavesdropping (rule, TRUE);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment