https://bugs.kde.org/show_bug.cgi?id=526940

            Bug ID: 526940
           Summary: Login Screen KCM: Apply does nothing for wallpaper
                    packages with many files ("Remote peer disconnected")
    Classification: Plasma
           Product: plasma-login-manager
      Version First 6.6.4
       Reported In:
          Platform: RedHat Enterprise Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

Created attachment 197013
  --> https://bugs.kde.org/attachment.cgi?id=197013&action=edit
strace -f of kcmplasmalogin_authhelper (run manually as root) while pressing
Apply. See line 1376: recvmsg of performAction, msg_flags has MSG_CTRUNC.

Environment:
- Rocky Linux 10.2, Wayland
- plasma-login-manager 6.6.4-1.el10_2
- kcm-plasmalogin 6.6.4-1.el10_2
- polkit 125-4.el10_2.1, systemd 257-23.el10_2.2

Steps to reproduce:
1. System Settings -> Login Screen -> Configure Appearance
2. Select a wallpaper package that contains many per-resolution entries (e.g.
rocky-arizona, rocky-abstract-1, rocky-quartz-forest from
/usr/share/wallpapers; each entry is a symlink to one of two images)
3. Press Apply

Actual result:
- No password prompt appears
- /etc/plasmalogin.conf and /var/lib/plasmalogin/wallpapers are not modified
- No error shown in the UI
- Console output of kcmshell6 kcm_plasmalogin: kf.auth: "Remote peer
disconnected"

Expected result:
The wallpaper is saved, or at least an error is shown to the user.

Working case:
Selecting a single image file (jpg/png) with "Add image" works.

Analysis:
- busctl monitor: the client (systemsettings) sends
org.kde.kf6auth.performAction for org.kde.kcontrol.kcmplasmalogin.save to the
helper. About 3 ms later the client gets
  org.freedesktop.DBus.Error.NoReply "Remote peer disconnected".
- strace of /usr/libexec/kf6/kauth/kcmplasmalogin_authhelper (started
manually): the helper receives the performAction message. The D-Bus message
header declares 67 unix fds (UNIX_FDS field = 0x43), but the recvmsg control
buffer is 80 bytes, which only holds 16 fds, and msg_flags contains MSG_CTRUNC.
The helper does not process the request further and exits with status 0 after
its idle timeout. No coredump, no AVC.
- The helper never sends a CheckAuthorization request to polkit (only
systemsettings itself sends non-interactive checks with flags=0), which is why
no authentication dialog appears.
- A second machine with identical package versions works, because its
configured wallpaper is a single file.

Likely cause: the KCM passes one file descriptor per file of the wallpaper
package, which exceeds the per-message fd limit (apparently 16, libdbus
default) on the helper side.

Suggested fix: pass fewer fds (e.g. only the files actually needed, resolving
symlinks and de-duplicating), and/or raise the limit on the helper connection.
At minimum, report the failure to the user instead of failing silently.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to