Bug#781602: systemd: Invalid DBus call causes systemd to stop responding to DBus alltogether

Christian Seiler christian at iwakd.de
Tue Mar 31 14:52:57 BST 2015


Package: systemd
Version: 215-12
Severity: normal

Dear Maintainers,

while I was trying to set a different log level for systemd via DBus, I
accidentally forgot that the 'Set' method for DBus properties expects a
variant as a data type. So when using the following (wrong) command:

dbus-send --print-reply --system --dest=org.freedesktop.systemd1 \
     /org/freedesktop/systemd1 org.freedesktop.DBus.Properties.Set \
     string:org.freedesktop.systemd1.Manager string:LogLevel \
     string:info

It won't complete (no answer is given) and systemd stops responding to
DBus alltogether (at least on the systemd bus, the private socket is
apparently still working, and systemd itself still does things, so it
isn't completely crashed).

The only thing (besides a reboot) that could make systemd respond to
DBus again was

systemctl daemon-reexec

(daemon-reload is not sufficient) Then everything works again as
expected.

My expectation would be that the DBus call should simply return an
error here, since the method call signature was not properly followed,
but not to cause systemd's DBus interface to hang.

For reference: the correct call actually works (and sets the log level):

dbus-send --print-reply --system --dest=org.freedesktop.systemd1 \
     /org/freedesktop/systemd1 org.freedesktop.DBus.Properties.Set \
     string:org.freedesktop.systemd1.Manager string:LogLevel \
     variant:string:info
     ^^^^^^^^
      (this has to be there)

There is probably something wrong with the DBus parameter validation
code. It could possibly be security related because of that (but I
didn't have the time yet to look at it more closely, so I don't know),
and since the specific method call I used isn't accessible to
unprivileged users (they can only read the property, not write it),
I've left the severity at 'normal' for now.

Thanks,
Christian


-- Package-specific info:

-- System Information:
Debian Release: 8.0
   APT prefers testing-updates
   APT policy: (500, 'testing-updates'), (500, 'testing'), (100, 
'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  acl             2.2.52-2
ii  adduser         3.113+nmu3
ii  initscripts     2.88dsf-58
ii  libacl1         2.2.52-2
ii  libaudit1       1:2.4-1+b1
ii  libblkid1       2.25.2-5
ii  libc6           2.19-15
ii  libcap2         1:2.24-7
ii  libcap2-bin     1:2.24-7
ii  libcryptsetup4  2:1.6.6-5
ii  libgcrypt20     1.6.2-4+b1
ii  libkmod2        18-3
ii  liblzma5        5.1.1alpha+20120614-2+b3
ii  libpam0g        1.1.8-3.1
ii  libselinux1     2.3-2
ii  libsystemd0     215-12
ii  mount           2.25.2-5
ii  sysv-rc         2.88dsf-58
ii  udev            215-12
ii  util-linux      2.25.2-5

Versions of packages systemd recommends:
ii  dbus            1.8.16-1
ii  libpam-systemd  215-12

Versions of packages systemd suggests:
pn  systemd-ui  <none>

-- no debconf information



More information about the Pkg-systemd-maintainers mailing list