Document CONFIG_SPL_MINIMUM_FIT_VERSION, the FIT configuration 'version' property it checks, and the trust-root boundary of the mechanism (the minimum lives in the SPL binary itself).
Signed-off-by: eli <[email protected]> --- doc/develop/spl.rst | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/doc/develop/spl.rst b/doc/develop/spl.rst index 08b51172..762edeea 100644 --- a/doc/develop/spl.rst +++ b/doc/develop/spl.rst @@ -125,6 +125,49 @@ Use `xpl_phase()` to find the current U-Boot phase, e.g. `PHASE_SPL`. You can also find the previous and next phase and get the phase name. +SPL FIT anti-rollback +--------------------- + +When SPL verifies a signed FIT (CONFIG_SPL_FIT_SIGNATURE), the signature +guarantees that the image is authentic, but not that it is current: an +attacker who can write the next-stage image location could replace it with an +older image that is still correctly signed, reintroducing vulnerabilities +fixed in newer firmware. + +CONFIG_SPL_MINIMUM_FIT_VERSION adds a software rollback check: after +signature verification succeeds, SPL reads the "version" property of the +selected configuration node and refuses to boot if it is lower than this +value. A missing property counts as version 0, so the minimum must be raised +together with images that actually carry the property. The default of 0 +disables the check. + +Example configuration node:: + + configurations { + default = "conf-1"; + conf-1 { + version = <0x2>; + description = "U-Boot 2026.07"; + firmware = "uboot"; + signature-1 { + algo = "sha256,rsa4096"; + key-name-hint = "dev"; + sign-images = "firmware"; + }; + }; + }; + +The configuration node, including its "version" property, is covered by its +signature, so the property cannot be forged without the signing key; the +minimum version itself is fixed at SPL build time. + +Note that this is a software trust root: the minimum version lives in the SPL +binary, so an attacker able to rewrite the SPL itself (for example via a +writable boot flash) can also lower the minimum. For a stronger guarantee, +protect the SPL boot medium against writes or anchor the trust root in +one-time programmable storage. + + .. _fdtgrep_filter: Device tree -- 2.53.0
