Commit Graph

3203 Commits

Author SHA1 Message Date
Richard Hughes
6fd7a62efe uf2: Fix a small memory leak when parsing files
Fixes https://oss-fuzz.com/testcase-detail/4617823934087168
2022-08-30 17:34:33 +01:00
Richard Hughes
16b463334e Export the generic Intel Thunderbolt firmware format
This is being used for other products, e.g. USB4 docks.

If non-Intel firmware is being used (e.g. ASMedia) then the explicit
calls to `fu_intel_thunderbolt_nvm_new()` can be changed to something
like `fu_firmware_new_from_gtypes()` with all the formats listed.
2022-08-30 14:20:14 +01:00
victor-cheng
42e3c2e4dd usi-dock: Extend delay time before reload
sometimes the device is busy and will exceed the timer limit.
2022-08-30 10:28:15 +01:00
Josh Chen
5ed675f93b elantp: fix missing initial value and remove duplicate code 2022-08-29 21:18:40 -05:00
Richard Hughes
cc30929339 Correctly detect CET IBT
According to Intel, EDX[bit 20] corresponds to IBT feature, *not* ECX.

Fixes half of https://github.com/fwupd/fwupd/issues/4960
2022-08-29 14:40:47 +01:00
Mario Limonciello
1f7526cce1 tpm: Don't require uefi capsule updates for checking TPM PCR0
There isn't any reason that we need to have a system advertising a
GUID with `main-system-firmware` in order to check that PCR0 reconstruction
matches what the TPM actually has.

Fixes: #4961
2022-08-29 07:56:23 +01:00
Richard Hughes
eec6de6985 Fix applying the latest DBX update on machines with 20200729.x64 installed
Use a hardcoded list of last-set dbx checksums to fix the reported version
when required.
2022-08-26 16:29:28 +01:00
Richard Hughes
2a231896fd trivial: Fix a couple of coding style issues 2022-08-25 12:04:25 +01:00
Richard Hughes
2fed9cde72 trivial: Fix one -Wunused-variable warning 2022-08-25 12:03:51 +01:00
Josh Chen
fa7b6247bb Added support for absolute reporting (non-HID) devices 2022-08-25 11:53:30 +01:00
Richard Hughes
b436bbee58 Only fail the kernel tainted HSI test for specific taint reasons
For example, working around a firmware bug in the kernel isn't really
what the HSI attribute was intended to measure.
2022-08-24 13:35:55 +01:00
Mario Limonciello
b7b0ce533d trivial: Unify ambiguity between bios-attrs and bios-settings
These are currently used interchangeably since there was indecisiveness
which to use as the feature was being developed.

As outward facing it will be named with "settings", change all uses
in the code to match this.
2022-08-24 07:20:01 -05:00
Richard Hughes
4e5a928d91 pci-mei: Update vulnerable CMSE versions from CSMEVDT data 2022-08-24 10:30:39 +01:00
Richard Hughes
326042b9b2 pci-mei: Recognize CSME version 16
Fixes https://github.com/fwupd/fwupd/issues/4927
2022-08-24 10:30:39 +01:00
Richard Hughes
6aec72d58a Allow self tests to pass when run in LXC zones
Fixes https://github.com/fwupd/fwupd/issues/4684
2022-08-22 12:46:36 +01:00
Mario Limonciello
2705179117 Convert HSI into a meson tristate-feature
This allows us to disable it automatically on architectures that
aren't supported and OSes that aren't supported.

