Commit Graph

6338 Commits

Author SHA1 Message Date
Richard Hughes
0d64780093 trivial: Fix a small memory leak when getting volumes 2021-10-27 15:57:53 +01:00
Richard Hughes
b3e7f07716 trivial: Use ->dispose() to remove a ref-loop at exit 2021-10-27 15:57:53 +01:00
Richard Hughes
b3b5542246 Redirect the old HSI links to the correct place
Fixes https://github.com/fwupd/fwupd/issues/3893, harder
2021-10-27 12:49:27 +01:00
Jason Gerecke
9c6ddd9309 wacom_usb: Update quirks with new PIDs for 3rd-gen Intuos BT
Wacom has begun migrating its current Intuos product line to a new
Bluetooth chipset. This new revision uses new PIDs as well so we
need to update the quirks list.
2021-10-26 18:15:23 +01:00
Jason Gerecke
21959e2527 wacom_usb: Introduce bluetooth-id6 module
Wacom is beginning to integrate a new Bluetooth chipset in their
devices. This chipset uses a somewhat different flash protocol
and requires the creation of a new fwupd module. Chipsets using
this new protocol are identified in the firmware descriptor with
ID 0x06, leading to our choice of module name: "bluetooth-id6".

The new chipset is first appearing in a minor update to the Wacom
Intuos (CTL-4100WL/CTL-6100WL) line. These devices do not support
the firmware descriptor interface, requiring us to statically assign
it as a module in the legacy codepath if any Bluetooth support is
found. This clutters the output of the `get-devices` command but the
update CAB files ensure the correct module is used depending on PID.
2021-10-26 18:15:23 +01:00
Jason Gerecke
49a9a29158 wacom_usb: Make busy-timeout an argument of set_feature
Timeout characteristics of the start/data/end commands can vary between
modules. Rather than leaving `fu_wac_module_set_feature` responsible for
setting a globally-reasonable timeout, allow the callers to specify a
locally-optimal value instead.
2021-10-26 18:15:23 +01:00
Jason Gerecke
835975d66c trivial: Add "full" CRC8 function
The CRC32 and CRC16 algorithms have "full" functions that allow callers to
provide their own polynomial and initial CRC value. Provide the same ability
to users of the CRC8 algorithm.
2021-10-26 18:15:23 +01:00
Sanjay Sheth
3814b0be12
logitech-bulkcontroller: Set device time and timezone
Also, use UTC for older glib version.
2021-10-26 09:50:28 +01:00
Richard Hughes
0a7ce0cf25 Allow specifying the version format in firmware_packager
Fixes https://github.com/fwupd/fwupd/issues/3903
2021-10-25 18:00:34 +01:00
Richard Hughes
2a1ad986b8 trivial: Update the architecture plan to reflect reality 2021-10-25 15:39:38 +01:00
Richard Hughes
9952395779 Support more localized AppStream fields 2021-10-25 15:38:51 +01:00
Kate Hsuan
ae2389104e docs: hsi: Give a readable name for each HSI number
Currently, HSI only has a numerical level, such as HSI 0~1 and each
number represents a security state from insecure to secure. If we
only show the number to the user, the user may confuse and try to
find the document to realize the meaning of the number or just ignore
them immediately. So, a readable name for each HSI level can catch
users' eyes and let them explicitly know the security status.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2021-10-25 15:38:38 +01:00
Jarvis Jiang
8d6dbd9009 modem-manager: Add the logic of inhibiting modemmanager device in mbim-qdu
It may make sense to have the modem not doing anything during the upgrade,
so the inhibition would make total sense.

Signed-off-by: Jarvis Jiang <jarvis.w.jiang@gmail.com>
2021-10-25 09:23:44 +01:00
Richard Hughes
70f9124545 Show translated firmware release notes when provided
Send the users locale to the daemon so that it can be used to prefer
the localized update text over the default en_US version.

    $ LANG=fr_FR.UTF8 fwupdmgr get-details test.cab
    ...
    └─ACME Plan 9:
          Nouvelle version: 0.0.5
          Licence:          Propriétaire
          Urgence:          Faible
          Fournisseur:      ACME Ltd.
          Description:      Cette version stable corrige des bugs.

