Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot: skip loading DTBs in type 1 when secure boot is enabled #328

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

bluca
Copy link
Member

@bluca bluca commented Sep 20, 2023

The kernel loads the DTB from EFI before ExitBootServices():

https://github.com/torvalds/linux/blob/v6.5/drivers/firmware/efi/libstub/fdt.c#L245

DTBs can map and assign arbitrary memory ranges. The kernel refuses to load one from the dtb= kernel command line parameter when secure boot is enabled, as it's not safe. Let's do the same for type 1 entries, as they are unverified.

This only affects arm64 and riscv64, firmwares do not support DTB on x86.

(cherry picked from commit 4b4d612) (cherry picked from commit c1404ff) (cherry picked from commit 7844c65) (cherry picked from commit f381320) (cherry picked from commit 3c97ff5)

The kernel loads the DTB from EFI before ExitBootServices():

https://github.com/torvalds/linux/blob/v6.5/drivers/firmware/efi/libstub/fdt.c#L245

DTBs can map and assign arbitrary memory ranges. The kernel refuses
to load one from the dtb= kernel command line parameter when secure
boot is enabled, as it's not safe. Let's do the same for type 1
entries, as they are unverified.

This only affects arm64 and riscv64, firmwares do not support DTB
on x86.

(cherry picked from commit 4b4d612)
(cherry picked from commit c1404ff)
(cherry picked from commit 7844c65)
(cherry picked from commit f381320)
(cherry picked from commit 3c97ff5)
@packit-as-a-service
Copy link

We were not able to find or create Copr project packit/systemd-systemd-stable-328 specified in the config with the following error:

Cannot create a new Copr project (owner=packit project=systemd-systemd-stable-328 chroots=[]): chroots: '[]' is not a valid choice for this field.

Please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

2 similar comments
@packit-as-a-service
Copy link

We were not able to find or create Copr project packit/systemd-systemd-stable-328 specified in the config with the following error:

Cannot create a new Copr project (owner=packit project=systemd-systemd-stable-328 chroots=[]): chroots: '[]' is not a valid choice for this field.

Please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

@packit-as-a-service
Copy link

We were not able to find or create Copr project packit/systemd-systemd-stable-328 specified in the config with the following error:

Cannot create a new Copr project (owner=packit project=systemd-systemd-stable-328 chroots=[]): chroots: '[]' is not a valid choice for this field.

Please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

@bluca bluca merged commit 65fe9f3 into systemd:v250-stable Sep 20, 2023
9 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant