Richard Hughes
4ae9aa87df
csr: Be more safe when reading firmware from the device
2021-02-10 16:29:57 +00:00
Richard Hughes
d4dbb29a6e
goodix-moc: Fix several places where the plugin code might crash
...
Fixes https://github.com/fwupd/fwupd/issues/2850
2021-02-10 16:29:21 +00:00
Richard Hughes
53de58f06d
optionrom: Do not parse the image
...
The only real value of the optionrom plugin is the ability to store and verify
the ROM checksum; parsing the image is not actually required and is a source of
anxiety for various security teams.
2021-02-10 16:23:16 +00:00
Richard Hughes
a45d807a08
synaptics-rmi: Limit the number of containers to a sane value
...
Using hongfuzz we managed to build a valid firmware with 246625043 containers,
which took over 60 seconds to parse.
2021-02-10 15:27:42 +00:00
Richard Hughes
84176c9e1a
synaptics-rmi: Be more careful when parsing invalid firmware
2021-02-10 15:27:42 +00:00
Richard Hughes
b0cf709f9b
synaptics-rmi: Fix a memory leak when parsing invalid firmware
2021-02-10 15:27:42 +00:00
Richard Hughes
117f857899
Split the Udev and USB backends out of FuEngine
...
We get to say "hello" to Bluetooth devices soon...
2021-02-10 12:04:05 +00:00
Richard Hughes
525f71f54b
Merge the _udev_device() and _usb_device() vfuncs
...
There are now two 'backends' of device plug/unplug events, and there is about
to become three. Rather than just adding two more vfuncs for every backend type
define common ones that all providers can use.
Also fix up the existing in-tree plugins to use the new vfunc names and filter
on the correct GType.
2021-02-10 12:04:05 +00:00
Richard Hughes
9e9b73f303
Remove fu_plugin_get_usb_context()
...
It's unused, and only encourages plugins to do the wrong thing.
2021-02-10 12:04:05 +00:00
Richard Hughes
9303fedae0
trivial: Use json-glib from master to get a fuzzing crash fix
...
See 7711cbc7f8
2021-02-09 19:49:43 +00:00
Richard Hughes
2efa948b54
trivial: Add hailuck fuzzer to oss-fuzz
2021-02-09 16:37:25 +00:00
Richard Hughes
2e73bef923
Be more paranoid when parsing from ASCII buffers
2021-02-09 16:37:25 +00:00
Richard Hughes
9930998612
Integrate oss-fuzz with the CI
2021-02-09 16:37:25 +00:00
Richard Hughes
a84be50853
trivial: Do not invalidate timestamps for the Fedora package
2021-02-09 13:14:45 +00:00
Richard Hughes
67dda6b2e9
wacom-usb: Fix a buffer-overread spotted by AddressSanitizer
2021-02-09 13:05:46 +00:00
Richard Hughes
6920eb1214
ihex: Fix a buffer-overread spotted by AddressSanitizer
2021-02-09 13:05:32 +00:00
Richard Hughes
abdc82b1c1
dfuse: Fix a buffer-overread spotted by AddressSanitizer
2021-02-09 13:05:13 +00:00
Richard Hughes
c123bee369
trivial: Fix a buffer-overread spotted by AddressSanitizer
2021-02-09 13:05:09 +00:00
Richard Hughes
0cde61dd4d
bcm57xx: Fix -Wcast-align issues spotted by clang
2021-02-08 13:26:27 +00:00
Richard Hughes
0b6907e0bb
trivial: Fix warning from clang about unused variable
2021-02-08 12:53:32 +00:00
Richard Hughes
4d7bcaace5
trivial: Fix warning when compiling without libcurl
2021-02-08 12:53:12 +00:00
Richard Hughes
01a30aa6de
Add support for oss-fuzz
2021-02-08 09:17:03 +00:00
Mario Limonciello
b71b273c87
trivial: install_dell_bios_exe: fixup uefi-capsule -> uefi_capsule
...
Fixes : #2840
2021-02-07 23:49:27 -06:00
Mario Limonciello
5bbb0b7980
only copy files in hook if directory exists ( Fixes : #2619 )
2021-02-07 20:10:38 -06:00
Richard Hughes
3a30c1257c
wacom-usb: Fix a crash detected by AddressSanitizer
2021-02-07 16:59:57 +00:00
Richard Hughes
9b3f7aba82
trivial: Remove unused -Dlink_language support
2021-02-07 16:59:57 +00:00
Richard Hughes
8887b9128b
uefi-capsule: Use an integer for EfivarNvramUsed
...
This is much easier to parse on the LVFS.
Fixes https://github.com/fwupd/fwupd/issues/2834
2021-02-06 14:23:09 +00:00
Richard Hughes
5294d0c7c0
trivial: Use g_memdup2() on new glib2 versions to avoid a warning
2021-02-05 09:50:02 +00:00
Richard Hughes
9b11af985f
Add fu_memdup_safe()
...
See https://mail.gnome.org/archives/desktop-devel-list/2021-February/msg00000.html
for more details.
2021-02-04 21:01:00 +00:00
Mario Limonciello
b5481f24d3
trivial: contrib/install_dell_bios_exe.py: recognize the plugin rename
...
uefi was renamed to uefi-capsule and now this script forgot the change.
Allow both to work so this script runs on new or older fwupd.
Fixes : #2840
2021-02-04 10:50:19 -06:00
Javier Martinez Canillas
fde4b1676a
uefi: Rewrite generate_binary.sh script in Python
...
The generate_binary.sh is a script that calls the objcopy tool and
genpeimg in the case of Windows, to generate a PE binary file.
But doesn't have to be a shell script and could be rewritten as a
python script. This will make this code to generate a PE binary
easier to extend if needed.
Also, the only reason that's a template is to define the objcopy
tool used, but this can also be passed as a positional argument.
2021-02-04 12:51:05 +00:00
Richard Hughes
b2a1d9747e
Clear the pending flag if restarting the system
...
If any update is scheduled for SuperIO, and something changes (such as entering
S3, disconnecting the charger) before the update is installed, then the update
will get stuck.
Fixes https://github.com/fwupd/fwupd/issues/2830
2021-02-03 16:59:12 +00:00
Mario Limonciello
c794b754a6
trivial: Make it easier to know what packages to install to let
...
helper scripts run.
Fixes : #2836
2021-02-01 16:13:32 -06:00
Richard Hughes
f4a1592830
jabra: Ensure the protocol is set to avoid a daemon warning
2021-02-01 19:34:28 +00:00
Richard Hughes
f849a76766
trivial: Remove 'dfu-tool watch'
...
It's been broken for a long time, and nobody has noticed.
2021-02-01 19:34:28 +00:00
Richard Hughes
98972f4a34
libfwupdplugin: Promote DfuFirmware to FuDfuseFirmware
...
Port the DFU plugin to use the new objects to make it act the same as all the
other plugins.
2021-02-01 19:34:28 +00:00
Richard Hughes
ed4b8e28db
dfu: Use FuChunk rather than defining DfuElement
2021-02-01 19:34:28 +00:00
Richard Hughes
6de10e118c
Allow downloading firmware from IPFS
...
Only a small amount of the firmware on the LVFS will be available. The user
can use --ipfs on the command line for testing, or change the system-wide
default in /etc/fwupd/daemon.conf.
The IPFS daemon and command line client will need to be installed manually.
2021-02-01 19:33:31 +00:00
Richard Hughes
4d8163c2ee
trivial: Fix up a gtk-doc warning for a new symbol
2021-01-30 16:14:21 +00:00
Richard Hughes
7715dead97
trivial: Fix bogus -Wunused-variable warning
2021-01-30 15:49:20 +00:00
Richard Hughes
7ccbd61f5d
thunderbolt: Remove unused variable
2021-01-30 15:48:47 +00:00
Richard Hughes
6ceffbb585
system76-launch: Remove unused variable
2021-01-30 15:48:36 +00:00
Richard Hughes
77d333fab5
trivial: Allow building FuChunk objects from a XbNode
2021-01-29 18:39:53 +00:00
Richard Hughes
1d163528ab
Add fu_firmware_new_from_gtypes() for future usage
...
This allows a plugin to define a 'set' of firmwares that it would find
acceptable, for instance either accepting DFU, DfuSe or just a plain binary.
2021-01-29 18:18:18 +00:00
Richard Hughes
27cb155dcf
cros-ec: Make _do_xfer() outbuf const
...
The g_usb_device_bulk_transfer() function requires a mutable 'data' buffer, but
fwupd is sending file data and never wants the buffers modified.
2021-01-29 16:30:28 +00:00
Richard Hughes
9a241be490
trivial: Add fu_chunk_array_mutable_new()
...
This allows us to check that the plugin is writing into a mutable buffer. Also
fix up the plugins that are currently 'wrong' and use the new function for the
plugins doing the right thing.
2021-01-29 14:22:20 +00:00
Richard Hughes
451db0645b
trivial: Use a more standard _to_string() for FuChunk
2021-01-29 14:22:20 +00:00
Richard Hughes
20e82cac46
Allow creating a FuChunk from a GBytes directly
...
This is a perfect object for when we want to just store a blob of data, address
and/or page.
2021-01-29 14:22:20 +00:00
Richard Hughes
bc8678ef13
trivial: Add three public 'setters' for FuChunk
2021-01-29 14:22:20 +00:00
Richard Hughes
318944f322
trivial: Use a more standard name for array of chunks
2021-01-29 14:22:20 +00:00