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

feat: implement secure boot from disk #7375

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Conversation

smira
Copy link
Member

@smira smira commented Jun 14, 2023

This includes sd-boot handling, EFI variables, etc.

There are some TODOs which need to be addressed to make things smooth.

Install to disk, upgrades work.

@smira smira added this to the v1.5 milestone Jun 14, 2023
@@ -109,7 +109,7 @@ func NewInstaller(cmdline *procfs.Cmdline, seq runtime.Sequence, opts *Options)
}
}

i.manifest, err = NewManifest(seq, bootLoaderPresent, i.options)
i.manifest, err = NewManifest(seq, i.bootloader.UEFIBoot(), bootLoaderPresent, i.options)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: above, on line 106, needs a way to force a specific bootloader based on Options (flags), so that one could create sd-boot metal image for example

hack/ukify/main.go Outdated Show resolved Hide resolved
@@ -29,5 +33,10 @@ func PseudoSubMountPoints() (mountpoints *Points, err error) {
pseudo.Set("hugetlb", NewMountPoint("hugetlbfs", "/dev/hugepages", "hugetlbfs", 0, ""))
pseudo.Set("securityfs", NewMountPoint("securityfs", "/sys/kernel/security", "securityfs", unix.MS_NOSUID|unix.MS_NOEXEC|unix.MS_NODEV|unix.MS_RELATIME, ""))

if _, err := os.Stat(constants.EFIVarsMountPoint); err == nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mount as readonly, remount in the code which writes the vars? better for security

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: for later

@smira
Copy link
Member Author

smira commented Jun 14, 2023

/promote integration-trusted-boot

@smira
Copy link
Member Author

smira commented Jun 14, 2023

@frezbo please help me to fix this when you're back:

the required flash image was not found in any of the expected paths for (["/usr/share/OVMF/OVMF_CODE_4M.secboot.fd"]), please install it with the package manager or specify --extra-uefi-search-paths

@frezbo
Copy link
Member

frezbo commented Jun 15, 2023

/usr/share/OVMF/OVMF_CODE_4M.secboot.fd

Seems alpine has a different file: /usr/share/qemu/edk2-x86_64-secure-code.fd

@frezbo frezbo mentioned this pull request Jun 15, 2023
@frezbo
Copy link
Member

frezbo commented Jun 15, 2023

/promote integration-trusted-boot

@frezbo
Copy link
Member

frezbo commented Jun 15, 2023

/promote integration-trusted-boot

@frezbo
Copy link
Member

frezbo commented Jun 16, 2023

/promote integration-trusted-boot

@frezbo
Copy link
Member

frezbo commented Jun 16, 2023

/promote integration-trusted-boot

@frezbo
Copy link
Member

frezbo commented Jun 16, 2023

/promote integration-trusted-boot

@frezbo
Copy link
Member

frezbo commented Jun 16, 2023

/promote integration-trusted-boot

@frezbo frezbo force-pushed the feat/sd-boot branch 2 times, most recently from 7b11f28 to 090631b Compare June 16, 2023 12:45
@frezbo
Copy link
Member

frezbo commented Jun 16, 2023

/promote integration-trusted-boot

This includes sd-boot handling, EFI variables, etc.

There are some TODOs which need to be addressed to make things smooth.

Install to disk, upgrades work.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
@frezbo
Copy link
Member

frezbo commented Jun 16, 2023

/m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants