Commit Graph

5443 Commits

Author SHA1 Message Date
Richard Hughes
645a62002e pixart: Add some error prefixes to aid debugging 2021-02-17 08:48:45 +00:00
Richard Hughes
63a9665107 pixart: Fuzz the firmware parser 2021-02-17 08:48:45 +00:00
Richard Hughes
7fb4397f25 pixart: Set firmware version raw 2021-02-17 08:48:45 +00:00
JimmyYu
b7551c0211 pixart: Add support for more devices 2021-02-17 08:48:45 +00:00
Richard Hughes
f9cb8f3404 rts54hub: Add defines for the vendor commands 2021-02-17 08:41:06 +00:00
Richard Hughes
74db289c36 f 2021-02-17 15:25:41 +08:00
RickyWu
65f2fab869 rts54hub: Add child device of a RTD21xx HDMI converter 2021-02-17 15:25:41 +08:00
Richard Hughes
404f052409 Do not fail to start the daemon for a single backend setup failure 2021-02-16 21:26:50 +00:00
Lars Wendler
4a62482708 system76-launch plugin requires gusb
Otherwise the following build error happens:

  ../fwupd-1.5.6/plugins/system76-launch/fu-system76-launch-device.c:117:9: error: ‘G_USB_DEVICE_CLAIM_INTERFACE_BIND_KERNEL_DRIVER’ undeclared (first use in this function)
    117 |         G_USB_DEVICE_CLAIM_INTERFACE_BIND_KERNEL_DRIVER,
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  ../fwupd-1.5.6/plugins/system76-launch/fu-system76-launch-device.c:133:11: error: ‘G_USB_DEVICE_CLAIM_INTERFACE_BIND_KERNEL_DRIVER’ undeclared (first use in this function)
    133 |           G_USB_DEVICE_CLAIM_INTERFACE_BIND_KERNEL_DRIVER,
        |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-02-16 10:40:36 -06:00
Morten Linderud
8525aaf2d3 contrib/PKGBUILD: Ensure pkgver gets expanded as an bash variable
Signed-off-by: Morten Linderud <morten@linderud.pw>
2021-02-16 10:40:07 -06:00
Richard Hughes
86c6c2d4a3 Add fu_firmware_set_version_raw()
A few plugins need this now, so move it into the base class.
2021-02-16 15:24:29 +00:00
Mario Limonciello
a862473928 trivial: debian: update signing template to match downstream 2021-02-16 08:05:49 -06:00
Richard Hughes
5018d14dcd trivial: Remove executable permission on a C source file... 2021-02-16 12:26:28 +00:00
Richard Hughes
e5d33b0d01 trivial: post release version bump 2021-02-16 12:16:22 +00:00
Richard Hughes
260a24449d Release fwupd 1.5.6 2021-02-16 12:14:12 +00:00
Richard Hughes
41ad677d8c trivial: Disable clang scan-build
It is causing CI to fail, and signal-to-noise ratio is now basically zero.
2021-02-16 11:04:47 +00:00
Richard Hughes
6d656a940d Allow building without SBAT metadata
Two reasons:

 * It seems a bit antisocial to hard-require all this data without fair warning
 * The aarch64 pesign crashes when trying to sign the binary with SBAT metadata
2021-02-16 11:04:47 +00:00
Richard Hughes
5eca890f93 trivial: Do not assume the running system has LVFS enabled for the tests
This is not true for RHEL, and so 'ninja dist' fails on any RHEL workstation.
2021-02-16 09:19:46 +00:00
Richard Hughes
f572a012f6 synaprom: Set a sane limit on the number of images that can be added
This fixes a timeout found by oss-fuzz.
2021-02-16 08:57:15 +00:00
Sean Rhodes
9840c54021 Adjusted superio L4 quirk 2021-02-15 22:24:40 +00:00
Richard Hughes
4822b3317b ccgx: Check for FPE when parsing the metadata section 2021-02-15 16:47:27 +00:00
Ricardo Cañuelo
a92026476b Fix ioctl error checking
fu_udev_device_ioctl() interprets the return value of ioctl() as the
error cause and generates a misleading error message (permission
denied).
Fix it to use errno for error checking and reporting.
2021-02-15 16:39:00 +01:00
bubbleguuum
27df5cf06e fix broken progressbar display on urxvt due to improper calculation of to_erase
added space before bracket
2021-02-15 15:22:47 +00:00
Richard Hughes
665c5feaca ihex: Never add more than 1 Intel hex signature
If you can create a 1Mb file with hundreds of thousands of zero-byte signatures
it takes a *long* time to parse the image.
2021-02-14 22:03:57 +00:00
Richard Hughes
ffbb1175d0 trivial: Do not consider all whitespace a valid strsafe string 2021-02-14 22:03:57 +00:00
Richard Hughes
a4e0de462c trivial: Fix AddressSanitizer heap-buffer-overflow 2021-02-14 22:03:57 +00:00
Richard Hughes
60a4b56802 srec: Fix an overflow causing an infinite loop when parsing 2021-02-12 20:51:39 +00:00
Richard Hughes
124f2295ee trivial: Untie efi_os_dir from the SBAT distro ID
We happily fallback with an unset -Defi_os_dir and it gets confusing explaining
why the EFI dir needs to be set on a non-supported system.

In practice they'll probably have the same eventual value on most supported
distributions.

Fixes https://github.com/fwupd/fwupd/issues/2873
2021-02-12 16:01:00 +00:00
Richard Hughes
6a33d2d99e ccgx: Fix division by zero for invalid firmware 2021-02-12 13:54:01 +00:00
Javier Martinez Canillas
17c0a6c239 uefi-capsule: Fix objcopy failing to add a .sbat section on aarch64
The objcopy tool only has support for pei-x86_64 and pei-i386 targets, and
so trying to add a .sbat section for fwupdaa64.efi fails with this error:

objcopy: plugins/uefi-capsule/efi/fwupdaa64.efi: file format not recognized

To fix this issue, add the .sbat section to the ELF fwup.so shared object
and keep that section when generating the resulting fwupdaa64.efi binary.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2021-02-12 13:29:55 +00:00
Richard Hughes
293ccbf106 fmap: Fix self test failure on PPC64 2021-02-12 10:47:34 +00:00
Richard Hughes
c3ecec575b fmap: Use memmem to find the FMAP signature
Trust glibc to optimize for the binary search, removing a oss-fuzz detected
crash with our bad pointer maths.
2021-02-11 20:27:20 +00:00
Richard Hughes
3ffc5baaad trivial: Also fuzz the CRC checking routines
At the moment these sections are all red in the coverage report.
2021-02-11 20:27:20 +00:00
Richard Hughes
220ec716ca trivial: Include firmware writing when fuzzing 2021-02-11 20:27:20 +00:00
Richard Hughes
54bc512388 Add firmware flags for presence of CRC and VID/PID 2021-02-11 20:27:20 +00:00
Richard Hughes
b242fe4870 ccgx: Implement FuFirmware->build() to add fuzzing support 2021-02-11 14:53:43 +00:00
Richard Hughes
fa840c1c9a trivial: Do not reuse 'build' for the oss-fuzz build
This fixes a compile failure if ldflags are different between runs.
2021-02-11 14:53:43 +00:00
Richard Hughes
87a8091bed trivial: Fix a crash using fu_firmware_image_get_chunks()
Add a GError as it can return NULL for invalid circumstances. It's okay to
change the API as this symbol has not yet been in a tarball release.
2021-02-11 13:13:06 +00:00
Richard Hughes
9bb5d279db dfuse: Never add a DfuSe image with no defined chunks 2021-02-11 13:12:20 +00:00
Richard Hughes
7a23330158 dfu: Do not allow DfuSe chunk data to include the DFU footer area
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30813
2021-02-11 12:56:05 +00:00
Mario Limonciello
be220a4f56 trivial: fu-common: fix fallback for esp-path if udisks missing
Fixes: #2803
2021-02-10 11:58:37 -06:00
Javier Martinez Canillas
378b00018b uefi-capsule: Add SBAT metadata to the fwupd EFI binary
The Secure Boot Advanced Targeting (SBAT) [0] is a Generation Number Based
Revocation mechanism that is meant to replace the DBX revocation file list.

Binaries must contain a .sbat data section that has a set entries, each of
them consisting of UTF-8 strings as comma separated values. Allow to embed
this information into the fwupd EFI binary at build time.

The SBAT metadata must contain at least two entries. One that defines the
SBAT version used and another one that defines the component generation.

Downstream users can add additional entries if have changes that make them
diverge from the upstream code and potentially add other vulnerabilities.

[0]: https://github.com/rhboot/shim/blob/sbat/SBAT.md
2021-02-10 16:40:59 +00:00
Richard Hughes
6188be1dd4 elantp: Read from the device in a more safe way 2021-02-10 16:29:57 +00:00
Richard Hughes
b1e4a23597 synaptics-rmi: Read from the device in a more safe way 2021-02-10 16:29:57 +00:00
Richard Hughes
2849116b33 uefi-capsule: Read the BMP in a more safe way 2021-02-10 16:29:57 +00:00
Richard Hughes
fb3b3e1841 vli: Read from the device in a more safe way 2021-02-10 16:29:57 +00:00
Richard Hughes
4a315856fa solokey: Read from the device in a more safe way 2021-02-10 16:29:57 +00:00
Richard Hughes
470251c439 wacom-raw: Read from the device in a more safe way 2021-02-10 16:29:57 +00:00
Richard Hughes
6607c41c6d wacom-usb: Read from the device in a more safe way 2021-02-10 16:29:57 +00:00
Richard Hughes
925f2e914b logitech-hidpp: Read from the device in a more safe way 2021-02-10 16:29:57 +00:00