Theoretical Patchability Quantification for IP-Level Hardware Patching Designs

Wei-Kai Liu, Benjamin Tan, Jason M. Fung, Krishnendu Chakrabarty

TL;DR

This paper introduces a formal framework to quantify "patchability" in hardware designs at the Register Transfer Level (RTL). By combining concepts of observability and controllability, the authors provide a metric that allows designers to strategically insert patching logic into Integrated Circuits (ICs), achieving high bug-fix potential with significantly lower resource overhead than traditional "greedy" approaches.

What Problem Does This Paper Address?

As System-on-Chip (SoC) designs grow in complexity, it becomes nearly impossible to verify every possible state, leading to "unfixable" hardware bugs that are only discovered after the chip has been manufactured and deployed. While software and firmware can be updated easily, hardware is traditionally rigid.

To solve this, engineers often add "patching logic"—extra hardware like multiplexers (MUXes) and control registers—that allows them to observe or modify internal signals at run-time. However, there has been no standardized way to measure how effective these patches are. Designers usually rely on ad hoc intuition, which often leads to "over-designing" (wasting area and power) or "under-designing" (leaving the chip vulnerable to bugs that can't be reached by the patch logic).

Methods

The authors propose a theoretical quantification of Patching Controllability (PC) and Patching Observability (PO).

  1. PC and PO Definitions: PC measures the extent to which a signal can be forced to a specific value by patching logic, while PO measures how well a signal's state can be monitored.
  2. Propagation Formulas: The core of the method is a set of mathematical rules for how patchability scores flow through standard RTL operators (AND, OR, XOR, etc.). For example, the PC score for an OR gate with two inputs is the average of the PC scores of its inputs.
  3. Conditional Logic Handling: The method specifically accounts for multiplexers and "case" statements. It recognizes that even if a signal is a constant (usually PC=0), if the selector signal is controllable, the output becomes controllable because the patch can choose which constant to "send" through.
  4. Normalization: To allow comparison between different IP blocks, the total PC/PO scores are normalized based on signal widths and the total number of signals in the design.

Datasets

The researchers evaluated their method using a real-world IP block: the reglk_wrapper from the Hack@DAC-21 SoC (which is based on the OpenPiton manycore architecture). They tested five different patching configurations (V1 through V5) and compared them against a "Greedy" baseline that attempts to make almost every signal patchable.

Key Insights and Ideas

  • Patchability is a Resource Trade-off: The paper treats patchability as a design constraint similar to power or area. By quantifying it, designers can perform "design space exploration" to find the "sweet spot" where they get the most protection for the least amount of extra silicon.
  • Strategic Placement Trumps Volume: One of the most important "aha" moments is that patching a few high-leverage control signals is often more effective than patching many data signals.
  • The "Constant" Insight: In hardware, many security vulnerabilities involve fixed values (like a hardcoded permission bit). The authors show that you don't necessarily need to replace the constant with a register; if you can control the logic that selects that constant, you've effectively patched the bug.

Key Results

  • Efficiency Gains: The authors' "V3" configuration achieved a normalized patchability score of 0.9 (where 1.0 is "fully patchable") while using 65% fewer resources (110 bits of investment vs. 319 bits) compared to the greedy approach.
  • Vulnerability Mitigation: The method successfully identified configurations that could mitigate specific Common Weakness Enumerations (CWEs), such as CWE-1262 (Improper Access Control) and CWE-1231 (Lock Bit Modification).
  • Precision: The framework proved that intuitive choices are not always optimal. For instance, configuration "V4" looked promising to a human designer but actually resulted in a lower patchability score (0.4) than the more strategically designed V3 (0.9).

Limitations and Future Work

  • Directional Controllability: The current model treats controllability as a binary "can we change it?" It does not yet distinguish between the ability to force a signal to '0' versus forcing it to '1'. Some hardware bugs only require one specific direction to be fixed.
  • Security of the Patching Logic: While the paper focuses on how to patch, it acknowledges that the patching infrastructure itself could be a target for attackers. Future work is needed to ensure the "fix" doesn't become a new "backdoor."
  • Granularity: The authors plan to refine the model to provide more granular scores that reflect the security importance of specific signals rather than treating all bits as equal.

Summary updated

Abstract

As the complexity of System-on-Chip (SoC) designs continues to increase, ensuring thorough verification becomes a significant challenge for system integrators. The complexity of verification can result in undetected bugs. Unlike software or firmware bugs, hardware bugs are hard to fix after deployment and they require additional logic, i.e., patching logic integrated with the design in advance in order to patch. However, the absence of a standardized metric for defining “patchability” leaves system integrators relying on their understanding of each IP and security requirements to engineer ad hoc patching designs. In this paper, we propose a theoretical patchability quantification method to analyze designs at the Register Transfer Level (RTL) with provided patching options. Our quantification defines patchability as a combination of observability and controllability so that we can analyze and compare the patchability of IP variations. This quantification is a systematic approach to estimate each patching architecture’s ability to patch at run-time and complements existing patching works. In experiments, we compare several design options of the same patching architecture and discuss their differences in terms of theoretical patchability and how many potential weaknesses can be mitigated.
BibTeX
@inproceedings{liu2024theoretical,
  author = {Wei-Kai Liu and Benjamin Tan and Jason M. Fung and Krishnendu Chakrabarty},
  title = {{Theoretical Patchability Quantification for IP-Level Hardware Patching Designs}},
  booktitle = {ASPDAC},
  year = {2024},
  doi = {10.1109/asp-dac58780.2024.10473895},
}
Figure