fwupd/src
Richard Hughes f63080fbe2 Allow assigning issues to devices
This allows us to show in the tools if a device is currently affected
by a specific CVE. For instance, we could inform the user that a device
requires a critical firmware update that is being actively exploited.

Note, this also means we can show the user a firmware update is now
required, even though the firmware may not be available on the LVFS.

Also show the issue in the `fwupdmgr security` output, e.g.

    There are devices with issues:
      Samsung — MZVLB2T0HALB-000L7:
       • CVE-2022-12345
       • CVE-2022-54321
2022-02-16 14:50:29 +00:00
..
tests Remove PLUGINBUILDDIR and use G_TEST_SRCDIR and G_TEST_BUILDDIR instead 2021-10-21 18:36:22 +01:00
fu-bluez-backend.c trivial: Cast the g_signal_connect() object to allow static analysis 2022-01-03 22:46:23 +00:00
fu-bluez-backend.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-config.c Allow overriding daemon parameters using /var/etc/fwupd/daemon.conf 2022-01-21 11:52:06 +00:00
fu-config.h Add a sync-bkc subcommand to ensure a known set of firmware versions 2021-11-29 15:16:14 +00:00
fu-debug.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-debug.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-device-list.c trivial: Show why more devices are not marked as updatable 2022-01-13 16:04:31 +00:00
fu-device-list.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-engine-helper.c Enable the MOTD integration when using pam_motd 2021-12-01 20:55:15 +00:00
fu-engine-helper.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-engine-request.c Allow the root user to ask the daemon to quit 2022-01-31 10:47:26 +00:00
fu-engine-request.h Allow the root user to ask the daemon to quit 2022-01-31 10:47:26 +00:00
fu-engine.c Add X-BaseboardManagementController as an acceptable category 2022-02-16 14:08:01 +00:00
fu-engine.h Add a sync-bkc subcommand to ensure a known set of firmware versions 2021-11-29 15:16:14 +00:00
fu-history.c Merge the little-used clear-offline action into clear-results 2022-01-21 15:25:05 +00:00
fu-history.h Merge the little-used clear-offline action into clear-results 2022-01-21 15:25:05 +00:00
fu-idle.c trivial: Add some more annotations for language bindings 2022-01-03 22:46:23 +00:00
fu-idle.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-install-task.c Add the missing PolicyKit actions for (un)trusted downgrade 2021-10-15 13:54:29 +01:00
fu-install-task.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-keyring-utils.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-keyring-utils.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-main.c Do not use gettext before calling setlocale 2022-02-09 16:56:47 +00:00
fu-offline.c trivial: Cast the g_signal_connect() object to allow static analysis 2022-01-03 22:46:23 +00:00
fu-plugin-list.c flashrom: Fix loading devices in coreboot mode 2022-02-09 14:21:03 +00:00
fu-plugin-list.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-polkit-agent.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-polkit-agent.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-progressbar.c trivial: Use ANSI escape codes to fix the progressbar on win32 2022-01-06 19:21:50 +00:00
fu-progressbar.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-remote-list.c trivial: Cast the g_signal_connect() object to allow static analysis 2022-01-03 22:46:23 +00:00
fu-remote-list.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-security-attr.c trivial: Remove some unused variables 2021-12-10 16:00:07 +00:00
fu-security-attr.h Fix 'trivial: fwupdtool security' to show sane results 2021-11-01 11:46:44 +00:00
fu-self-test.c trivial: Cast the g_signal_connect() object to allow static analysis 2022-01-03 22:46:23 +00:00
fu-systemd.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-systemd.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-tool.c Allow assigning issues to devices 2022-02-16 14:50:29 +00:00
fu-udev-backend.c Fix USB4 retimer enumeration 2022-01-14 18:04:13 +00:00
fu-udev-backend.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-usb-backend.c Fix USB4 retimer enumeration 2022-01-14 18:04:13 +00:00
fu-usb-backend.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-util-common.c Allow assigning issues to devices 2022-02-16 14:50:29 +00:00
fu-util-common.h Allow assigning issues to devices 2022-02-16 14:50:29 +00:00
fu-util.c Allow assigning issues to devices 2022-02-16 14:50:29 +00:00
fwupd.gresource.xml Add initial build files and enough code to launch a simple D-Bus daemon 2015-02-26 18:16:40 +00:00
fwupdagent.1 trivial: fix man page sections 2022-01-04 14:17:43 -06:00
fwupdmgr.1 trivial: fix man page sections 2022-01-04 14:17:43 -06:00
fwupdtool.1 trivial: fix man page sections 2022-01-04 14:17:43 -06:00
meson.build trivial: Fix a compile problem when fwupdmgr is built before fu-hash.h 2022-01-20 17:06:14 +00:00
org.freedesktop.fwupd.xml Allow the root user to ask the daemon to quit 2022-01-31 10:47:26 +00:00
README.md trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00