I decided to send the locale to the daemon rather than change the
`Description` to return GVariant to `a{ss}` as we also probably want
to support things like localized summary and URLs too in the future.
2021-10-24 18:59:15 +01:00
Sanjay Sheth
3c8339c9eb logitech-bulkcontroller: Wait and verify firmware upgrade status 2021-10-22 10:38:59 -07:00
Richard Hughes
28678235cd Move the fuzzing files into the plugin directories
We only had to pile everything into the src/fuzzing/firmware directory
because honggfuzz could not cope with more than one input path.

This way each plugin is self contained and easy to copy.
Also, install the fuzzing builder objects as this fixes the installed
tests when srcdir does not exist.

Based on a patch by Jan Tojnar <jtojnar@gmail.com>, many thanks.
2021-10-22 15:24:05 +01:00
Richard Hughes
db7dc60ffd wacom-usb: Fix writing the fuzzing data from a builder.xml file 2021-10-22 14:58:24 +01:00
Richard Hughes
09f1406c17 synaptics-cape: Add ->write() and ->build() vfuncs
This allows us to rebuild the fuzzing data from the builder.xml file.
2021-10-22 14:58:24 +01:00
Richard Hughes
3ea1ef81b2 ccgx: Fix a regression when porting to fu_common_strnsplit_full()
We have to ignore the leading ':' for data records.
2021-10-22 14:58:24 +01:00
Richard Hughes
3a63f5bd9b trivial: Make the SREC parser more spec compliant
Only upgrade S5 into S6 when there are over 0xFFFF records.
2021-10-22 14:58:24 +01:00
Richard Hughes
04a6877e06 trivial: Move the nonfree SMBIOS dumps to fwupd-test-firmware 2021-10-22 09:55:48 +01:00
Richard Hughes
2d00cda464 Remove PLUGINBUILDDIR and use G_TEST_SRCDIR and G_TEST_BUILDDIR instead
This allows us to override the location we load data files from, which
allows us to do more kinds of installed tests in the future.

Also, move the global data/tests content into the place that it is used
as it was getting impossible to manage.
2021-10-21 18:36:22 +01:00
Mario Limonciello
d9ca1a7c53 trivial: fix anchors for markdown
fixes: #3893
2021-10-21 11:48:25 -05:00
Mario Limonciello
0914f81336 dell-dock: enumerate hub after EC 2021-10-21 10:32:34 -05:00
Mario Limonciello
597066b18e trivial: bump gusb subproject up to 0.3.8
fixes: #3889
2021-10-21 09:34:04 -05:00
Mario Limonciello
3709dcd104 trivial: fix URL for fwupdagent security command
fixes: #3893
2021-10-21 09:34:04 -05:00
Richard Hughes
6235a8222a Share the Common Flash Memory Interface quirks between plugins
Now two plugins are using hardcoded SPI constants for various CFI chips,
and it makes sense to have some common quirk data that can be used by
both.

