CWE-1328 is about a security version number in hardware that can be modified, so boot firmware can be rolled back to vulnerable code.
How it happens
A SoC with secure or verified boot may keep a security version number to block downgrades to older, vulnerable firmware. For that to work the number must be stored securely and persist across power-on resets.
The weakness is that an adversary can change it. They can then roll back to a vulnerable version and exploit it. Under some circumstances they can also prevent upgrades, which is a denial of service on updates. Either way the SoC is left vulnerable.
What an attacker gains
MITRE lists high impact across confidentiality, integrity, authentication and authorization: rollback or downgrade to vulnerable firmware, or a block on upgrades.
How to find it
Both detection methods in the record are rated high. Automated dynamic analysis should test whether stored security version numbers are mutable and whether older firmware images can be programmed. Anti-rollback features should also be reviewed during architecture or design review.
How to fix it
- Architect the system so security version data lives in registers that are read-only or have access controls that stop an untrusted agent from changing them.
- During implementation and test, demonstrate that the data is read-only and that the access controls work.
Quick check
Why is blocking upgrades also a problem?
A modifiable version number can be used to prevent upgrades, which leaves the device stuck in a vulnerable state.