Heads may accept unsigned files indicating a /boot update came from a package manager
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 1.6k
- Forks
- 211
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 6
Description
There is code in Heads to accept `kexec_package_trigger_pre.txt` or `kexec_package_trigger_post.txt` on /boot, which are intended for a package manager to describe intentional updates it made to /boot. This originates from this commit: https://github.com/linuxboot/heads/commit/887c79065eb6c25dc8e0abb9acf4cfddbcd968b2
The intent appears to be that the OS can tell Heads that certain updates to /boot are intentional, and Heads will soften the message about tampering a bit telling you what the OS said.
For example it could say this instead of the usual "these files failed verification":
```
The following files failed the verification process AFTER package updates ran:
${CHANGED_FILES}
This is likely due to package triggers in$UPDATE_INITRAMFS_PACKAGE.
You will need to update your checksums for all files in /boot.\n\nWould you like to update your checksums now?
```
However, there is no authentication that these files actually came from the OS, an attacker tampering with /boot could create them too. So I think it undermines security, it's purporting to help you decide whether the changes are intentional, but it doesn't actually know itself. It still shows the correct files and says "likely due to" (it's not sure), but it's basing that on information an attacker could manipulate.
It might even undermine security for users not using this integration - the logic to check for the file is still there, although hopefully such a user would see that prompt as unexpected since they do not normally get it for OS updates.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the Heads code that reads kexec_package_trigger_pre.txt and kexec_package_trigger_post.txt on /boot, and compare its behavior with commit 887c79065eb6c25dc8e0abb9acf4cfddbcd968b. Determine how unsigned trigger files affect verification warnings and define a change that prevents attacker-controlled files from weakening the tampering signal, with the relevant verification behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100