Link: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1987067
2022-08-22 06:03:38 -05:00
Mario Limonciello
c4fb8f5eb4 trivial: Add new modalias instance IDs for some elan touchpads 2022-08-22 06:03:19 -05:00
Sean Rhodes
a4a1be569b
plugins/{superio,flashrom}: Add LabTop Mk III HwId (#4920)
Add the HwId for the Star LabTop Mk III when using coreboot firmware,
as this differs to AMI.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-08-12 14:00:50 +00:00
Boris Mittelberg
b48cd9fea6 cros-ec: adding stay-in-ro command if EC is in bootloader 2022-08-10 19:06:58 +01:00
victor-cheng
28357f7528
usi-dock: Add support for ThinkPad Thunderbolt 4 and Universal Smart Dock
Use distinguishing displayed names by CID.
2022-08-10 09:31:16 +01:00
Sean Rhodes
639493259d
plugins/flashrom: Skip BC check for coreboot devices (#4892)
Set BcrAddr to 0x0 for all coreboot devices, so that the check of
BIOS Control is skipped as coreboot won't forcibly set this.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-08-02 10:11:55 -05:00
Sean Rhodes
2af92e0b3d Revert "plugins/intel-spi: Correct BIOS Control Device (#4742)"
This reverts commit 6a1ceebd4c.
2022-08-01 11:09:46 +01:00
Richard Hughes
77006b75eb Set the target value on the security attribute
Semantically it is the desire of the security attribute, not the bios
attribute, i.e. you could imagine that a specific attribute would have
to be *foo or bar or baz* for HSI-1 and *only foo* for HSI-2

Also make it easier to add possible BIOS attribute target values in
plugin code.
2022-08-01 07:12:18 +01:00
Mario Limonciello
9ec72eca1a trivial: acpi-facp: Link FwupdBiosAttr to FwupdSecurityAttr for S2idle
Lenovo Z13 offers to change this using "SleepState".
2022-07-29 11:31:50 -05:00
Mario Limonciello
e07eb9afab trivial: pci-psp: Link FwupdBiosAttr to FwupdSecurityAttr when TSME off
Lenovo Z13 offers a BIOS setting called "TSME" that can be potentially
controlled from firmware-attributes API.
2022-07-29 11:31:50 -05:00
Mario Limonciello
64df25d0e7 iommu: map out the known BIOS attributes for IOMMU
This will let fwupd clients offer to change the BIOS setting for
IOMMU.

"IOMMU" -> Lenovo P620
"VtForDirectIo" -> Dell XPS 9310
"AmdVt" -> Lenovo P14s
2022-07-29 11:31:50 -05:00
Mario Limonciello
803967289c uefi-capsule: Set FwupdBiosAttr ID for when secure boot is turned off
Lenovo and Dell both use the same key name 'SecureBoot' for this
functionality.
2022-07-29 11:31:50 -05:00
Mario Limonciello
c0b0a77e21 trivial: make the lenovo plugin only look for thinklmi attributes
This ensures that even if Dell introduces a BootOrderLock attribute
it will not match.
2022-07-29 11:31:50 -05:00
Richard Hughes
47efacfe5d Remove the firmware builder functionality
We used the firmware builder functionality to either build or modify
firmware images on the end-user system, e.g. copying the MAC address
from the old system image to the new system image.

Unfortunately running fwupd on the command line (e.g. ./src/fwupd)
leaves the tty connected and thus bubblewrap doesn't protect us from
installing malicious signed firmware. The firmware would have to have
been uploaded to the LVFS by a trusted vendor and signed before being
installed, which further decreases the severity of this problem.

As there was only one vendor who asked for this functionality (who have
yet to upload a single firmware to the LVFS...) just rip out this
functionality to reduce our attack surface and completely fix the bug,
and any like it.

Many thanks to Aaron Janse <aaron@ajanse.me> for discovering and
disclosing this issue to us.
2022-07-29 16:52:38 +01:00
Ivan Mikhanchuk
c14129a149 modem-manager: add Quectel secure boot status AT commands 2022-07-29 09:32:56 +01:00
Mario Limonciello
f755f55e4c lenovo-thinklmi: convert to use new firmware attributes API 2022-07-28 17:30:57 -05:00
Mario Limonciello
9289e7d817 trivial: set firwmare attributes class directory for all tests
We don't want the system's firmware attributes class directory to
conflict.
2022-07-28 17:30:57 -05:00
Richard Hughes
a307f60984 trivial: Show what the user should do for IOMMU failure 2022-07-28 16:45:13 +01:00
Richard Hughes
829258401e Allow plugins and backends to print debugging information to the console
This is really useful for debugging.
2022-07-28 16:10:06 +01:00
Benson Leung
21b7506b4c cros-ec: Add Prism board
Fixes #4872
2022-07-28 07:05:56 +01:00
Ryan
61a2bead81 ccgx:add new dock to the quirk file 2022-07-26 11:49:52 +01:00
Richard Hughes
b6ad1f248e trivial: Use fu_bytes_new_offset() in more places 2022-07-25 17:07:33 +01:00
Richard Hughes
66532a1293 trivial: Make fuzzing less verbose 2022-07-25 17:07:33 +01:00
Richard Hughes
f0980cbdda logitech-hidpp: Lower a debug level when updating the Bolt radio 2022-07-21 21:27:24 +01:00
Richard Hughes
f4c0c7fe01 corsair: Fix two g_prefix_error() typos 2022-07-21 15:28:24 +01:00
Richard Hughes
b8a5f4945f corsair: trivial: Do not set the physical ID, as it's also set by _add_child() 2022-07-21 15:28:24 +01:00
Richard Hughes
b507f3af59 corsair: trivial: Style fix 2022-07-21 15:28:24 +01:00
Richard Hughes
470258ac24 corsair: Use hex format constants
This means it's easier to match up with the verbose logs.
2022-07-21 15:28:24 +01:00
Richard Hughes
463276defd Check if Intel TME has been disabled by the firmware or platform 2022-07-21 11:22:05 +01:00
Richard Hughes
1251cb3376 amt: Connect to the interface during ->open() 2022-07-20 20:11:32 +01:00
Richard Hughes
a5749f4d23 Set the HSI levels in a central place
This means we don't need to worry about changing multiple
implementations if the HSI levels change for a specific ID.

It also means we can fake HSI results in the future without having
to also store the 'correct' level in the input file.
2022-07-15 20:21:22 +01:00
Sean Rhodes
f1aabcf6f7
plugins/intel-spi: (nit) Change APL from pch to ich (#4833)
APL doesn't have a PCH so change it to ich. This change make no
difference, and is just for correctness.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-07-15 07:27:14 +00:00
Mario Limonciello
611cf51fc8 trivial: lower modem manager probing verbosity in one other place
Fixes: 030a0d51c ("trivial: quiet the modem manager error about unable to probe")
2022-07-14 12:59:53 -05:00
Richard Hughes
a5929cee29 uefi-pk: Use the correct flag when added to the blocklist 2022-07-14 16:05:34 +01:00
Richard Hughes
8e7ad1b188 msr: Fix fwupdmgr security when the plugin is added to the blocklist 2022-07-14 16:05:34 +01:00