Add a FuSpiChip helper object that can be used by FuDevice subclasses
to get the specific SPI commands to use for each flash ID.
2021-10-20 12:19:39 +01:00
Richard Hughes
be1879fa4d trivial: Delete some unused test data 2021-10-20 09:55:44 +01:00
Sean Rhodes
130da188eb
plugins/uefi-capsule: Remove ux capsule for StarLite (#3885)
UX capsule only seems to work on certain distros and firmware versions.
Restoring for reliability.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2021-10-20 08:05:16 +01:00
Richard Hughes
3fc635e144 Remove honggfuzz support
This has not worked well in some time, and nobody noticed. The
alternative Google clusterfuzz support is better in every way and gets
run as part of CI.
2021-10-19 19:20:05 +01:00
Richard Hughes
1b1009cf5f Avoid modifying remotes when possible
Found in the NixOS downstream patches, thanks @maxine.
2021-10-19 17:21:57 +01:00
Denis Pynkin
5984333028 steelseries: add Stratus gamepads support
Added support for Stratus-series gamepads and dongles.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
2021-10-19 18:34:51 +03:00
JackZhang-Primax
4ff3c1a011 Update pixart-rf.quirk
Add more supported devices Vivaldi2
2021-10-18 22:55:49 -05:00
Richard Hughes
27e40c3025 trivial: Add more fuzzing alignment checks
In reality these are not super interesting as they only happen on
`->write()` and not `->parse()`.

In other news, the fuzzer now appreciates how critical the alignment
is, which is probably a good thing generally.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40088
2021-10-18 20:02:03 +01:00
Richard Hughes
a5ef3629d4 trivial: Build the fuzzers with -g to get stacktraces 2021-10-18 20:02:03 +01:00
Richard Hughes
e99dd242e9 Strip inner XML text when loading metainfo.xml files
This allows us to do the right thing if given an XML file with leading
or trailing space in the entry, e.g.

    <value key=LVFS::UpdateProtocol> org.uefi.capsule </value>
2021-10-18 14:43:57 +01:00
Richard Hughes
bc14f4c59c Support client-side abbreviated hashes
This allows the user to do something like `fwupdmgr get-releases a12d`
which is already supported daemon-side.
2021-10-18 11:16:45 +01:00
Richard Hughes
15bf534e3f Set the verfmt of the returned device when the daemon device is unset
This regressed in 1.5.5 when we migrated FWUPD_DEVICE_FLAG_MD_SET_VERFMT
into FU_DEVICE_INTERNAL_FLAG_MD_SET_VERFMT and forgot to copy the system
device internal flags.
2021-10-18 06:57:09 +01:00
Richard Hughes
fcb5257e16 Allow OnlyTrusted=false in the non-polkit case 2021-10-17 14:29:58 +01:00
Richard Hughes
9c7939dae3 trivial: Fix a fuzzing crash for a corrupt IFD image
Sanity check the alignment so we do not write gigabytes of 0xFF's.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39982
2021-10-15 20:05:55 +01:00
Sanjay Sheth
4c5d00886a logitech-bulkcontroller: Continuously capture device messages 2021-10-15 11:20:16 -07:00
Richard Hughes
8e24fa77cf cfu: Add an initial outline CFU plugin
There's no actual hardware to test this against yet, but this is how I
would lay out a plugin if there was.

We still need to work out a generic encapsulation for the offer and
payload (for each component and bank) so this can work with LVFS and
fwupd.
2021-10-15 18:38:36 +01:00
Richard Hughes
d1dff82803 Allow installing developer-friendly PolicyKit rules from setup 2021-10-15 16:30:24 +01:00
Richard Hughes
98855ab712 Allow using a filename when using set-approved-firmware
See https://gitlab.com/fwupd/lvfs-website/-/merge_requests/924 for more
discussion.
2021-10-15 16:29:00 +01:00
Richard Hughes
bd43647554 Add fu_usb_device_new_with_context() helpers
This means the context is set at construction time, which is much less
fragile than setting the context manually.
2021-10-15 15:59:34 +01:00
Richard Hughes
ccc0f9b0c6 trivial: Assign the context of incorporated devices early
This means we can use GObject->constructed() to copy the context over
to FuDevice helpers that also require the context.
2021-10-15 15:57:57 +01:00
Richard Hughes
644ac0ea05 Only installing firmwares with signatures by default
99.9999% of users are consuming firmware updates from the LVFS or
another trusted remote. It's far too easy to get a user to enter the
password to install an untrusted firmware, where the security
consequences are pretty dire.

Provide an escape-hatch for firmware engineers, but it does mean
editing a file in /etc as root. This seems like an acceptable level of
inconvenience.
2021-10-15 15:54:44 +01:00
Thomas Deutschmann
a4549f5035 elanfp plugin requires gusb 2021-10-15 09:17:47 -05:00
Richard Hughes
74a2a47f7f Add two report keys affecting report credibility 2021-10-15 13:55:25 +01:00
Richard Hughes
2d5c5b868e Add the missing PolicyKit actions for (un)trusted downgrade
If we want to tighten the allowed actions, we need the actions to be
symmetric.
2021-10-15 13:54:29 +01:00