[Pkg-utopia-maintainers] Bug#1052068: bookworm-pu: package dbus/1.14.10-1~deb12u1

Simon McVittie smcv at debian.org
Sat Sep 16 21:59:55 BST 2023


Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org at packages.debian.org
Usertags: pu
X-Debbugs-Cc: dbus at packages.debian.org
Control: affects -1 + src:dbus

[ Reason ]
New upstream bugfix release

[ Impact ]
If not accepted:
1. On kernels not supporting SO_PEERGROUPS (pre-buster or custom kernels),
   the system bus can crash if its configuration/policy is reloaded
   (ReloadConfig() or SIGHUP) while there is a connection whose associated
   groups can't be found via getgrouplist() (dbus#343 upstream). I
   would rate this as Severity: important, because it'll rarely happen
   (particularly on bookworm), but its effect is to make the system
   unusable for many workloads, notably desktop systems.

2. Relatedly, in similar situations, error reporting was wrong and the error
   message was reported as "(null)" (dbus#343 upstream).
   I would rate this as Severity: normal.

3. D-Bus clients could not retrieve the group IDs of a peer that has a
   primary group ID but no supplementary groups. (dbus!422 upstream)
   I would rate this as Severity: normal.

4. On systems with dbus-user-session but not dbus-x11, $XDG_CURRENT_DESKTOP
   was not always propagated to systemd and D-Bus user/session services,
   which will cause problems for backports of xdg-desktop-portal 1.17+
   and possibly other freedesktop-ish services, which want to use
   $XDG_CURRENT_DESKTOP to implement desktop-environment-dependent
   behaviours like having different default programs. (Debian-specific)
   I would rate this as Severity: wishlist right now, but it becomes
   Severity: important if we backport a newer version of xdg-desktop-portal.

Also, if I need to do a security update for dbus 1.14.x during bookworm's
remaining lifetime (relatively likely), it will have a smaller diffstat if
these changes are already in.

[ Tests ]
This is a straightforward backport of a version that has been in unstable
for 2 weeks and in testing for 10 days. A test-build that differs only in
the changelog and version numbering is available from:
https://people.debian.org/~smcv/12.2/pool/main/d/dbus/
and seems to work fine on my household's bookworm laptop/desktop systems.

Automated build-time tests and as-installed tests (autopkgtest) pass.

References to (1.), etc. below refer to the Impact section above:

I did some manual testing on the error handling changes (1. and 2.) during
their upstream development, by modifying the function that uses
SO_PEERGROUPS to make it always fail so that we'd fall back to the
old-kernel code path, and it behaved correctly. There is also a new
automated test which covers (2.), although it isn't sufficiently full-stack
to cover (1.).

Manual test for (3.):
With current bookworm packages, and NetworkManager installed and running
as root as it normally does,
  dbus-send --print-reply --system --dest=org.freedesktop.DBus \
    /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionCredentials \
    string:org.freedesktop.NetworkManager
prints credentials that include ProcessID = (pid) and UnixUserID = 0.
With the proposed version, it additionally reports UnixGroupIDs = [0]
as expected.

Manual test for (4.):
In a VM with current bookworm packages, after
`apt install --no-install-recommends gdm3 xfce4 xorg; apt purge dbus-x11; reboot`
and logging into an XFCE session, `systemctl --user show-environment`
does not include XDG_CURRENT_DESKTOP.  After rebooting into the proposed
version, the same command's output has XDG_CURRENT_DESKTOP=XFCE as
expected.
(For this test it needs to be a desktop environment that has DesktopNames
in its xsessions file, but doesn't upload XDG_CURRENT_DESKTOP
to dbus-daemon/systemd itself, like GNOME and KDE Plasma do. XFCE and
Enlightenment make good examples)

[ Risks ]
All changes are targeted and reasonably obvious, and all except (4.) have
been through upstream review, so I think the regression risk is small.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
References to (1.), etc. refer to the Impact section above.

bus/connection.c (first diff section), dbus/dbus-sysdeps-util-unix.c,
dbus/dbus-userdb.h, dbus/dbus-userdb-util.c:
    Fix (2.) (dbus#343) by propagating a lower-layer error message through
    the system to higher layers instead of leaving the higher-layer
    error indicator unset

bus/policy.c, bus/connection.c (second diff section),
dbus/dbus-sysdeps-util-win.c:
    Adapt to internal interface changes required by (1.) and (2.) by
    adding a placeholder parameter where needed

bus/connection.c (the rest):
    Fix the crash (1.) (dbus#343) by not leaving a NULL pointer in an
    internal data structure on failure, where it would have caused a NULL
    dereference and crash later on

bus/bus.c, bus/bus.h:
    While fixing (1.) and (2.) (dbus#343) we realised that when the
    problematic situation was reached, if the dbus-daemon didn't crash,
    it would stop reloading unrelated connections' policies, which seems
    unexpected and could possibly have security implications. Now it
    reloads the policies for as many connections as it can, and keeps
    the pre-existing policy (with a warning) for any connections where
    reloading was unsuccessful.

dbus/dbus-sysdeps-unix.c:
    Fix (3.) (dbus!422) by treating a zero-byte return from getsockopt()
    as successfully reporting "0 supplementary groups"

test/:
    Unit test coverage for (2.), and adapt to related internal interface
    changes

AUTHORS, cmake/DBus1ConfigVersion.cmake, configure.ac, NEWS:
    Administrative changes for new upstream release

debian/20dbus_xdg-runtime:
    Debian-specific, installed as /etc/X11/Xsession.d/20dbus_xdg-runtime
    in dbus-user-session. Fix (4.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus_1.14.10-1~deb12u1.diff
Type: text/x-diff
Size: 25027 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/attachments/20230916/4a7b62c1/attachment-0001.diff>


More information about the Pkg-utopia-maintainers mailing list