Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
0143c67c76 trivial: Build a specific tag from the libjcat subproject 2020-06-10 15:21:54 +01:00
Richard Hughes
afda962cba Fix regression when checking for downgraded metadata
When verifying a signature the valid results are ordered by timestamp. The
CHECKSUM results have a zero timestamp and should have been ordered last.
The sorting callback was wrong, which explains the odd result where we could
downgrade Jcat signatures before we fixed 64ebf9, and nicely explains why we
ignored a timestamp of zero in the first place.

When getting the timestamp, ensure we actually get the newest _signature_ not
just the newest result in case checksums start having timestamps in the future
for some reason. Use new API from libjcat where available, else fall back to
sneaking it out using GObject properties and magic values.
2020-06-10 15:21:54 +01:00
Mario Limonciello
471a0e2105 fu-main: Make it clearer what lost name is and bump it to warning
This happens often enough when people switch from snap to distro
package that we should mention it in non-verbose logs.

Fixes: #2112
2020-06-09 11:05:09 -05:00
Mario Limonciello
6b9664168d trivial: checkout branch to fix changelog publishing 2020-06-09 09:42:32 -05:00
Richard Hughes
83a21cb7cd vli: Allow chained usb hub devices where the parent needs GPIOB reset
As both hub devices share a FuVliUsbhubDeviceClass instance we cannot 'hijack'
the vfuncs depending on object type. This allows the downstream hub to proxy to
the upstream hub where a GPIOB reset can be performed.
2020-06-09 11:56:30 +01:00
Richard Hughes
09950a13ce vli: Do not modify the class vfuncs depending on device type
We can have multiple FuVliPdDevice objects registered with the daemon, but they
will all share the FuVliPdDeviceClass instance. If one device requries a
silicon workaround, do not 'hijack' the vfunc for all devices of this type.

This means we do the right thing when updating both the one that requires the
workaround, and the 'normal' one.
2020-06-09 11:30:49 +01:00
Ryan Lee
59bb497a3e ccgx: modify install duration for dmc device 2020-06-09 10:37:26 +01:00
Richard Hughes
49f99d186d trivial: Fix Debian CI targets 2020-06-09 09:09:47 +01:00
Ryan Lee
0942dcc413 ccgx: Add support for HP DMC dock devices 2020-06-05 13:35:54 +01:00
Richard Hughes
2e3605ffdc trivial: Add RemoveDelay as a standard FuDevice quirk 2020-06-05 12:17:52 +01:00
Mario Limonciello
5c2c782446 trivial: add a bug report target for Dell WD19 2020-06-02 11:47:00 -05:00
Mario Limonciello
c0a2798fb5 trivial: logitech_hidpp: set the protocol properly when bootloader unknown
This appears to be a regression from c6ae0d998b
where the case of bootloader version 0 didn't get protocol set.

Fixes: #2156
2020-06-02 10:27:13 -05:00
Richard Hughes
0f6d754d5a Detect if the MEI device has known security issues
If it has, fail HSI-1.
2020-06-01 22:49:39 +01:00
Richard Hughes
bb228cbe53 pci-mei: Check the HFS register for the override strap 2020-05-29 17:34:18 +01:00
Richard Hughes
bdfccdf097 Allow multi-byte FuUdevDevice preads and writes 2020-05-29 17:34:18 +01:00
Mario Limonciello
cafea91f53 trivial: fix windows and snap CI
Introducing newer gusb caused these builds to run gusb as a subproject
and hence the introspection binaries were looked for.

Fixes: cd65ae ("Require libgusb 0.3.3")
2020-05-29 08:08:32 -05:00
Mario Limonciello
d5d496b62a trivial: uefi: fix dell TPM updates
Adding an extra header makes the firmware reject the GUID in the real
header.
2020-05-29 07:31:15 -05:00
Richard Hughes
64ebf91124 Always enforce the metadata signature has a valid timestamp
Although this is something that we have always done on the LVFS, corporate
deployments that resign the firmware or metadata might not be signing the files
in the same way.

