Commit Graph

1927 Commits

Author SHA1 Message Date
Richard Hughes
104459bd10 Check the AMI test key if not installed for HSI-1
Fixes https://github.com/fwupd/fwupd/issues/2695
2021-01-05 17:09:02 +00:00
Richard Hughes
5c9e9f17c5 libfwupdplugin: Export FuEfiSignatureList for plugins to use 2021-01-05 16:42:58 +00:00
Richard Hughes
f47790bba3 ata: Add OUI quirk for Transcend
Fixes https://github.com/fwupd/fwupd/issues/2721
2021-01-05 16:20:09 +00:00
Richard Hughes
b2e97fb6b5 synaptics-cxaudio: Fix a critical warning when parsing invalid firmware 2021-01-05 15:59:30 +00:00
Richard Hughes
59b6b6d2c5 uefi-dbx: Fix a critical warning when parsing invalid firmware 2021-01-05 15:59:30 +00:00
Richard Hughes
09f8a549c9 hailuck: Fix a critical warning when parsing invalid firmware 2021-01-05 15:59:30 +00:00
Richard Hughes
f68107e609 ccgx: Fix a critical warning when parsing invalid firmware 2021-01-05 15:59:30 +00:00
Richard Hughes
ee2e2c3674 uefi: Rename to uefi-capsule
Rename the plugin to make it clearer of the scope.

Based on a patch from Mario Limonciello <mario.limonciello@dell.com>
2021-01-05 15:31:22 +00:00
Richard Hughes
364e2685ca Do not show unprintable chars from invalid firmware in the logs 2021-01-05 15:15:07 +00:00
Richard Hughes
fcb5667d79 libfwupdplugin: Subclass FuFirmware in FuEfiSignatureList
This allows us to get fuzzing support 'for free' and also simplifies the code.
2021-01-05 14:45:31 +00:00
Richard Hughes
eddaed0c11 Allow specifying more than one VendorID for a device
Asking the user for the UID mapping isn't working very well, as it requires lots
of manual handholding. It also doesn't work very well when the device vendor
does not actually have a PCI ID or if the vendor has split into two entities.

Just use the OUI address as an additional VendorID and match any of the device
IDs against any of the metadata-supplied values.
2021-01-04 22:30:20 +00:00
Richard Hughes
3252573ac7 synaptics-prometheus: Fix flashing a fingerprint reader that is in use
The fprint daemon only keeps the device open for 5 seconds and then releases it,
which seems like a small window to hit.

But! We're asking the user to authenticate with the same device we're about to
upgrade so a different part of the stack woke up the hardware just before we're
about to deploy an update onto it.

Just retry a few times to make sure the device is idle. Use a flag to prevent
accidentally causing regressions in other plugins.

Fixes https://github.com/fwupd/fwupd/issues/2650
2021-01-04 21:52:10 +00:00
Jimmy Yu
23cd466ef1 Add plugin to update PixArt RF devices
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-01-04 17:20:13 +00:00
Richard Hughes
64e9f6bd92 trivial: Fix up some NULL/FALSE confusion 2021-01-04 16:32:50 +00:00
Richard Hughes
f9fe19f7f6 Make libcurl optional for fuzzing
For fuzzing we want to exclude libcurl support as it depends on other very heavy
libraries like OpenSSL or libtasn which make the fuzzing binary much larger if
linked statically.
2021-01-04 16:22:36 +00:00
Richard Hughes
c2a0259fe6 Remove now-unused synaptics_rmi_dump fuzzing target generator
We can implement firmware->build and firmware->write and then use the shared
firmware.builder.xml functionality.
2021-01-04 15:42:17 +00:00
Richard Hughes
9f71fe3dc9 Make the 'id' for fu_plugin_add_firmware_gtype() optional
We can work out the correct value automatically in all cases but one, and it's
less for the plugin author to get wrong...
2021-01-04 15:27:10 +00:00
Richard Hughes
a2abc42760 libfwupdplugin: Use G_GNUC_WARN_UNUSED_RESULT for methods that should be checked 2021-01-04 15:24:35 +00:00
Richard Hughes
96ec0198e5 hailuck: trivial: Fix the GType name
The vendor is Hailuck as in one word, not Hai Luck.
2021-01-03 21:07:44 +00:00
RickyWu
9ce0922448 plugins: rts54hub: add Lenovo HotRod VID/PID
Signed-off-by: RickyWu <ricky_wu@realtek.com>
2020-12-31 09:18:46 +00:00
jingle.wu
6f8269fe0f elantp: Add new HWID for Lenovo X13 Gen 2. 2020-12-31 06:38:34 +00:00
Ricky Wu
f3510f56b2 plugins: rts54hid fix get report index error
fixed rts54hid get report index error

Signed-off-by: Ricky Wu <Ricky_wu@realtek.com>
2020-12-23 09:33:35 +00:00
Jingle Wu
fed9f56da8 elantp: Add new HWID for Lenovo X13 Yoga Gen 2. 2020-12-23 07:37:22 +00:00
Richard Hughes
3dc49c21b5 dfu: If no DNLOAD timeout is set assume a default value
This is probably a case where the device does not adhere to the specification.

Some hardware may be deliberately setting DNLOAD timeout to 0ms, and this patch
will make each request 5ms slower. This is probably a good tradeoff for having
most hardware 'just work' without a quirk entry.