Quirk use

Quirks are defined by creating an INI style file in the compiled in quirk location (typically /usr/share/fwupd/quirks.d).

The quirk is declared by creating a group based upon the DeviceInstanceId or GUID and then mapping out values to keys.

All plugins

All fwupd devices support the following quirks:

Plugin

Sets the plugin to use for a specific hardware device.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the plugin name, e.g. csr
  • Minimum fwupd version: 1.1.0

Flags

Assigns optional quirks to use for a 8bitdo device

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the quirk, e.g. is-bootloader
  • Supported values:
    • none: no device quirks
    • is-bootloader: device is in bootloader mode
  • Minimum fwupd version: 1.0.3

Summary

Sets a summary for a specific hardware device.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • the device summary, e.g. An open source display colorimeter
  • Minimum fwupd version: 1.0.2

Icon

Adds an icon name for a specific hardware device.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the device icon name, e.g. media-removable
  • Minimum fwupd version: 1.0.2

Name

Sets a name for a specific hardware device.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the device name, e.g. ColorHug
  • Minimum fwupd version: 1.0.2

Guid

Adds an extra GUID for a specific hardware device. If the value provided is not already a suitable GUID, it will be converted to one.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the GUID, e.g. 537f7800-8529-5656-b2fa-b0901fe91696
  • Minimum fwupd version: 1.0.3

CounterpartGuid

Adds an counterpart GUID for a specific hardware device. If the value provided is not already a suitable GUID, it will be converted to one. A counterpart GUID is typically the GUID of the same device in bootloader or runtime mode, if they have a different device PCI or USB ID. Adding this type of GUID does not cause a "cascade" by matching using the quirk database.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the GUID, e.g. 537f7800-8529-5656-b2fa-b0901fe91696
  • Minimum fwupd version: 1.1.2

ParentGuid

Adds an extra GUID to mark as the parent device. If the value provided is not already a suitable GUID, it will be converted to one.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the GUID, e.g. 537f7800-8529-5656-b2fa-b0901fe91696
  • Minimum fwupd version: 1.1.2

Children

Adds one or more virtual devices to a physical device. To set the object type of the child device use a pipe before the object type, for instance: FuRts54xxDeviceUSB\VID_0763&PID_2806&I2C_01 If the type of device is not specified the parent device type is used. If the values provided are not already suitable GUIDs, they will be converted.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: The virtual device, delimited by a comma
  • Minimum fwupd version: 1.1.2

Vendor

Sets a vendor name for a specific hardware device.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the vendor, e.g. Hughski Limited
  • Minimum fwupd version: 1.0.3

VendorId

Sets a vendor ID for a specific hardware device.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: the vendor, e.g. USB:0x123A
  • Minimum fwupd version: 1.1.2

Version

Sets a version for a specific hardware device.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: Version number, e.g. 1.2
  • Minimum fwupd version: 1.0.3

FirmwareSizeMin

Sets the minimum allowed firmware size.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: A number in bytes, e.g. 512
  • Minimum fwupd version: 1.1.2

FirmwareSizeMax

Sets the maximum allowed firmware size.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: A number in bytes, e.g. 1024
  • Minimum fwupd version: 1.1.2

InstallDuration

Sets the estimated time to flash the device

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: A number in seconds, e.g. 60
  • Minimum fwupd version: 1.1.3

VersionFormat

Sets the version format the device should use for conversion.

  • Key: the device ID, e.g. USB\VID_0763&PID_2806
  • Value: The quirk format, e.g. quad
  • Minimum fwupd version: 1.2.0

Plugin specific

Plugins may add support for additional quirks that are relevant only for those plugins. View them by looking at the README.md in plugin directories.

Example

Here is an example as seen in the CSR plugin.

[USB\VID_0A12&PID_1337]
Plugin = dfu_csr
Name = H05
Summary = Bluetooth Headphones
Icon = audio-headphones
Vendor = AIAIAI
[USB\VID_0A12&PID_1337&REV_2520]
Version = 1.2

Additional samples can be found in other plugins.