Always require a timestamp to prevent allowing an inadvertent rollback attack.
2020-05-29 13:24:29 +01:00
Benson Leung
a22310374e cros-ec: Provide device metadata as a part of to_string
Provide the following metadata:

"Dirty firmware" bit
Protocol version
Header type
Maximum PDU Size
Flash protection status
Raw version string
Key Version
Minimum rollback
2020-05-29 06:55:40 +01:00
Benson Leung
092f87ae0c cros-ec: Add board name as a instance id and hash as metadata
These couple of extra things in the CrOS EC version string
were split off of the triplet, so give them a home.
2020-05-29 06:55:40 +01:00
Benson Leung
086d0c0eb6 cros-ec: Parse version number into triplet
Add fu_cros_ec_parse_version to common, as this will be used to
parse the firmware bundle's version string too.
2020-05-29 06:55:40 +01:00
Benson Leung
00bb3341d2 cros-ec: Add enough infrastructure for setup connection
This should do the bulk transfers using protocol 6.

The output here is now equivalent to the output of
usb_updater2 -d 18d1:501a -f

fwupdtool --plugin-whitelist cros_ec get-devices --verbose
Servo Micro
  DeviceId:             84d0e3f2a0f8b2328f7995767b23ebb40494723f
  Guid:                 8e2f7625-a164-55d7-8f09-f193c8ec33f1 <- USB\VID_18D1&PID_501A&REV_0100
  Guid:                 13564257-c649-586d-b4e4-4f048d480f36 <- USB\VID_18D1&PID_501A
  Serial:               CMO653-00166-040491U00771
  Summary:              Servo Micro (aka "uServo") Debug Board
  Plugin:               cros_ec_usb
  Flags:                registered
  Vendor:               Google Inc.
  VendorId:             USB:0x18D1
  Version:              servo_micro_v2.4.17-df61092c3
  VersionFormat:        plain
  Created:              2020-05-20
  PhysicalId:            usb:03:00:02
2020-05-29 06:55:40 +01:00
Benson Leung
7aa00f6ee8 cros-ec: Add usb_findit functionality
Find the interface and endpoint used for firmware updates.
Note: this change now requires libgusb 0.3.3 or later.
2020-05-29 06:55:40 +01:00
Benson Leung
cd65aeaa41 Require libgusb 0.3.3
Newer version of libgusb has support for a usb endpoint wrapper.
2020-05-29 06:55:40 +01:00
Benson Leung
b483044a8d cros-ec: Initial skeleton
Set it up as a USB device plugin, with the initial device in quirks
being Servo Micro debug board.
2020-05-29 06:55:40 +01:00
Mario Limonciello
838ae163e3 dell-dock: prevent updates to occur via synaptics-mst plugin
Although they normally work, some failures have been reported in the field
related to the MST hub not responding in the MST plugin.

When these failures have occurred the dell_dock plugin also fails to
enumerate.

So rather than allow some people who don't have dell_dock compiled to
update their MST hub using synaptics_mst, perform ALL updates for
mst hub via dell_dock.

```
18:06:24:0324 FuPluginSynapticsMST no device found on drm_dp_aux1: VMM5331 inside Dell dock is only supported by dell_dock
```
2020-05-28 08:59:07 -05:00
Richard Hughes
137649d9b2 Fix regression when using GetDetails on a device with _MD_SET_NAME set
In f430da0 we added code that was supposed to copy the verfmt from the component
to the device. We accidentally overwrote the component-provided <name> because
the device had _MD_SET_NAME set.

Use the specific function to just set the verfmt like we intended.
2020-05-28 08:57:30 -05:00
Richard Hughes
862ec5c65b Skip module unloading only if we are actually running under valgrind
See also: https://github.com/fwupd/fwupd/issues/2119
Reported-by: Anton Farygin <rider@altlinux.org>

Based on a patch by Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
2020-05-28 06:56:45 -05:00
Mario Limonciello
d39bcee29d trivial: detect cpuid.h and also look for host architecture
Fixes cross compilation for arm with clang which provides cpuid.h
but helpfully has this error:
```
 #if !(__x86_64__ || __i386__)
 #error this header is for x86 only
 #endif
```

