Products › lamco-dbus-tools › Docs
D-Bus policy and exposure: What a system bus audit reads
D-Bus policy and exposure: How an audit reads bus policy files, service files, units and polkit actions together, and evaluates policy as each daemon does.
Describes version 0.4.1, with counts from Debian 13 and Fedora 45 and measurements of 2026-11-28 to 30. The commands are in auditing a machine, asking whether this may send that and keeping a baseline, and the evaluator is in bus policy evaluation.
Services on the system bus often run as root and take requests from any user. What stands between a user and a root service is a set of files that few people read together: The bus's policy, the file that says how the service is started and as whom, the unit that runs it, and the permission actions it may check. The audit reads them together.
What it answers
For each name on a machine's bus:
- Who may own it.
- Who may call what on it.
- What starts it, as which user, and how hardened that unit is.
- Which permission actions exist around it.
- What changed since the last audit.
How much there is
On one Debian 13 desktop: 40 policy files holding 597 rules, 28 service files for the system bus and 61 for the session bus, 287 permission actions, and 24 security profiles with 75 D-Bus rules. From files alone that produced a table of 54 bus names with their service files, units and hardening scores.
Evaluating policy
The audit can answer "may this sender send this message to that name", and say which rule decided. It does so with its own evaluator, written from the daemons' rules, because the daemons don't offer one.
The rules are short and the exceptions are what matter:
- A rule that names a destination matches whoever owns that name, not the text in the message.
- A deny by interface also catches a call with no interface on dbus-daemon, and doesn't on dbus-broker.
- A rule that names only an error allows an ordinary call.
- A block for a user that doesn't exist is dropped whole, with its denials.
- The two implementations disagree in measured cases. See two bus implementations.
Neither daemon ships test cases. So the toolkit builds its own: It starts each real daemon privately with a policy, sends probes, and keeps the answers. The evaluator has to agree with those. A construct with no such case is reported as not evaluated.
What existing checks miss
Debian's package checker has six D-Bus checks and the RPM one five. Each matches a pattern in a single rule. None works out what a message would be allowed to do, so a rule that's dangerous only in combination passes.
What the findings rest on
Sixteen published security reviews of D-Bus services, from 2024 to 2026, give the classes of problem. The audit sorts each by how it can be known:
| Known from | Examples |
|---|---|
| Files alone | An allow with no destination; a name any user may own; a root service with an unhardened unit; a policy that reads differently on the two bus implementations; an action granted to anyone without a prompt |
| Watching | A service that answers a privileged-looking call with no permission check seen beside it |
| Probing, only when asked | Properties any caller can read or set |
| Not at all | Which permission action a method checks. Nothing declares it |
The audit says which of these it did. It never reports a machine as clean on the strength of files alone.
Over time
An audit's collection is a recording like any other, so two of them compare. New names, new or changed rules, looser permission defaults and lower hardening scores are reported against a baseline, in a format security tooling already reads.
The session bus
It has no policy by default. Any program in a session can call any other. The audit of a session bus lists the names that amount to running code or reading files as the user, and which programs hold them.