Commit Graph

7645 Commits

Author SHA1 Message Date
Richard Hughes
620726c47a Prompt users to fix BIOS configuration issues 2022-08-13 16:44:18 +01: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
Mario Limonciello
088397618a Add bash-completion for BIOS settings 2022-08-11 09:52:26 -05:00
Mario Limonciello
2536bf462c Allow running get-bios-settings without root or PK
The only information that is secret is the `current_value`.
Augment the d-bus call to determine whether the caller needs this
information.

* If `fwupdmgr` is launched as root it will be provided.
* If `fwupdmgr` is launched with `--authenticate` it will be requested
  and PK will be engaged.
2022-08-11 09:52:26 -05:00
Boris Mittelberg
b48cd9fea6 cros-ec: adding stay-in-ro command if EC is in bootloader 2022-08-10 19:06:58 +01:00
Mario Limonciello
7ddbe5e0b3 trivial: don't let people try to turn off UEFI secure boot
The firmware from both Dell and Lenovo actually blocks this, but the
error message is pretty confusing.

```
$ sudo fwupdtool set-bios-setting SecureBoot Disable
17:39:40:0249 FuBiosAttrs          KERNEL BUG: thinklmi doesn't export a 'type' attribute
Loading…                 [-                                      ]
failed to write 7 bytes to 17: Invalid argument
```
2022-08-10 11:09:31 -05:00
Mario Limonciello
fa661c595d trivial: map common positive or negative keys to possible enumeration values
Dell and Lenovo use Enable or Enabled and Disable or Disabled which is confusing
to an end user.

Set up some heuristics to map positive values and negative values when passed
into the client.
2022-08-10 10:37:27 -05:00
Mario Limonciello
5f0bb3dc8f Add support for translation for the sample Dell BIOS setting strings 2022-08-10 10:17:25 -05:00
Mario Limonciello
3e5fce5ffa trivial: ignore strings files in directory with drivers not attributes 2022-08-10 10:17:25 -05:00
Mario Limonciello
d51364a8b1 trivial: don't set target BIOS attribute for read only attributes
If an attribute is read only, then we'll have a failure trying to
set it.  So don't offer a target value so clients won't try to set
an attribute.x
2022-08-10 08:20:49 -05:00
Richard Hughes
fc702c696b trivial: Don't use the security attr result in the title
Fixes some of https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1989
2022-08-10 13:02:03 +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
Mario Limonciello
fdfdaed911 trivial: bios-attrs: fix a logic bug in lenovo string extraction
Several enumeration attributes were missing their final values
2022-08-05 14:39:48 -05:00
Mario Limonciello
23b7495cbd trivial: add missing read_only BIOS attribute to GVariant
This fixes read_only attributes being advertised to clients as writable.
2022-08-05 14:08:55 -05:00
Mario Limonciello
a0eb3bc73d trivial: fix a docs directory check inversion
Fixes: a19b6f23e ("trivial: ci: debian: Use helper script to install dependencies instead. (#4906)")
2022-08-05 11:45:19 -05:00
Mario Limonciello
a19b6f23e5
trivial: ci: debian: Use helper script to install dependencies instead. (#4906)
* trivial: ci: debian: Use helper script to install dependencies instead.

Should fix building Debian stable containers
Fixes: #4901

* trivial: debian: ci: only populate fwupd-doc if dependencies are met

* trivial: ci: debian: generate control file using fwupd_setup_helpers
2022-08-05 08:43:13 +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
Mario Limonciello
04fd943abd trivial: fix a documentation comment mistake 2022-08-01 12:39:19 -05:00
Richard Hughes
98b8cf0bd1
Wip/hughsie/hsi descriptions (#4895)
* trivial: Fix a few HSI descriptions
2022-08-01 17:35:44 +01:00
Richard Hughes
0beed2f138 Store the current BIOS value in a security attribute
We can't very-well ask the user to 'change it back' if we do not tell
them what it is set to already.
2022-08-01 15:45:43 +01:00
Richard Hughes
638cb1583a trivial: Fix a tiny memory leak when showing warning boxes 2022-08-01 14:01:32 +01:00
Richard Hughes
699cd1225c trivial: Fix up building docs on Fedora CI 2022-08-01 13:40:31 +01:00
Richard Hughes
934002553a Allow loading BIOS attributes for host emulation 2022-08-01 13:32:12 +01: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
331d7bbd40 trivial: FwupdSecurityAttr: fix a symbol name 2022-07-29 12:41:59 -05:00
Mario Limonciello
8de9027ab4 trivial: remove unnecessary assertion for FwupdBiosAttr 2022-07-29 12:41:58 -05: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
aa1e321f6e Add support for including a FwupdBiosAttr ID in FwupdSecurityAttr
This can allow clients to let users correct problems found on their
systems.
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
Mario Limonciello
7660222240 Add a unique identifier to all BIOSAttr objects
This identifier can be used by plugins or the daemon to disambiguate
behavior between two different drivers.

Set it up so that plugins don't NEED to use it, but optionally can
find attributes by either name or ID
2022-07-29 11:31:50 -05:00
Richard Hughes
3b80e1f305 Check files are not missing from POTFILES.in during precommit 2022-07-29 17:17:55 +01:00
Richard Hughes
c611e9f37e Use -Db_sanitize=address,undefined in Fedora CI
This would have caught the recent memory corruption automatically.
2022-07-29 17:09:50 +01: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
Piotr Drąg
d320fe17f7 Update POTFILES.in 2022-07-29 09:58:59 -05:00
Richard Hughes
93266d36be Fix a crash when parsing an empty BIOS attribute 2022-07-29 12:57:35 +01:00
Richard Hughes
4a78fed13c trivial: Check input parameters to fu_strsplit() 2022-07-29 12:57:35 +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
5ded4f44fe Add support for reading and writing firmware attributes
This support is comprehensive:
 * Client library support
 * Daemon support
 * plugin support
 * Client tool support (with new commands)
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
Richard Hughes
3092afb9fa trivial: Include the new 'leak' sanitizer in the opt-out list 2022-07-28 13:12:55 +01:00
Richard Hughes
646afd164b Fix meson dist with -Dgresource_quirks=enabled
Fixes https://github.com/fwupd/fwupd/issues/4874
2022-07-28 13:12:46 +01:00
Benson Leung
21b7506b4c cros-ec: Add Prism board
Fixes #4872
2022-07-28 07:05:56 +01:00
Mario Limonciello
17c636686d trivial: libfwupd: move some duplicated code to fwupd-common
Several of the string/integer/time functions are duplicated in multiple
source files for no discernable reason.  Move them into fwupd-common
as private symbols instead.
2022-07-26 20:11:23 +01:00