Fixes: #2131
2020-05-26 15:06:08 -05:00
Mario Limonciello
1a52051471 fu-engine: Allow --plugin-whitelist to use dashes instead of underscores
I have found this confusing myself that even if plugins have the dash in
the name the daemon needs to internally use underscores.
2020-05-26 11:04:09 -05:00
Mario Limonciello
a42daefb9e dell-dock: Capture the dock SKU in metadata
Should be helpful in reproducing failure reports.
2020-05-26 10:22:58 -05:00
Mario Limonciello
4a844c3024 trivial: drop libgpgme deps
These aren't needed anymore since moving to libjcat
Note: snap still keeps them because libjcat builds in snap and
needs them.
2020-05-26 08:25:08 +01:00
Richard Hughes
b3d3f21a00 Check the device requirements when returning from GetDetails
One vendor is shipping a cab archive with two metadata files, both referencing
the same GUID. The 'correct' metainfo description is selected using a GUID
'other device' requirement. This works fine when installing, but breaks when
double clicking on the .cab file as both components are valid, and thus get
returned.

In this case, return the component that matches the requirement 'first' so that
it gets chosen by gnome-software as the default.
2020-05-22 16:07:11 +01:00
Richard Hughes
4b16642dc5 ccgx: Fix a potential division by zero
Spotted by Coverity.
2020-05-22 15:34:16 +01:00
Richard Hughes
e3091c394b trivial: Move the SecureBoot attr to a runtime issue 2020-05-22 15:15:09 +01:00
Mario Limonciello
bb6b1a8693 Revert "amt: Add a security attestation for provisioning"
This reverts commit f160e6b7fc.
2020-05-22 15:13:19 +01:00
Richard Hughes
c821923668 Add an HSI attribute for Intel SMAP
See https://en.wikipedia.org/wiki/Supervisor_Mode_Access_Prevention for details.
2020-05-22 07:26:47 +01:00
Richard Hughes
4a62329401 trivial: One more thing to ignore in the kernel cmdline 2020-05-21 20:58:28 +01:00
Richard Hughes
bd44432240 trivial: Fix a build failure on aarch64
It seems cpuid.h isn't available everywhere, which make sense in retrospect.
2020-05-21 12:05:05 +01:00
Richard Hughes
9bc9debd98 Allow uploading security attributes to the LVFS
We sign the data with the client cert to allow users with LVFS accounts to
publish 'official' HSI ratings.
2020-05-21 11:48:09 +01:00
Richard Hughes
c05ac2d074 trivial: Add three more things to the cmdline blocklist 2020-05-21 11:48:09 +01:00
Richard Hughes
0abba6cbb0 ata: A OUI quirk for Kingston
Fixes https://github.com/fwupd/fwupd/issues/2121
2020-05-21 11:16:08 +01:00
Richard Hughes
dc867ddd77 trivial: Include a safe version of the kernel cmdline in the report metadata 2020-05-20 19:47:53 +01:00
Richard Hughes
a778ac9899 trivial: Include some useful DMI values in the report metadata 2020-05-20 19:47:53 +01:00
Richard Hughes
08bb9223ec trivial: Include the kernel version in the report metadata 2020-05-20 19:47:53 +01:00
Richard Hughes
6ecc4ca144 Export the report metadata on the D-Bus interface
This allows the client to easily query metadata to upload with the report,
without exporting rarely used attributes as D-Bus properties on the interface.

It also allows us to add extra metadata values in the future without changing
the public API.
2020-05-20 19:47:53 +01:00
Richard Hughes
0c6efe2e04 Revert "Export the host vendor, family and SKU"
This reverts commit 81c371098c.
2020-05-20 19:47:53 +01:00
Richard Hughes
3ecd22c764 trivial: Fix fu_plugin_runner_add_security_attrs() gtk-doc header 2020-05-19 20:13:47 +01:00
Richard Hughes
e56fe2a0ca trivial: Fix fu_efivar_set_data() gtk-doc header 2020-05-19 20:13:26 +01:00
Richard Hughes
c11bed4079 trivial: Fix the HSI warnings after some translator feedback. 2020-05-19 20:10:45 +01:00