Based on a patch by Zack Lee Yi Wei <zack_lee@chicony.com>, many thanks.
2020-12-21 13:11:14 +00:00
Richard Hughes
c32d14ebad dfu: Only wait for DFU_DNBUSY for 120 seconds 2020-12-21 13:11:14 +00:00
Richard Hughes
b8246a6cce dfu: Retry the GET_STATUS is DNLOAD_BUSY is returned
Perhaps fixes https://github.com/fwupd/fwupd/discussions/2687
2020-12-21 13:11:14 +00:00
Richard Hughes
e6dea87cb0 dfu: Use the standard debugging helpers 2020-12-15 09:36:41 +00:00
Richard Hughes
e3fb2e45cd trivial: Fix two more missing <string.h> instances 2020-12-14 20:24:04 +00:00
Richard Hughes
a14de30153 trivial: Require <string.h> for strlen() and memcpy() 2020-12-14 16:49:03 +00:00
Richard Hughes
39e391e046 Fix compile warnings when using -Db_sanitize=undefined 2020-12-14 08:33:41 +00:00
Richard Hughes
312c68842c dfu: Show a warning if we fail to release the interface
I'm not returning FALSE here as it might break plugins.
2020-12-11 14:33:04 +00:00
Richard Hughes
c4ca8e25d1 Use honggfuzz to fuzz firmware rather than AFL
This has better multi-core performance and can run in persistent mode -- which
allows us to construct a test harness of all the parsers (which takes time) and
then just reuse the process for lots of different data.
2020-12-11 09:37:42 +00:00
Richard Hughes
ef714053fe trivial: Don't crash when failing to detect the CPU 2020-12-10 20:43:54 +00:00
Mario Limonciello
a61cca9e3d thunderbolt: Add maple ridge firmware parsing support
These are expected to be flashed via UEFI capsules *not* Thunderbolt plugin
* Flashing via fwupd will require matching kernel work.
* They're left here only for parsing the binaries

```
FuThunderboltFirmwareUpdate:
Family:                 Maple Ridge
IsHost:                 true
IsNative:               true
DeviceId:               0x1136
VendorId:               0xd4
ModelId:                0xa58
FlashSize:              0x0
Generation:             0x4
Ports:                  0x2
HasPd:                  true
Section0:               0x4000
Section1:               0x4210
Section2:               0x4610
Section3:               0x22958
  FuFirmwareImage:
  Data:                 0x67000
```
2020-12-10 09:59:58 -06:00
Richard Hughes
3baea5c2cf solokey: Fix a possible critical warning for invalid firmware 2020-12-10 14:58:11 +00:00
Richard Hughes
bfabf5c81f synaptics-rmi: Do not add zero sized container images
This prevents a DoS when parsing corrupt firmware.
2020-12-10 14:58:11 +00:00
Richard Hughes
6271176c33 ccgx: Do not add zero sized DMC records
This prevents a DoS when parsing corrupt firmware.
2020-12-10 14:58:11 +00:00
Richard Hughes
0eb8b6a2a8 synaprom: Do not add zero sized images
This prevents a DoS when parsing corrupt firmware.
2020-12-10 14:58:11 +00:00
Richard Hughes
4dcd167215 synaptics-prometheus: Allow creating test firmware from builder.xml
This means we don't need a standalone executable to build blobs.
2020-12-09 18:06:26 +00:00
Richard Hughes
056dfff741 synaptics-rmi: Fix possible buffer over-read for corrupt firmware 2020-12-09 15:25:04 +00:00
Richard Hughes
05e3377d11 trivial: Add fu_common_bytes_new_offset()
This is a safer version of g_bytes_new_from_bytes() which returns a GError
if the offsets are invalid rather than emitting a critical warning.

This prevents a critical warning and potential crash when parsing invalid
bcm57xx firmware.
2020-12-08 20:54:25 +00:00
Richard Hughes
386f2c1d39 uefi-dbx: Fix a trivial buffer over-read when fuzzing 2020-12-08 20:50:55 +00:00
Richard Hughes
7713ae676f goodix-moc: Fix a potential crash when reading the USB request 2020-12-08 20:08:57 +00:00
Richard Hughes
84e8d24540 solokey: Prevent a critical warning when parsing invalid JSON data 2020-12-08 20:07:52 +00:00
Richard Hughes
c79e76d2aa synaptics-rmi: Fix a tiny memory leak when parsing firmware 2020-12-08 20:07:27 +00:00
Richard Hughes
698099f643 trivial: Remove several unused variables 2020-12-08 20:06:46 +00:00
Richard Hughes
00640f42f2 Lower the CURL version required to fix build in RHEL
Some vendors really really want 1.5.x in newer RHEL versions, but the version
of curl is too old. Add #ifdefs so that we can emulate (somewhat imperfectly)
the 'new' CURLU functonality.
2020-12-07 14:17:22 +00:00
honkingantelope
70f2419282 added my ssd giving the error
I'm finally getting around to figuring out why I get occasional hard hangs after changing from a spidle to SSD.  I've disabled fwupd in the meantime to see if it makes a difference.  Adding the info since I don't see it already on the list.
2020-12-06 15:31:23 +00:00
Sean Rhodes
2f2da8c7ca Added Lite Mk III 2020-12-04 11:02:31 +00:00
Mario Limonciello
5198bdcde2 trivial: make platform integrity plugin optional and disabled by default
Fixes: #2634
When it's upstream, we may consider to change this for some distros.
2020-12-03 09:07:49 +00:00