capsule: refuse to sign a manifest the source never declared #1
Loading…
Reference in a new issue
No description provided.
Delete branch "nonos-sync/gh-7"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
An application declares its capabilities in its own source. The SDK compiles that declaration into a
.nonos.capssection of the binary. This compares the section againstCAPSULE_REQUIRED_CAPSin the manifest, and does it before signing.Before, not after, is the point. A manifest granting powers the source never requested must not exist in signed form at all, because the instant it does, somebody can install it.
A mismatch reports both directions, since they are different problems:
A section rather than a symbol, because release builds link with
--strip-all. A check that verifies in development and silently stops running in the build that ships is worse than no check, because you believe in it.Also drops the hardcoded
x86_64-nonos-userfrom the build rule so a capsule can name its own target, with the pipeline setting applying otherwise.Needs
scripts/check_declared_caps.pyfrom the SDK PR in nonos-micro-kernel.Opened on GitHub by eKisNonos as pull request 7. Review and merge happen there while this repository is kept in step from GitHub; this copy follows it, and is marked merged or closed when it is.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.