2180
Scope Impact Likelihood
Other Varies by Context
Reduce Maintainability
When the system is unable to be patched, it can be left in a
vulnerable state.
High
Potential Mitigations
Phase: Architecture and Design
Phase: Implementation
Secure patch support to allow ROM code to be patched on the next boot.
Effectiveness = Moderate
Some parts of the hardware initialization or signature verification done to authenticate patches
will always be "not patchable."
Phase: Architecture and Design
Phase: Implementation
Support patches that can be programmed in-field or during manufacturing through hardware
fuses. This feature can be used for limited patching of devices after shipping, or for the next
batch of silicon devices manufactured, without changing the full device ROM.
Effectiveness = Moderate
Patches that use hardware fuses will have limitations in terms of size and the number of patches
that can be supported. Note that some parts of the hardware initialization or signature verification
done to authenticate patches will always be "not patchable."
Demonstrative Examples
Example 1:
A System-on-Chip (SOC) implements a Root-of-Trust (RoT) in ROM to boot secure code. However,
at times this ROM code might have security vulnerabilities and need to be patched. Since ROM is
immutable, it can be impossible to patch.
ROM does not have built-in application-programming interfaces (APIs) to patch if the code is
vulnerable. Implement mechanisms to patch the vulnerable ROM code.
Example 2:
The example code is taken from the SoC peripheral wrapper inside the buggy OpenPiton SoC
of HACK@DAC'21. The wrapper is used for connecting the communications between SoC
peripherals, such as crypto-engines, direct memory access (DMA), reset controllers, JTAG, etc.
The secure implementation of the SoC wrapper should allow users to boot from a ROM for Linux
(i_bootrom_linux) or from a patchable ROM (i_bootrom_patch) if the Linux bootrom has security
or functional issues.The example code is taken from the SoC peripheral wrapper inside the buggy
OpenPiton SoC of HACK@DAC'21. The wrapper is used for connecting the communications
between SoC peripherals, such as crypto-engines, direct memory access (DMA), reset controllers,
JTAG, etc. The secure implementation of the SoC wrapper should allow users to boot from a ROM
for Linux (i_bootrom_linux) or from a patchable ROM (i_bootrom_patch) if the Linux bootrom has
security or functional issues.
Example Language: Verilog (Bad)
...
bootrom i_bootrom_patch (
.clk_i ,
.req_i ( rom_req ),
.addr_i ( rom_addr ),
CWE Version 4.14
CWE-1310: Missing Ability to Patch ROM Code
CWE-1310: Missing Ability to Patch ROM Code