Package: fwupd
Version: 2.0.20-1~deb13u1
Severity: normal

Dear Maintainer,

fwupd generates an MOTD claiming that one firmware upgrade is available,
while `fwupdmgr get-upgrades` reports `No updates available`.

System information:

  Debian GNU/Linux 13.6 (trixie)
  Kernel: 6.12.101+deb13-amd64
  fwupd: 2.0.20-1~deb13u1

Observed behavior:

  $ fwupdmgr get-upgrades
  No updates available

  $ sed -n '1,80p' /run/motd.d/85-fwupd

  1 device has a firmware upgrade available.
  Run `fwupdmgr get-upgrades` for more information.

This is not a stale runtime file. Restarting fwupd caused
/run/motd.d/85-fwupd to be regenerated about six seconds after daemon
startup, with the same incorrect message.

The apparent trigger is an unsupported-but-updatable UEFI KEK device:

  * Current version: 2011
  * Device has the UPDATABLE flag.
  * Device does not have the SUPPORTED flag.
  * `fwupdmgr get-releases` finds a 2023 Secure Boot KEK Configuration
    Update.
  * `fwupdmgr get-upgrades` categorizes the device as having no available
    firmware updates.

Update history contains only successful updates. No device is currently
reported as FAILED, FAILED_TRANSIENT, or NEEDS_REBOOT.

The source appears to explain the discrepancy. In
fu_engine_update_motd(), fwupd checks whether a device is UPDATABLE before
calling fu_engine_get_upgrades(), but it does not require the device to
have the SUPPORTED flag. If the internal lookup returns a release, the
MOTD upgrade count is incremented.

In contrast, fu_util_get_updates(), used by `fwupdmgr get-upgrades`,
skips devices without the SUPPORTED flag.

The same missing SUPPORTED check appears in upstream fwupd 2.1.7 and the
current main branch, so this does not appear Debian-specific.

Expected behavior:

The MOTD should advertise only firmware upgrades that
`fwupdmgr get-upgrades` would offer. An unsupported device should not
increase the MOTD upgrade count.

A likely fix is for fu_engine_update_motd() to skip devices that do not
have FWUPD_DEVICE_FLAG_SUPPORTED before checking for upgrades, matching
the command-line client's eligibility check.

Related upstream issue:

https://github.com/fwupd/fwupd/issues/9523

That issue has the same visible symptom, but its fixes address
NEEDS_REBOOT and failed update states. Those checks are already present
in this version and do not cover unsupported devices.

Relevant current source:

https://github.com/fwupd/fwupd/blob/2.1.7/src/fu-engine-helper.c
https://github.com/fwupd/fwupd/blob/2.1.7/src/fu-util.c


-- System Information:
Debian Release: 13.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.101+deb13-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set 
to C.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fwupd depends on:
ii  libarchive13t64             3.7.4-4+deb13u1
ii  libblkid1                   2.41.5-0+deb13u1
ii  libc6                       2.41-12+deb13u3
ii  libcbor0.10                 0.10.2-2
ii  libcurl3t64-gnutls          8.14.1-2+deb13u4
ii  libdrm-amdgpu1              2.4.124-2
ii  libdrm2                     2.4.124-2
ii  libflashrom1                1.4.0-3
ii  libfwupd3                   2.0.20-1~deb13u1
ii  libglib2.0-0t64             2.84.4-3~deb13u3
ii  libgnutls30t64              3.8.9-3+deb13u4
ii  libjcat1                    0.2.3-1
ii  libjson-glib-1.0-0          1.10.6+ds-2
ii  liblzma5                    5.8.1-1+deb13u1
ii  libmbim-glib4               1.32.0-1
ii  libmbim-proxy               1.32.0-1
ii  libmm-glib0                 1.24.0-1+deb13u1
ii  libmnl0                     1.0.5-3
ii  libpolkit-gobject-1-0       126-2
ii  libprotobuf-c1              1.5.1-1
ii  libqmi-glib5                1.36.0-1
ii  libqmi-proxy                1.36.0-1
ii  libreadline8t64             8.2-6
ii  libsqlite3-0                3.46.1-7+deb13u1
ii  libsystemd0                 257.13-1~deb13u1
ii  libtss2-esys-3.0.2-0t64     4.1.3-1.2
ii  libusb-1.0-0                2:1.0.28-1
ii  libxmlb2                    0.3.22-1
ii  shared-mime-info            2.4-5+b2
ii  systemd [systemd-sysusers]  257.13-1~deb13u1
ii  zlib1g                      1:1.3.dfsg+really1.3.1-1+b1

Versions of packages fwupd recommends:
ii  bolt                               0.9.8-1
ii  dbus [default-dbus-system-bus]     1.16.2-2
ii  fwupd-amd64-signed [fwupd-signed]  1:1.7+1
ii  jq                                 1.7.1-6+deb13u3
ii  python3                            3.13.5-1
ii  udisks2                            2.10.1-12.1+deb13u2

Versions of packages fwupd suggests:
pn  gir1.2-fwupd-2.0  <none>

-- Configuration Files:
/etc/fwupd/fwupd.conf [Errno 13] Permission denied: '/etc/fwupd/fwupd.conf'
/etc/fwupd/remotes.d/lvfs-testing.conf changed [not included]
/etc/fwupd/remotes.d/lvfs.conf changed [not included]

-- no debconf information

Reply via email to