-
Notifications
You must be signed in to change notification settings - Fork 131
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
Add question about how kernel modules are signed #337
Merged
jsetje
merged 1 commit into
rhboot:main
from
julian-klode:kernel-module-signing-question
Jul 12, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with this requirement.
Ubuntu does not only use ephemeral key for signing kernel modules. And it by default trusts: ephemeral build-time, 3rd-party driver signing key, Livepatch signing key, and MOK signing keys.
In practice MOK signing key is always the same for all kernels.
Which key is used and trusted, and whether it is chained to CA is not at all interesting.
Instead the following rules should be followed instead
This is easily checked by comparing two distinct abi builds, running modinfo on the modules from both and checking that vermagic is different.
Note that there are additional abi checks that prevent modules loading from incompatible builds of kernel on top of that (but those use non-cryptographically secure CRC).
I request to revert this requirement, as it is crafted without full consideration of existing keys in use for existing secureboot signed keys in all kernels from all vendors, which today all use the same key for different abis and already prevent ability to load a kernel module from one kernel abi on the other abi. If that is incorrect for any vendor, it must be resolved by correctly bumping EXTRAVERSION/LOCALVERSION in every published build.
Also we should ensure all certificates used for kernel module signing, have the extension set that such certs are for module signing only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @jsetje @steve-mcintyre i disagree with this wording being merged, without reviews or approvals from at least 2 different kernel maintainers. and the proposer of this change is not a kernel maintainer themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe modversions is the wrong thing, because
CONFIG_MODVERSIONS
is the CRC mechanism, you want to ensure each kernel build has a separateEXTRAVERSION
orCONFIG_LOCALVERSION
.I'm wary of allowing people to reuse kernel ABIs because they think it is still the same, they can't really proof it or have the tooling, hence generally guiding them to something that works is what I'm looking for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about the memory life or size of server. Instead of using Canonical key, for each Livepatch operation, MOK needs to add into or erase from the database of keys, which might reduce the usage life of NVRAM.