Detection of potential security issues in hardware design using register transfer level (RTL) information flow tracking

By comparing unmodified simulation and alternative simulation in hardware design, deriving data flow and generating flow metadata, the problem of low performance and complexity of IFT technology in hardware design is solved, and effective detection of potential security issues is achieved.

CN118733358APending Publication Date: 2024-10-01INTEL CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311767585.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-31
Filing Date
2023-12-20
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing Information Flow Tracing (IFT) technology suffers from low performance, high complexity, low accuracy and insufficient expressiveness in hardware design, and instrumentation-based methods lead to high overhead and excessive pollution, making it difficult to effectively detect potential security issues. question.

Method used

Generate flow metadata to detect potential vulnerabilities in hardware designs by using unmodified simulations to compare with alternative simulations without modifying the HDL code of the hardware design, deriving data flows and changing sources of contamination during simulation based on data flow specifications. Security Question.

Benefits of technology

It achieves low-cost, low-complexity detection of security issues in hardware design, avoids high overhead and excessive contamination in traditional methods, and improves detection accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733358A_ABST
    Figure CN118733358A_ABST
Patent Text Reader

Abstract

Embodiments described herein generally relate to detecting security issues in hardware designs using IFT. In an example, a data stream is tracked within a hardware design represented in an HDL without instrumentation of the HDL. A data stream primitive is received that specifies a source of contamination from which the data stream is to be tracked. A baseline simulation trace log of a baseline RTL simulation of a hardware design is obtained by causing a simulator to perform a baseline RTL simulation during which no pollution source is changed. An injection simulation tracking log of the injection RTL simulations is obtained by causing the simulator to perform, on each contamination source, an injection RTL simulation during which the contamination source is changed. The data stream is then identified based on a comparison between the baseline and the injection simulation trace log. Potential security issues within the hardware design are detected by applying policies to the data stream.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments described herein relate generally to the fields of Register Transfer Level (RTL) simulation and Information Flow Tracking (IFT), and more specifically to the identification of potential hardware design security issues at design time (e.g., pre-silicon) in a simulation environment. Background Art

[0002] IFT, which may also be referred to herein as taint tracing, is a technique for following the trail of data as it flows through the execution of software or (in the context of this patent application) RTL simulation of a hardware design. IFT is a technique for verification and assurance at design time, rather than the functionality used in a design as it appears in a product. IFT has many security applications, including but not limited to evaluating: Whether stale data is held in registers / buffers for exploitation (e.g., meltdown, Microarchitectural Data Sampling (MDS), and architecturally leaking uninitialized data from the microarchitecture (AEPIC leak)) Whether secret data remains partitioned Whether the reset actually reinitializes the state of the design and leaves no trace of the previous design state

[0003] The above security issues may manifest as security vulnerabilities or security issues rather than functional issues. Therefore, these issues cannot be discovered through traditional, finely honed functional verification, but can be captured through IFT. BRIEF DESCRIPTION OF THE DRAWINGS

[0004] The embodiments described herein are illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references refer to similar elements.

[0005] Figure 1 is a block diagram illustrating an operating environment that supports detection of potential security issues in hardware designs, according to some embodiments.

[0006] Figure 2 is a flow diagram illustrating operations for utilizing Information Flow Tracking (IFT) to perform detection of potential security issues in accordance with some embodiments.

[0007] Figure 3 Two timing diagrams are shown to illustrate the concept of data flow with reference to base simulation and injection simulation according to some embodiments.

[0008] Figure 4is a block diagram illustrating an example of a data flow specification that may be included within a configuration file according to some embodiments.

[0009] Figure 5 is a table showing examples of logical conditions and expressions that may be used to specify data flows according to some embodiments.

[0010] Figure 6 is a block diagram illustrating examples of policies that may be included within a policy file according to some embodiments.

[0011] Fig. 7A is a timing diagram illustrating an example of two data flows that do not violate a mixed data flow policy according to some embodiments.

[0012] Figure 7B is a timing diagram illustrating an example of two data flows violating a mixed data flow policy according to some embodiments.

[0013] Fig. 8A is a timing diagram illustrating an example of data flow that does not violate the double read strategy according to some embodiments.

[0014] Figure 8B is a timing diagram illustrating an example of data flow that violates the double read strategy according to some embodiments.

[0015] Fig. 9A is a timing diagram illustrating an example of data flow that does not violate an invalid data flow policy according to some embodiments.

[0016] Fig. 9B is a timing diagram illustrating an example of data flow that violates an invalid data flow policy according to some embodiments.

[0017] Fig.10 is an example of a computer system that some embodiments may utilize. DETAILED DESCRIPTION

[0018] Embodiments described herein generally relate to using IFT to detect security issues in hardware design. Current IFT techniques suffer from a combination of low performance, high complexity (e.g., difficult to integrate), low precision (e.g., allowing overestimation) and low expressiveness (e.g., not allowing complex violation conditions to be expressed). In addition, most existing IFT methods work by inserting a hardware description language (HDL) for modeling an electronic system (e.g., a central processing unit (CPU) core and / or other digital circuits). Such inserting piles can produce high overhead and lead to excessive pollution (e.g., excessive approximation of data flow). In addition, these methods based on inserting piles have high implementation complexity and produce false positives for security errors.

[0019] Various embodiments described herein seek to address or at least mitigate one or more of the limitations of existing IFT techniques for various use cases. For example, the proposed method for identifying security issues detects information flow (or data flow) without modifying the HDL code representing the hardware design. As further described below, the proposed solution can derive data flow by comparing an unmodified simulation with an alternative simulation, during which the RTL signal value changes at the beginning of a given data flow, and the given data flow can be specified according to arbitrary logical conditions, such as, for example, involving simulation variables, signals of the design under test (DUT) (e.g., signal comparisons and signal conversions), and protocol states, etc., which are reflected by protocol-level analysis, which is performed by logic code associated with a logical namespace of a simulator tool, which drives the simulator and evaluates simulation results output by the simulator. According to one embodiment, a data flow specification of a data flow indicating a contamination source within a hardware design to be evaluated is received. A first simulation result (e.g., a simulation trace log) of a first RTL simulation of a hardware design is obtained by causing the simulator to perform a first RTL simulation. A second simulation trace log of a second RTL simulation of the hardware design is obtained by causing the simulator to perform a second RTL simulation, and the pollution source is changed based on the data flow specification during the second RTL simulation. The data flow can then be identified based on a comparison between the first simulation trace log and the second simulation trace log. In order to generate or record an error or warning message, for each of a plurality of signals in the hardware design, flow metadata can be generated, which indicates whether the signal or a portion thereof is part of the data flow at one or more instances of the simulation time based on the first simulation trace log and the second simulation trace log. Finally, potential security issues in the hardware design can be detected by applying one or more strategies to the flow metadata.

[0020] While various examples are described herein in which the results of a baseline simulation are compared to each injection simulation in a set of one or more injection simulations, or used together to generate flow metadata, it should be understood that alternative approaches may involve using two injection simulations in place of the combination of a baseline simulation and a given injection simulation.

[0021] Although for the sake of completeness, multiple example strategies for detecting violations that may indicate security issues within a given hardware design (e.g., mixed data streams, double reads of a given data stream, and invalid data streams) are described herein, it should be understood that the security issue detection methods described herein are not limited to these specific examples. Instead, the expression of the strategies described herein is flexible and can be easily extended to detect violations indicating various other security issues given the expertise of a given hardware design and / or associated potential security issues.

[0022] In the following description, numerous specific details are set forth in order to provide a thorough understanding of example embodiments. However, it will be apparent to one skilled in the art that the embodiments described herein may be practiced without some of these specific details. the term

[0023] The terms "connected" or "coupled" and related terms are used in an operational sense and are not necessarily limited to direct connections or couplings. Thus, for example, two devices may be coupled directly, or via one or more intermediate media or devices. As another example, devices may be coupled in such a way that information may be transferred between them while not sharing any physical connection with each other. Based on the disclosure provided herein, one of ordinary skill in the art will appreciate the various ways in which there are connections or couplings according to the foregoing definitions.

[0024] If the specification states a component or feature "may," "might," "could," or "can" be included or have a property, that particular component or feature is not required to be included or have the property.

[0025] As used in the description herein and throughout the claims that follow, the meanings of "a," "an," and "the" include plural references unless the context clearly dictates otherwise. Additionally, as used in the description herein, the meaning of "in" includes "in" and "on," unless the context clearly dictates otherwise.

[0026] As used herein, "simulator" generally refers to an HDL simulator that simulates expressions written in an HDL (e.g., Very High Speed ​​Integrated Circuit (VHSIC) Hardware Description Language (VHDL), Verilog, or System Verilog). Non-limiting examples of simulators include: Verilog Compiler and Simulator (VCS) available from Synopsis, Inc. of Mountain View, California, Incisive Enterprise Simulator available from Cadence Design Systems, Inc. of San Jose, California, ModelSim and Questa Sim available from Siemens EDA (formerly Mentor Graphics) of Wilsonville, Oregon, and Verilator available from Veripool.

[0027] As used herein, a "taint source" generally refers to the beginning of a data flow within a hardware design that is desired to be traced. Non-limiting examples of taint sources include specific signals, registers, or buffers within the hardware design.

[0028] A "start event" generally refers to a moment in a hardware design simulation or a period during a simulation. A start event can be expressed as a logical condition or expression on the simulation.

[0029] As used herein, a "dataflow specification" generally refers to an RTL dataflow tracking primitive that specifies a particular dataflow of interest in at least a start event (e.g., the starttime field of the dataflow specification) and a pollution source (e.g., specified by the track field of the dataflow specification). The dataflow specification may use JavaScript Object Notation (JSON) syntax, etc. In various examples described herein, the dataflow specification may include multiple additional fields, including one or more of the following: a flow identifier (ID) (e.g., flowid); an end event (e.g., endtime); any pre-processing logic (e.g., logic_pre), in the form of Turing-complete code, to be run before the start event is evaluated; any post-processing logic (e.g., logic_post), in the form of Turing-complete code, to be run after each step of the simulation; and initialization logic (e.g., logic_init) to be evaluated per dataflow specification, for example, to initialize objects in a logic namespace.

[0030] As used herein, "data flow" generally refers to the propagation of (processed) data through a hardware design originating from a tainted source. To illustrate, B is part of a data flow whenever: A is part of a data stream; and The value of B is affected by the value of A.

[0031] As used herein, "simulation results" or "simulation trace log" generally refers to information indicating the state of a simulation over a period of time. Non-limiting examples of simulation trace logs include fast signal database (FSDB) files or value change dump (VCD) files, which contain the complete state of the simulation at each simulation moment in the simulation time. FSDB is a binary file format representing the simulation output produced by VCS, while VCD is a file format representing simulation output commonly found in open source simulators. Those skilled in the art will appreciate that there are several other file formats in which simulation output is stored; therefore, references herein to simulation trace logs or simulation results should not be limited to any particular file format.

[0032] As used herein, a "user-facing signal" or "user-facing sink" generally refers to a signal at the interface of a particular component in a hardware design that holds values ​​that ultimately reside in other components of the hardware design. As a non-limiting example, a signal that holds a value that leaves an I / O unit and is placed in a last-level cache (LLC) may represent a user-facing signal. Some of these user-facing sinks may be particularly interesting because they may be observed by an attacker, or interact with less trusted components in the hardware design, or because they may have the potential to leak stale data. As a result, such signals may be good targets for applying the data flow strategies described herein for the purpose of detecting potential security issues.

[0033] As used herein, "mixed data flow" generally refers to a situation where two or more data flows exist simultaneously in the same intermediate register, when such a register is designed to hold data from a single request corresponding to a single data flow. According to one embodiment, once the data flow is known, the data flow can be tested by parsing and analyzing the simulation results in a step-by-step manner, and at each step, determining which data flow flowids have been recorded in the target register at that moment. If there is more than one flowid, we have detected mixed data flow. Depending on the design, this may be harmless, a warning, or an error.

[0034] As used herein, "double read" generally refers to a situation where a particular data stream is replicated more than once, for example, to a user-facing sink or other signal as a policy target (which may also be referred to herein as a data stream policy). Depending on the hardware design involved, a double read of a data stream may indicate a stale data error.

[0035] As used herein, "invalid data flow" generally refers to a situation where no data flow is expected other than the source signal from which the data flow originates, but data flow is observed in a signal other than the source signal.

[0036] As used herein, a "stale data condition" or "stale data error" generally refers to a situation where a double read or invalid data flow occurs within a hardware design. Mixed data flow can also be the result of a stale data error.

[0037] As used herein, the terms "module," "component," "platform," "tool," "environment," "system," "manager," and the like are intended to refer to a computer-related entity: software executing a general-purpose processor, hardware, firmware, or a combination thereof. For example, a module or component may be, but is not limited to, a process, an executable file, an execution thread, a program, and / or a computer running on a computing resource. Overview

[0038] According to various embodiments, a user may provide a list of taint sources along with a simulation environment (e.g., a simulator) and a simulator command line. The simulator command line may be called multiple times, resulting in a baseline simulation of the hardware design under test during which no intervention occurs and an injection simulation of the hardware design under test for each taint source (data flow) during which a simulation tool driving the simulation environment changes the value of the taint source during a specified period of time within the simulation time. By comparing or otherwise parsing and analyzing the output of the simulation run (referred to herein as simulation results or simulation trace logs), the data flows associated with each taint source can be derived, and policies can be applied to the data flows to detect potential security violations (e.g., based on flow metadata associated with the data flows).

[0039] In various examples described herein, there are three general stages performed by the proposed method for identifying security issues within hardware designs, including (i) performing multiple RTL simulations, (ii) generating flow metadata, and (iii) applying policies to the flow metadata to detect potential security issues. In one embodiment, the first stage (performing multiple RTL simulations) includes performing a baseline simulation and persisting simulation data (e.g., simulation results or simulation trace logs in the form of FSDB files or similar outputs) that record the signal values ​​of each of the contamination sources during each start period of the corresponding data flow. The baseline simulation represents a simulation of the hardware design during which no changes are made to any of the contamination sources, thereby providing a baseline that can be compared with one or more subsequent injection simulations (in which each contamination source is changed). In one embodiment, for each contamination source, a single corresponding injection simulation is performed after completing the baseline simulation. During a given injection simulation, the simulator is interrupted at a selected start period of the data flow, and one or more values ​​(as appropriate) are injected (e.g., written or forced as appropriate) into the contamination source signal. Specifically, the injected value(s) may represent the negated value(s) that the tainted source maintained during a selected start period of the data stream as captured by the baseline simulation trace log. The injection simulations may be run in parallel because they are independent of each other and both record their respective simulation data (e.g., by generating an FSDB file or similar output).

[0040] As an alternative to performing one baseline simulation and one injection simulation for each taint source during the first phase, the baseline simulation can be skipped and two injection simulations can be run for a given taint source. In this alternative scenario, a zero value (or a different value) can be injected in one simulation (which can then be treated as a baseline simulation), and the negation of the zero value (or different value) can be injected in the other simulation. If there is only one taint source (i.e., it is desired to follow only one data flow), this option is more time efficient because the two injection simulations can be performed in parallel without waiting for the baseline simulation to complete.

[0041] Turning now to the second stage (generating flow metadata), the results of the RTL simulation can be parsed and analyzed for each of a plurality of signals in the hardware design to generate an indication of whether the signal or a portion thereof (e.g., a set of one or more bits of the signal) is part of a data flow at one or more instances of simulation time. The second stage can include comparing the results of the RTL simulation, wherein a baseline simulation trace log is compared to each injected simulation trace log. That is, the number of comparisons performed is equal to the number of defined contamination sources. The difference between the baseline simulation and the injected simulation must represent data flow from the corresponding contamination source because this is the only signal in the hardware design whose value has been actively changed (injected). The comparison can be run in parallel. Existing tools (e.g., nCompare, available from Synopsis, Inc. of Mountain View, California) can be used to perform the comparison.

[0042] During the third phase (applying policies to flow metadata to detect potential security issues), policy violations may be detected, which may indicate security issues in the hardware design. For example, policies specified by the user (e.g., in the form of policy check code expressed in terms of conditions or expressions) involving flow metadata that indicate a violation when evaluated to true, design-specific variables (e.g., signals in the hardware design), and / or simulation-specific variables (e.g., simulation time), etc. In one embodiment, a flexible policy specification method is proposed that allows users with expert knowledge of the hardware design in question to define Turing-complete code in a python-like syntax to identify any undesired data flows within the hardware design.

[0043] Reference below Figure 1 A non-limiting example of an operating environment is described that includes a functional unit that can perform the three general phases of the proposed method for identifying security issues within a hardware design. Example operating environment

[0044] Figure 1 1 is a block diagram illustrating an operating environment 100 that supports detecting potential security issues in hardware designs according to some embodiments. According to one embodiment, the proposed method for identifying security issues within a hardware (H / W) design (e.g., H / W design 101) involves detecting data flows without modifying the HDL design in which the hardware design is represented. Therefore, the implementation and maintenance burden is very low.

[0045] As further described below, the proposed method does not rely on HDL instrumentation, but instead receives an external input (e.g., a configuration file 102) containing information about multiple pollution sources, where each pollution source represents its own data flow start point and each pollution source is specified as part of the data flow specification, including a start time (e.g., representing a start event), etc., which can be expressed by any logical condition, any logical condition involving signal comparison, single-bit signal value and / or signal conversion, etc. A given pollution source can be identified by a set of one or more bits in the signal and a specified period or moment in simulation time (start time). As a non-limiting example, the start event can be defined by a signal value change (e.g., the period between the rising edge and the falling edge of the specified signal). Other examples of start events are further described below. A given pollution source is actively polluted at a specified period or moment within an associated RTL simulation (e.g., simulation 131).

[0046] In one embodiment, basic RTL simulation can be run, during which the signal value of the pollution source is recorded, and the expression representing the start event of the corresponding data flow is true. After basic RTL simulation, injection RTL simulation can be run for each pollution source, wherein the value of the pollution source is changed. Then, the simulation data recorded for each injection RTL simulation (e.g., injection simulation tracking log 141a-141b) can be compared with the simulation data recorded for basic RTL simulation (e.g., basic simulation tracking log 142). Then basic RTL simulation and each injection RTL simulation can be compared to reveal the data flow of the pollution source changed in the corresponding injection RTL simulation. As will be understood by those skilled in the art, the difference between basic RTL simulation and given injection RTL simulation indicates the data flow (e.g., one of data flow 161a-161b) from the corresponding pollution source, because this is the only signal whose value (via injection) is actively changed in the hardware design, and the simulation is assumed to be deterministic.

[0047] As shown in the various examples described below, due to the user-defined stream ID and / or the automatic generation of corresponding unique stream IDs, each data stream can be completely distinguished from other data streams, even if they overlap or have the same data in them. By timely identifying such data streams, an external input (e.g., policy file 103) containing information about a set of one or more policies can be applied to the data stream (or more specifically, stream metadata associated therewith) to identify the presence of such security issues, wherein the one or more policies specify conditions that may indicate security issues in the hardware design. Non-limiting examples of security issues that can be identified include stale data vulnerabilities (indicated by mixed data streams or double reads of data streams), invalid data streams, and other similar microarchitectural information leaks. Given the flexibility of specifying policies as described and illustrated below, which have expertise in a specific hardware design, associated potential security issues that may arise in the context of a specific hardware design, and / or potential security issues that represent issues of concern in the context of a specific hardware design, it should be understood that various other potential security issues can be identified based on policies that are specified based on such expertise.

[0048] The illustrated operating environment includes a simulation tool 110 that receives external inputs, including a command line 111, a hardware (H / W) design 101, a configuration file 102, and a strategy file 103. Figure 4-Figure 6 Non-limiting examples of configuration files 102 and policy files 103 are further described. Operating environment 100 further includes a simulator 130 (e.g., a VCS or other simulator) that can be driven through an application programming interface (API) 112. In the context of this example, simulation tool 110 is responsible for deciding which simulations of H / W design 101 are to be run by simulator 130 and managing how simulator 130 runs such simulations.

[0049] The simulation tool 110 includes a simulation driver module 115, a namespace 120, and a security violation detection module 125. The simulation driver module 115 may be responsible for driving the simulator 130 to perform the first phase described in the overview section above (e.g., performing multiple RTL simulations). According to one embodiment, the simulation driver module 115 drives the simulator 130 via an API 112 (e.g., a Verilog Procedural Interface (VPI) etc.) based on, for example, a data flow specification contained in a configuration file 102. For example, the simulation driver 115 may cause the simulator 130 to perform various simulations (e.g., simulation 131), including, for example, a baseline RTL simulation and / or one or more injection RTL simulations, thereby resulting in the output of various corresponding trace logs (e.g., injection simulation trace logs 141a-141b and / or a basic simulation trace log 142).

[0050] In the context of this example, namespace 120 includes sim namespace 121, DUT namespace 122, logic namespace 123, and flow namespace 124. Sim namespace 121 may include simulation-specific variables and may be prefixed with "sim." when included within various codes (e.g., logic expressions) and / or conditions. Non-limiting examples of simulation-specific variables include: sim.time: represents the number of simulation time steps or ticks since the start of the associated simulation. sim.flowduration: Indicates the number of simulation time steps or ticks since the start of a given data flow. sim.flowstarttime: indicates the value of sim.time when a given data flow starts. sim.flownumber: Indicates the number of times a given dataflow specification caused a dataflow to start during the associated simulation.

[0051] The DUT namespace 122 may include design-specific variables (eg, signal values) and may be prefixed with "dut.".

[0052] As further described below, objects or variables in the logical namespace 123 can be used by logic code contained within a dataflow specification (e.g., contained within a logic_pre field, a logic_post field, and / or a logic_init field), for example, to monitor and persist historical state information. Variables in a logical namespace can be prefixed with "logic." and can also be accessed through the start time and / or end time fields of a dataflow specification.

[0053] As described and illustrated in the various examples below, code and / or conditions expressed within a given dataflow specification (e.g., within a starttime field, an endtime field, a logic_init field, a logic_pre field, and / or a logic_post field) may reference simulation-specific variables or design-specific variables.

[0054] The flow namespace 124 may include flow metadata associated with each of a plurality of signals in the hardware design or a portion thereof (e.g., a set of one or more bits of a signal) at one or more instances of simulation time. According to one embodiment, the flow metadata may be generated by processing of an injection simulation trace log (e.g., injection simulation trace logs 141a-141b) by the security violation detection module 125. In addition to other metrics and / or variables, the flow metadata may also include a set of one or more flowids of corresponding data flows present in the signal or a portion thereof at a given instance of simulation time.

[0055] The operating environment 100 further includes a comparison tool 150 and a visualization tool 170. The comparison tool 150 may be responsible for performing the second phase (e.g., comparing the results of the RTL simulation), as described in the overview section above. According to one embodiment, the comparison tool 150 (e.g., nCompare or other similar comparison tools available from Synopsis, Inc. of Mountain View, California) may be operable to simultaneously receive two simulation trace logs (e.g., the base simulation trace log 142 and one of the injection simulation trace logs 141a or 141b) and output the difference between the two input simulation trace logs. As described above, the difference between the two input simulation trace logs indicates a data flow (e.g., data flow 161a or data flow 161b) from a corresponding contamination source. In one embodiment, the visualization tool 170 (e.g., the Verdi automatic debugging system or a similar visual debugging system available from Synopsis, Inc. of Mountain View, California) may be used to present a visual depiction of the data flows 161a-161b, wherein each data flow is represented by a particular color. For example, assuming that data flows from two contamination sources are being tracked, data associated with one data flow may be presented in red, and data associated with the other data flow may be presented in blue within the visualization tool 170. In this manner, the presence of mixed data flows may be identified by observing the color purple (a mix of red and blue), whereas a strict separation of the colors would indicate the absence of mixed data flows.

[0056] Returning to the simulation tool 110, the security violation detection module 125 can be responsible for performing the third stage (e.g., applying policies to the flow metadata to detect potential security issues), as described in the overview section above. According to one embodiment, the security violation detection module 125 processes or causes the recorded injection simulation data (e.g., the injection simulation trace logs 141a-141b) to be processed (e.g., by the comparison tool 150) and assembles them into a single logic simulation with the same signal values ​​as the basic simulation trace log 142. The processing of the recorded injection simulation data includes parsing and analyzing the recorded simulation data to allow the generation of flow metadata associated with each bit in each signal at each instance of the simulation. For example, the flow metadata can indicate whether a particular bit is part of any data stream, and if so, which data streams it is part of. Using this information, powerful policies can be formulated, and user-defined error or warning messages can be logged to, for example, a potential security violation file 104, as further described below.

[0057] In the context of this example, simulation tool 110, command line 111, API 112, simulator 130, comparison tool 150, visualization tool 170, and the following references Figure 2 The described processes may be implemented in the form of executable instructions stored on a machine-readable medium and executed by a processing resource (e.g., a microcontroller, a microprocessor, (one or more) central processing unit cores, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), etc.) and / or in the form of other types of electronic circuit systems. For example, the processes may be performed by one or more virtual or physical computer systems (e.g., servers, workstations, personal computers, laptops, etc.) in various forms, such as those described below with reference to Fig.10 The computer system described performs Example detection of potential security issues using IFT

[0058] Figure 2 is a flow chart illustrating operations for performing detection of potential security issues using information flow tracking (IFT) according to some embodiments. Figure 2 The described processes may be performed by a simulation tool (eg, simulation tool 110 ).

[0059] At block 210, a data flow specification is received that indicates the data flow of contamination sources within a hardware design to be evaluated. The data flow specification may be created by or on behalf of a user of a simulation tool and contained in a configuration file (e.g., configuration file 102). A hardware design (e.g., hardware design 101) represents a digital design that is desired to be evaluated for the presence of various safety issues. The hardware design may be expressed in an HDL for modeling an electronic system (e.g., a CPU core and / or other digital circuits). Figure 4 and Figure 5 Examples of data flow specifications and the various fields that may be used to define a data flow specification are further described.

[0060] At block 220, a first simulation trace log for a first RTL simulation of the hardware design is obtained. For example, the simulation tool may cause a simulator (e.g., simulator 130) to run a baseline simulation of the hardware design, during which no intervention occurs and generate a simulation trace log (e.g., basic simulation trace log 142) therefor.

[0061] At box 230, obtain a second simulation trace log for the second RTL simulation of the hardware design. The simulation tool can cause the simulator to run an injection simulation of the hardware design, during which the simulation tool changes the value of the contaminant source at the moment of the simulation time when the start event is evaluated to be true or during the period. For example, during the execution of the injection simulation, the simulation tool can monitor the simulation time and interrupt the simulator at the selected start period of the data flow, and inject one or more values ​​(e.g., write or force as appropriate) into the contaminant source signal as appropriate. In one embodiment, the (one or more) injected values ​​can represent the (one or more) negative values ​​previously captured in the baseline simulation trace log and maintained by the contaminant source during the selected start period of the data flow. As part of the execution of the injection simulation, the simulator should also generate a simulation trace log (e.g., one of the injection simulation trace logs 141a or 141b).

[0062] At block 240, flow metadata is generated for each signal in a set of one or more signals in the hardware design (e.g., a subset of signals in the hardware design or all signals in the hardware design). The flow metadata may be persisted to a flow namespace (e.g., flow namespace 124), which is then utilized during the evaluation of a set of one or more user-defined data flow policies (e.g., data flow policies contained in a policy file (e.g., policy file 103)). According to one embodiment, after all injection simulations have been completed and the individual injection simulation results (e.g., injection simulation trace logs 141a-141b) have been recorded, a security violation detection module (e.g., security violation detection module 125) may assemble the injection simulation results into a single logic simulation. The logic simulation may have the same signal values ​​as the basic simulation results (e.g., basic simulation trace log 142), but each signal or portion thereof (e.g., a set of one or more bits of a signal) at each instance has flow metadata associated therewith, e.g., the flow metadata indicates whether it is part of any data flow, and if so, which data flows are identified by their respective flowids. For example, a single logic simulation may be parsed and analyzed in a step-by-step manner, and at each step, metrics may be generated regarding which data flow flowids are recorded at that moment in time in a given target register. Non-limiting examples of flow metadata include: Flow.set.signalname[]: The set of flowids present in any bits of signalname[] (or a subset of these bits when used like signalname[63:0]). Flow.seeded(flowid): The total number of bits seeded in the data flow corresponding to flowid up to this point in the simulation. The total represents the cumulative number of bits modified in the injection simulation for flowid up to this point in the simulation. Flow.size(flowid): The total number of bits found (including seeding) in the data flow corresponding to flowid up to this point in the simulation. Flow.signals(flowid): The total number of unique signals for which there are data flows corresponding to flowid.

[0063] Based on the flow metadata generated at box 240 alone and / or in combination with information maintained in one or more other namespaces (e.g., sim namespace 121, DUT namespace 122 and / or logical namespace 123), some powerful strategies can be developed to detect the presence of potential security issues in hardware designs.

[0064] At block 250, potential security issues in the hardware design may be detected by applying policies to the flow metadata. For example, the security violation detection module may evaluate a logical condition or expression associated with the policy that, when true, indicates the presence of a potential security issue in the hardware design. Non-limiting examples of data flow policy violations that may indicate potential security issues in the hardware design include a mixed data flow policy that detects the presence of mixed data flows, a dual read policy that detects the presence of dual reads of data flows, and an invalid data flow policy that detects the presence of data flows where there should not be data flows. Figure 6 Examples of each of the foregoing data flow strategies are further described below. Figures 7A-9B Example timing diagrams showing data flows in which the aforementioned data flow policies are not violated and are violated are described.

[0065] Although in the context of this example, only one data flow specification is described for brevity, it should be understood that multiple data flow specifications may be processed. For each additional data flow specification, the simulation tool may cause the simulator to run another injection simulation. Example Data Flow

[0066] Figure 3 Two timing diagrams are shown for illustrating the concept of data flow 311 of reference base simulation 300 and injection simulation 350 according to some embodiments. In the context of this example, io.DataBit signal 310 is copied with a small delay into io.DataBitCopy signal 320. In this example, it is assumed that the data flow associated with io.DataBit 310 (the source of pollution) is to be tracked, for example, based on the following data flow specification: {"starttime":"sim.time==3500","track":"io.DataBit"}

[0067] In the above data flow specification, as long as the condition (start event) "sim.time == 3500" is true, the single bit data flow present in signal io.DataBit 310 should be followed in the remainder of the simulation. In other words, at time = 3500 ticks, the flow will begin.

[0068] According to one embodiment, the flow can be found by first running an unmodified simulation (e.g., base or baseline simulation 300), and saving a complete trace representing the simulation results (e.g., base simulation trace log 142). Then, a second simulation (injection simulation 350) is run, and during the second simulation at simulation time == 3500 ticks, the bit-by-bit inverse value in the current io.DataBit 310 is written back to io.DataBit 310. In this example, since io.DataBit was 1 at time == 3500, a 0 is written to io.DataBit 310. Then, injection simulation 350 continues undisturbed. Such simulation 350 also saves a complete trace representing the simulation results (e.g., such as simulation trace log 141a or 141b).

[0069] In this example, it can be seen that, due to the use of writes to inject data, io.DataBit 310 changes from 1 to 0 at t=3500 in injection simulation 350. This starts the data flow. Once the original transition of io.DataBit 310 to 0 occurs at t=3600 in base simulation 300, the value of io.DataBit 310 in injection simulation 350 remains at 0 and the signal resumes its normal behavior. Similarly, io.DataBitCopy 320 mirrors its new behavior with a slight delay (itself not receiving any injection). The horizontal dashed lines in io.DataBit 310 and io.DataBitCopy 320 in injection simulation 350 represent the difference seen by each signal relative to base simulation 300, and accurately represent the data flow of the 1 bit in io.DataBit 310 at t=3500. That is, the 1 bit remains in io.DataBit 310 until time == 3600, and then flows to io.DataBitCopy 320 with a slight delay. The data stream disappears first from io.DataBit 310 and then from io.DataBitCopy 320 with the same delay. Example Data Flow Specification

[0070] Figure 4 4 is a block diagram illustrating an example of data flow specifications 410a-410c that may be included in a configuration file 400 (which may be similar to configuration file 102) according to some embodiments. For example, a given data flow specification included in configuration file 400 or another data source may be represented as a plurality of fields (e.g., using JSON syntax) to specify a data flow. In one embodiment, a given data flow specification includes at least the following fields: Starttime: A time or period in the simulation (represented by a condition on the simulation), which may also be referred to herein as a "start event". Track: Data (or taint) whose flow will pass through the hardware design (e.g., Hardware Design 101) To be followed or tracked.

[0071] Reference above Figure 3 An example data flow specification 410a is described, and represents a static condition that is not dependent on any hardware design signal value. Data flow specifications 410b-410c illustrate non-limiting examples of dynamic conditions that can be expressed within the starttime field. For example, the starttime field of data flow specification 410b indicates that on each rising edge of the single-bit signal "dut.io.DataEn", a new data flow should be initiated in the "io.Data[]" signal. io.Data[] is a multi-bit signal whose width is implicit in the data flow specification (but given by the hardware design).

[0072] The above condition with reference to data flow specification 410b specifies a single time instant as starttime. During the corresponding injection simulation, this condition will result in a single write to the io.Data[] signal at each rising edge of the "dut.io.DataEn" signal.

[0073] Turning now to data flow specification 410c, it is shown that a given data flow specification can also specify time periods rather than moments. Data flow specification 410c indicates that as long as dut.io.DataH is high, the data flowing out of io.Data[] will be followed and treated as a single data stream. In this case, the condition represented by the starttime field does not represent a single starttime, but may represent a time range when the condition is evaluated to be true. During the corresponding injection simulation, as long as the condition is true (in this case, when dut.io.DataH is high), the corresponding data is forced to its bit-by-bit inverse value. Whenever the original data changes, the forced inverse value changes to the new inverse.

[0074] Although only the starttime and track fields are defined in the three example data flow specifications 410a-410c, it should be understood that one or more additional fields may be utilized to represent a given data flow specification. In one embodiment, the following additional fields may be optionally included as part of a given data flow specification: Flowid: An identifier (ID) that can be used to distinguish multiple data flows. Different IDs can be specified, or flowids can be merged, for example, by specifying the same ID for multiple conditions. According to one embodiment, if no ID is specified, each data flow triggered by the starttime condition will be assigned a unique automatically generated ID. Endtime: Specifies an artificial limit on the data flow. This field may have the same format as the starttime field. The code or condition expressed in this field may access the "sim.flowstarttime" and "sim.flowduration" variables. According to one embodiment, if endtime is not specified, no limit is applied to the data flow. Logic_pre: Allows arbitrary Turing-complete code to be run before the "starttime" condition is evaluated at each simulation step, and all signals can be accessed at each step. Code contained in the logic_pre field can read signals within the DUT namespace 122 (e.g., variables in the "dut." namespace), and can read and write its own state in the logic namespace 123 (e.g., variables in the "logic." namespace), thereby allowing the calculation and persistence of history-aware conditions used in the starttime and / or endtime fields. Logic_post: Same as the logic_pre field, but executed after each step. Logic_init: Executed once for each data flow specification. Used to initialize objects in the logical namespace 123.

[0075] As a non-limiting example of how the logic code may be used, the logic code may perform protocol level analysis and allow starttime to access variables that are true only when a particular protocol state is active, which requires historical observation of the signal. As shown in the various examples described below, the starttime condition may then access data in the logic namespace 123 and trigger data flow using more complex conditions than are available at a particular moment in the associated simulation. While endtime is primarily an optimization, it should be noted that it may also affect violation detection. For example, after an endtime condition, any event should not be considered a violation because data flow would not be detected. Example expressions for specifying data flows

[0076] Figure 5 5 is a table 500 showing an example of logic conditions and expressions that may be used to specify data flows according to some embodiments. In the context of this example, various non-limiting examples of code, logic conditions, and / or expressions that may be included in a starttime field 510, a tracking field 520, a flowid field 530, and a logic field 540 (e.g., a logic_pre field) are described for purposes of illustration. For the sake of brevity, the optional endtime, logic_post, and logic_init fields have been omitted.

[0077] The data flow specification based on the fields on line 561 indicates that the data flow trace should start from the contents of the Core.IO.ResponseData[] signal (the width is implicit and specified in the hardware design) every time the Core.IO.ResponseValidEn signal changes from low to high (rising edge). Each rising edge of the dut.Core.IO.ResponseValidEn signal will generate a new flow (and a new injection simulation).

[0078] The data flow specification based on the fields of line 562 indicates that each time and as long as Core.IO.ResponseValidH is high, the data flow trace should start from the contents of the least significant 64 bits of Core.IO.ResponseData. Each cycle of the Core.IO.ResponseValidH signal will generate a new flow (and a new injection simulation).

[0079] The data flow specification based on the fields on line 563 indicates that data flow tracing should start from the contents of Core.IO.ResponseData[] every time and as long as dut.Core.IO.ResponseValidH is low. In this example, all data injection is done in a single injection simulation because all flows have the same flowid of 0. All merged data flows resulting from the injection are treated as a single data flow.

[0080] The dataflow specification based on the fields on line 564 is the same as line 562, but now at most 10 additional simulations will be run because every 10th dataflow will be merged together since they all get the same flowid.

[0081] Based on the dataflow specification indication in the field at line 565, dataflow tracing on Core.IO.ResponseData[] will begin, but only after reset has completed and before simulation time 1000, and only after more than 10 packets of type 23 have been seen and counted (as maintained by the logic box). Each rising edge of dut.Core.IO.ResponseValidEn then constitutes a new dataflow with a new unique flowid. Example Policy

[0082] Figure 6 610a-610c according to some embodiments may be included in the policy file 600 (which may be similar to the policy file 103). In various examples described herein, the fields that may be included in the policy include: Policy: A condition that is violated when it evaluates to true. "warning" or "error": One of these should be present. If "warning" is present, the policy violation throws a warning. If "error" is present, the policy violation throws an error. Logic_init: Code that is executed once before all evaluations (e.g., for initialization). Logic: Code that is executed before the strategy is evaluated. Logic_post: Code executed after the strategy is evaluated.

[0083] In one embodiment, the code in the logic fields (eg, logic_init, logic, and logic_post) may be expressed using a python-like syntax.

[0084] Turning now to example policies 610a-610c, example policy 610a represents an example of a hybrid data flow policy. In the context of this example, the flow metadata flow.set.Core.IO.ResponseData represents the set of all flowids whose data flows are present in any of the bits of the Core.IO.ResponseData signal. len(flow.set.Core.IO.ResponseData) represents the total number of unique flowids present in any of these bits.

[0085] This policy condition is conceptually evaluated on every tick of the simulation, based on post-processing of the simulation results. If the condition is true at any tick, it means that the set of flowids detected in the Core.IO.ResponseData signal is greater than 1, indicating that data from more than 1 data flow is present in the signal at the same time. This can indicate a stale data condition, as the complete register may be visible to the user at some point. Since this depends on the design and is not necessarily an error, this policy throws a "warning" instead of an "error".

[0086] Example policy 610b represents an example of a dual read policy. This policy is relevant to digital design and copies data from Core.IO.DataSource to the user-facing bus at each rising edge of dut.Core.IO.CopyToUser. The logic code maintains a collection of all data flows that have ever been copied here by adding the currently existing flow set (flow.set.Core.IO.DataSource) to the history set (logic.observed_flows) at each rising edge of Core.IO.CopyToUser. A policy violation occurs whenever (i) a dut.Core.IO.CopyToUser rising edge is seen; and (ii) the flowid currently existing in the source register contains the flowid of a data flow that has been delivered to the user in the past. This indicates a stale data condition and is marked as an error.

[0087] Example policy 610c represents an example of an invalid data flow policy. The corresponding data flow specification may be as follows: {"starttime":"low(dut.Core.IO.ResponseValidH)", "track":"Core.IO.ResponseData","flowid":"0"}

[0088] Based on the above data flow specification, whenever the valid signal (dut.Core.IO.ResponseValidH) is low, all data flows from Core.IO.ResponseData are merged into flowid 0. Whenever the data is copied from the data signal to another signal, a violation of the policy condition of policy 610c will occur. This condition represents a vulnerability, which may cause functional errors and, if the vulnerability can be exploited, may expose stale data to the user. Example timing diagram without mixed data flow policy violation

[0089] Fig. 7A 7 is a timing diagram 700 showing an example of two data flows that do not violate the mixed data flow policy according to some embodiments. Figure 7A-7BIn the example shown, the mixed data flow strategy attempts to avoid the condition in the hardware design where a user-facing sink simultaneously holds data from more than one data flow. Assume for the purposes of this example that the tainted source (source response register) contains data from an I / O response, and a new data flow is started for each I / O response, such as in response to a rising edge of a source clock, which indicates when the data in the source register is valid (i.e., when fresh data from the I / O response arrives at the source register). If these I / O responses are mixed and sent together from one component to another, this may indicate the presence of a stale data vulnerability.

[0090] In this example, two data flows (the first data flow is shown in light grey and the second data flow is shown in black) follow two separate I / O responses from a source register (a pollutant) to a sink register (a user-facing sink from which data will leave for the core). As can be seen in this example, at any given time, each register contains either the first data flow or the second data flow, resulting in no violation of the mixed data flow policy. Example timing diagram with mixed data flow policy violation

[0091] Figure 7B 7 is a timing diagram 750 showing an example of two data flows violating the mixed data flow policy according to some embodiments. In this example, it can be seen that there is a mix of the first data flow and the second data flow in the intermediate register and subsequently in the sink register, as indicated by the dashed line, for example, this is due to data from the first I / O response (light gray) remaining in the intermediate register and the user-facing sink after the second I / O response (black) arrives, so this is a stale data issue. Example timing diagram without double read policy violation

[0092] Fig. 8A 8 is a timing diagram 800 illustrating an example of data flow that does not violate the double read strategy according to some embodiments. Figure 8A-B In the example shown, the double read policy attempts to avoid conditions where data leaves the user-facing sink in the hardware design more than once. For the purposes of this example, assume that the source of pollution (the source response register) contains data from an I / O response, and follows one such I / O response (shown in black). If an I / O response moves from one component to another more than once, there may be an indication of a stale data vulnerability. In this example, the double read policy is not violated because the data from the first I / O response (green) is moved from the user-facing sink to the register in the core only once. Example Timing Diagram with Dual Read Policy Violation

[0093] Figure 8B8 is a timing diagram 850 showing an example of data flow that violates a double read policy according to some embodiments. In this example, data is moved to the core a second time (as indicated by the dashed line), even though it is the same I / O response. With the second data movement representing a double read policy violation, the core is provided with stale data. Example timing diagram without invalid data flow policy violation

[0094] Fig. 9A 9 is a timing diagram 900 illustrating an example of data flow that does not violate an invalid data flow policy according to some embodiments. Figure 9A-9B In the example shown, the invalid data flow policy attempts to avoid conditions where data flow exists within the hardware design when data flow should not exist. Assume for the purposes of this example that the hardware design contains a register (taint source) and a corresponding valid bit that indicates whether the data in the register is valid. When the valid bit is low, data flow can begin, and the data flow expectation is still subject to the constraints of the taint source. That is, when the valid bit is low, no data should leave the register.

[0095] In this example, the hardware design behaves as expected. When the corresponding valid bit of the register is low, the register is polluted, and no data flow is observed outside the register. That is, there is no propagation of any of the data from the register through the hardware design. Example timing diagram with invalid data flow policy violation

[0096] Fig. 9B 9 is a timing diagram 950 showing an example of data flow that violates an invalid data flow policy according to some embodiments. In this example, there is data flow through the hardware design (represented by the black line in the middle register), showing that when the valid bit of the register is low, the data leaves the register. This may indicate the presence of a security vulnerability. Alternative Embodiments

[0097] Alternative approaches include keying the data, performing more than one injection simulation for a given data flow specification, and using two injection simulations instead of a baseline simulation and an injection simulation.

[0098] In the above injection simulation, the bit-by-bit inverse of the data present in the associated pollutant is injected each time, to allow the journey of each bit to be tracked individually if necessary (i.e., a subset of the data being copied from the pollutant will also show a visible data flow). While this means the performance of N simulations of N data flows, it has the benefit of guaranteeing no false positives, and perfect data flow separation.

[0099] Regarding keying data, if the user is willing to take the risk of false positives or imperfect data stream separation, or knows that such a risk does not exist in the relevant hardware design, the user can choose to inject specific data into the pollutant source signal and use the specific data to distinguish the data stream each time a difference is observed between the baseline and the injection simulation. For example, it may be desirable to use a baseline simulation to follow two data streams. Instead of injecting a bit-by-bit inversion and running the injection simulation for each data stream as described above, a predetermined data pattern can be injected for each pollutant source as part of a single injection simulation. For example, 3 bytes "0x10 0x10 0x10" can be injected into one pollutant source, and "0x20 0x20 0x20" can be injected into another pollutant source, where the two injections are combined into one simulation. Then, whenever any simulation trace difference is observed between the baseline simulation and the injection simulation, the data stream can be distinguished by looking at the data value, and whenever a "0x10" byte is observed, it is assumed to be associated with the first data stream, and whenever a "0x20" byte is observed, it is assumed to be associated with the second data stream. In some hardware designs this may be a safe optimization, allowing less emulation to be performed.

[0100] Turning now to an alternative approach involving performing multiple injection simulations for a given data flow specification, it should be noted that the described approach will always be correct in reporting data flow. That is, there are no false positives when using the proposed approach; however, it is possible to miss reporting data flow. For example, if data parity is calculated, but the data and its inverse have the same parity, then the parity bit will not be reported as a flow, even though it is a function of the data. This is acceptable for the intended use, but there may be some cases where the operator would like to see a more complete picture. In this case, more than one injection simulation can be performed for a given data flow specification and combined. In the case of parity, running a second injection simulation with a one-bit difference will help. In other cases, data with all possible 1-bit flips may give more interesting information.

[0101] In addition to performing one baseline simulation and one injection simulation, another alternative would be to utilize two injection simulations that allow for parallel operation. This alternative does presuppose that the injection time (for which the baseline simulation is used) is known. If the time is known in advance, this alternative has the advantage of running two injection simulations in parallel; however, the disadvantage is that 2N injection simulations need to be performed for N data streams, rather than 1+N. Example Computer System

[0102] Fig.101000 is an example of a computer system 1000 that some embodiments may utilize. It is noteworthy that the components of the computer system 1000 described herein are intended only to illustrate various possibilities. The example computer system 1000 should in no way limit the scope of the present disclosure. In the context of this example, the computer system 1000 includes a bus 1002 or other communication mechanism for communicating information, and processing resources (e.g., one or more hardware processors 1004) coupled to the bus 1002 for processing information. The processing resources can be, for example, one or more general-purpose microprocessors or system on a chip (SoC) integrated circuits.

[0103] The computer system 1000 also includes a main memory 1006 (such as a random-access memory (RAM) or other dynamic storage device) coupled to the bus 1002 for storing information and instructions to be executed by the processor 1004. The main memory 1006 may also be used to store temporary variables or other intermediate information during the execution of instructions to be executed by the processor 1004. Such instructions, when stored in a non-transitory storage medium accessible to the processor 1004, present the computer system 1000 as a special-purpose machine customized to perform the operations specified in the instructions.

[0104] The computer system 1000 also includes a read only memory (ROM) 1002 or other static storage device coupled to the bus 1008 for storing static information and instructions for the processor 1004. A storage device 1010 (e.g., a magnetic disk, an optical disk, or a flash drive (made of flash memory chips)) is provided and coupled to the bus 1002 for storing information and instructions.

[0105] The computer system 1000 may be coupled to a display 1012 via the bus 1002 for displaying information to a computer user, such as a cathode ray tube (CRT), a liquid crystal display (LCD), an organic light-emitting diode display (OLED), a digital light processing display (DLP), etc. An input device 1014 including alphanumeric and other keys is coupled to the bus 1002 for communicating information and command selections to the processor 1004. Another type of user input device is a cursor control 1016, such as a mouse, trackball, touch screen, touch pad, or cursor direction keys, for communicating directional information and command selections to the processor 1004 and controlling cursor movement on the display 1012. The input device typically has two degrees of freedom in two axes, a first axis (e.g., x) and a second axis (e.g., y), which allows the device to specify a position in a plane.

[0106] Removable storage medium 1040 may be any type of external storage medium, including but not limited to a hard disk drive, a floppy disk drive, Zip drives, Compact Disc–Read Only Memory (CD-ROM), Compact Disc–Re-Writable (CD-RW), Digital Video Disk–Read Only Memory (DVD-ROM), USB flash drives, etc.

[0107] The computer system 1000 may implement the techniques described herein using custom hardwired logic, one or more ASICs or FPGAs, firmware, or program logic that is combined with the computer system to make the computer system 1000 a special purpose machine or program the computer system 1000 to be a special purpose machine. According to one embodiment, the techniques herein are performed by the computer system 1000 in response to the processor 1004 executing one or more sequences of one or more instructions contained in the main memory 1006. Such instructions may be read into the main memory 1006 from another storage medium, such as the storage device 1010. Execution of the sequences of instructions contained in the main memory 1006 causes the processor 1004 to perform the process steps described herein. In alternative embodiments, hardwired circuitry may be used in place of or in combination with software instructions.

[0108] The term "storage medium" as used herein refers to any non-transitory medium that stores data or instructions that cause a machine to operate in a particular manner. Such storage media may include non-volatile media or volatile media. Non-volatile media include, for example, optical disks, magnetic disks, or flash drives, such as storage device 1010. Volatile media include dynamic memory, such as main memory 1006. Common forms of storage media include, for example, floppy disks, hard disks, solid-state drives, magnetic tapes or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical media with a pattern of holes, RAM, PROMs and EPROMs, FLASH-EPROMs, NVRAMs, any other memory chips or boxes.

[0109] Storage media are distinct from transmission media, but can be used in conjunction with transmission media. Transmission media participate in the transmission of information between storage media. For example, transmission media include coaxial cables, copper wires, and optical fibers, including the wires that make up bus 1002. Transmission media can also take the form of sound or light waves, such as those generated during radio wave and infrared data communications.

[0110] Various forms of media may be involved in carrying one or more sequences of one or more instructions to the processor 1004 for execution. For example, the instructions may initially be carried on a disk or solid-state drive of a remote computer. The remote computer can load the instructions into its dynamic memory and send the instructions over a telephone line using a modem. A modem local to the computer system 1000 can receive the data on the telephone line and use an infrared transmitter to convert the data to an infrared signal. An infrared detector can receive the data carried in the infrared signal, and appropriate circuitry can place the data on the bus 1002. The bus 1002 carries the data to the main memory 1006, from which the processor 1004 retrieves and executes the instructions. The instructions received by the main memory 1006 may optionally be stored on the storage device 1010 before or after execution by the processor 1004.

[0111] The computer system 1000 also includes an interface circuit system 1018 coupled to the bus 1002. The interface circuit system 1018 can be implemented by hardware according to any type of interface standard, such as an Ethernet interface, a universal serial bus (USB) interface, Interface 1018 may be a processor, processor, or processor that is coupled to a processor and / or processors in a manner that is communicatively coupled to one or more discrete accelerators (eg, one or more XPUs).

[0112] Interface 1018 can also provide two-way data communication coupled to network link 1020, and network link 1020 is connected to local network 1022.For example, interface 1018 can be an integrated services digital network (ISDN) card, a cable modem, a satellite modem or a modem for providing a data communication connection with a telephone line of a corresponding type.As another example, interface 1018 can be a local area network (LAN) card for providing a data communication connection to a compatible LAN.Wireless links can also be implemented.In any such implementation, interface 1018 can send and receive electrical, electromagnetic or optical signals carrying digital data streams representing various types of information.

[0113] The network link 1020 typically provides data communication to other data devices through one or more networks. For example, the network link 1020 may provide a connection to a host computer 1024 or to data equipment operated by an Internet Service Provider (ISP) 1026 through a local network 1022. The ISP 1026 in turn provides data communication services through the global packet data communication network now commonly referred to as the "Internet" 1028. Both the local network 1022 and the Internet 1028 use electrical, electromagnetic, or optical signals that carry digital data streams. The signals through the various networks and the signals on the network link 1020 and through the communication interface 1018 are example forms of transmission media that carry digital data to and from the computer system 1000.

[0114] Computer system 1000 can send messages and receive data, including program code, through the network(s), network link 1020, and communication interface 1018. In the Internet example, server 1030 may transmit code requested by an application program through Internet 1028, ISP 1026, local network 1022, and communication interface 1018. The received code may be executed by processor 1004 as it is received, or stored in storage device 1010 or other non-volatile storage for later execution.

[0115] Although many of the methods may be described herein in their basic form, it should be noted that processes may be added to or deleted from any of the methods, and information may be added to or subtracted from any of the described messages without departing from the basic scope of the current embodiments. It will be apparent to those skilled in the art that many further modifications and adaptations may be made. The specific embodiments are not provided to limit the concepts but to illustrate the concepts. The scope of the embodiments is not determined by the specific examples provided above, but only by the claims below.

[0116] It should be understood that in the above description of exemplary embodiments, for the purpose of making the present disclosure smooth and assisting in understanding one or more of the various novel aspects, various features are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure method should not be interpreted as reflecting an intention that the claimed embodiments require more features than those expressly recited in each claim. On the contrary, as reflected in the appended claims, novel aspects reside in fewer features than all the features of a single previously disclosed embodiment. Thus, the claims are hereby expressly incorporated into this specification, with each claim itself as a separate embodiment.

[0117] The following clauses and / or examples refer to further embodiments or examples. Details in the examples may be used anywhere in one or more embodiments. Various features of different embodiments or examples may be combined in various ways with some features included and other features excluded to suit a variety of different applications. Examples may include subject matter such as: a method; an apparatus for performing the actions of the method; at least one machine-readable medium including instructions that, when executed by a machine, cause the machine to perform the actions of the method; or an apparatus or system for facilitating hybrid communications according to the embodiments and examples described herein.

[0118] Some embodiments relate to Example 1, which includes a non-transitory machine-readable medium storing instructions, which, when executed by a processing resource of a computer system, causes the processing resource to: receive a data flow specification indicating a data flow of a contamination source within a hardware design to be evaluated; cause a simulator to perform a first simulation and a second simulation of the hardware design, and record a first simulation trace log and a second simulation trace log, wherein during the second simulation, the contamination source is changed based on the data flow specification; generate flow metadata for each of a plurality of signals in the hardware design, the flow metadata indicating whether the signal or a portion thereof is part of the data flow at one or more instances of simulation time based on the first simulation trace log and the second simulation trace log; and detect potential security issues within the hardware design by applying policies to the flow metadata.

[0119] Example 2 includes the subject matter of Example 1, wherein the data flow specification includes a start event that defines the start of the data flow in the form of a moment or period during the second simulation, and wherein the start event is expressed as: a simulation time of the second simulation; a comparison of the values ​​of a signal related to the hardware design; a value of 0 or 1; a transition of a value from 0 to 1 or from 1 to 0; or any logical condition of one or more of the above.

[0120] Example 3 includes the subject matter of Example 1 or 2, wherein the first simulation comprises a baseline simulation during which no change in the contamination source is performed.

[0121] Example 4 includes the subject matter of Example 3, wherein the second simulation comprises an injection simulation, and wherein the changing of the contamination source during the injection simulation comprises writing a bit-for-bit inverse of a value of the contamination source during the baseline simulation to the contamination source during the injection simulation or forcing the contamination source to be a bit-for-bit inverse during the injection simulation.

[0122] Example 5 includes the subject matter of any of Examples 1-4, wherein the first simulation comprises a first injection simulation, during which a value is written to the tainted source or the tainted source is forced to a value.

[0123] Example 6 includes the subject matter of Example 5, wherein the second simulation comprises a second injection simulation, during which the bitwise inverse of the value is written to the tainted source or the tainted source is forced to be the bitwise inverse of the value.

[0124] Some embodiments relate to Example 7, which includes a method for tracing data flow in a hardware design represented in a hardware description language (HDL) without instrumenting the HDL, the method comprising: receiving multiple data flow primitives specifying multiple contamination sources from which the data flow is to be traced within the hardware design; obtaining a baseline simulation trace log of a baseline register transfer level (RTL) simulation of the hardware design by causing a simulator to perform a baseline RTL simulation, during which none of the multiple contamination sources is changed; obtaining multiple injection simulation trace logs of multiple injection RTL simulations of the hardware design by causing the simulator to perform an injection RTL simulation for each of the multiple contamination sources, during which the contamination source is changed; generating flow metadata for each of a plurality of signals in the hardware design, the flow metadata indicating whether the signal or a portion thereof is part of any of the data flows at one or more instances of simulation time based on the multiple injection simulation trace logs; and detecting potential security issues within the hardware design by applying policies to the flow metadata.

[0125] Example 8 includes the subject matter of Example 7, wherein the potential security issue comprises mixed data flows, and wherein the policy specifies conditions in which multiple data flows exist in a given register of the hardware design at the same simulation time.

[0126] Example 9 includes the subject matter of Example 7, wherein the potential security issue comprises a stale data error, and wherein the policy specifies a condition in which one of the data streams is copied more than once to any adversarially observable register of the hardware design.

[0127] Example 10 includes the subject matter of Example 7, wherein the potential security issue comprises a stale data error, and wherein the policy specifies conditions in which data is propagated through the hardware design when data associated with a particular one of the data flows should not be propagated.

[0128] Some embodiments relate to Example 11, which includes a system comprising: a processing resource; and instructions, which, when executed by the processing resource, cause the processing resource to: receive a data flow specification, the data flow specification indicating a data flow of a contamination source within a hardware design to be evaluated; obtain a first simulation trace log of a first register transfer level (RTL) simulation of the hardware design by causing a simulator to perform a first RTL simulation; obtain a second simulation trace log of a second RTL simulation of the hardware design by causing the simulator to perform a second RTL simulation, during which the contamination source is changed based on the data flow specification; for each of a plurality of signals in the hardware design, generate flow metadata, the flow metadata indicating whether the signal or a portion thereof is part of the data flow at one or more instances of simulation time based on the first simulation trace log and the second simulation trace log; and detect potential security issues within the hardware design by applying policies to the flow metadata.

[0129] Example 12 includes the subject matter of Example 11, wherein the dataflow specification includes a start event, which defines the start of the dataflow in the form of a moment or time period during the second RTL simulation, and wherein the start event is expressed as: a simulation time of the second RTL simulation; a comparison of the value of a signal related to the hardware design; a value of 0 or 1; a transition of a value from 0 to 1 or from 1 to 0; or any logical condition of one or more of the above.

[0130] Example 13 includes the subject matter of Example 11 or 12, wherein the first RTL simulation comprises a baseline simulation during which the change of the contamination source is not performed.

[0131] Example 14 includes the subject matter of Example 13, wherein the second RTL simulation comprises an injection simulation, and wherein the changing of the contamination source during the injection simulation comprises writing a bit-for-bit inverse of a value of the contamination source during the baseline simulation to the contamination source during the injection simulation or forcing the contamination source to be a bit-for-bit inverse during the injection simulation.

[0132] Example 15 includes the subject matter of any of Examples 11-14, wherein the first RTL simulation includes a first injection simulation, during which zeros are written to the tainted source or the tainted source is forced to zero.

[0133] Example 16 includes the subject matter of Example 15, wherein the second RTL simulation comprises a second injection simulation, during which the bitwise inverse of 0 is written to the contamination source or the contamination source is forced to the bitwise inverse of 0.

[0134] Example 17 includes the subject matter of any of Examples 11-16, wherein the potential security issue includes mixed data flows, and wherein the policy specifies conditions where a data flow is present in a given register of the hardware design at the same simulation time as another data flow.

[0135] Example 18 includes the subject matter of any of Examples 11-16, wherein the potential security issue comprises a stale data error.

[0136] Example 19 includes the subject matter of Example 18, wherein the policy specifies conditions in which a data flow is copied more than once to a user-facing bus of the hardware design.

[0137] Example 20 includes the subject matter of Example 18, wherein the policy specifies conditions in which data is propagated through the hardware design when data associated with the data flow should not be propagated.

[0138] Some embodiments relate to Example 21, which includes an apparatus that implements or performs a method as in any of Examples 7-10.

[0139] Example 22 includes at least one machine-readable medium including a plurality of instructions that, when executed on a computing device, are used to implement or perform the method described in any of the preceding examples or implement the apparatus described in any of the preceding examples.

[0140] Example 23 includes an apparatus comprising means for performing a method as described in any of Examples 7-10.

[0141] The accompanying drawings and the foregoing description give examples of embodiments. It will be appreciated by those skilled in the art that one or more of the elements described may be well combined into a single functional element. Alternatively, certain elements may be split into multiple functional elements. Elements from one embodiment may be added to another embodiment. For example, the order of the processes described herein may be changed, and the order of the processes described herein is not limited to the manner described herein. Moreover, the actions of any flowchart do not have to be implemented in the order shown; nor do they necessarily need to perform all of these actions. In addition, those actions that are independent of other actions may also be performed in parallel with other actions. The scope of each embodiment is by no means limited by these specific examples. Numerous variants (whether or not explicitly given in the specification) are possible, such as differences in structure, scale, and use of materials. The scope of the embodiment is at least as broad as the scope given by the appended claims.

Claims

1. A non-transitory machine-readable medium storing instructions that, when executed by one or more processing resources of a computer system, cause the one or more processing resources to: receiving a data flow specification indicating a data flow of a contamination source within a hardware design to be evaluated; causing a simulator to perform a first simulation and a second simulation of the hardware design, and record a first simulation trace log and a second simulation trace log, wherein during the second simulation, the pollution source is changed based on the data flow specification; generating, for each of a plurality of signals in the hardware design, flow metadata indicating whether the signal or a portion thereof was part of the data flow at one or more instances of simulation time based on the first simulation trace log and the second simulation trace log; as well as Potential security issues within the hardware design are detected by applying policies to the stream metadata.

2. The non-transitory machine-readable medium of claim 1, It is characterized in that The data flow specification comprises a start event, which defines the start of the data flow in the form of a time or period during the second simulation, and wherein the start event is expressed as: a simulation time of the second simulation; comparison of values ​​of signals related to said hardware design; The value is 0 or 1; a transition of the value from 0 to 1 or from 1 to 0; or Any logical condition of one or more of the above.

3. The non-transitory machine-readable medium of claim 1 or 2, It is characterized in that The first simulation includes a baseline simulation during which no change in the pollution source is performed.

4. The non-transitory machine-readable medium of claim 3, It is characterized in that The second simulation comprises an injection simulation, and wherein the changing of the contamination source during the injection simulation comprises writing a bit-for-bit inverse of a value of the contamination source during the baseline simulation to the contamination source during the injection simulation or forcing the contamination source to be the bit-for-bit inverse during the injection simulation.

5. The non-transitory machine-readable medium of claim 1 or 2, It is characterized in that The first simulation comprises a first injection simulation during which a value is written to the contamination source or the contamination source is forced to the value.

6. The non-transitory machine-readable medium of claim 5, It is characterized in that The second simulation comprises a second injection simulation during which the bit-wise inverse of the value is written to the contamination source or the contamination source is forced to the bit-wise inverse of the value.

7. A method for tracing data flow in a hardware design represented in a hardware description language HDL without instrumenting the HDL, the method include: receiving a plurality of data flow primitives specifying a plurality of pollution sources from which data flows are to be traced within the hardware design; obtaining a baseline simulation trace log of the baseline RTL simulation of the hardware design by causing a simulator to perform a baseline register transfer level (RTL) simulation, during which none of the plurality of contamination sources are changed; obtaining a plurality of injection simulation trace logs of a plurality of injection RTL simulations of the hardware design by causing the simulator to perform an injection RTL simulation for each of the plurality of pollution sources, during which the pollution source is changed; generating, for each of a plurality of signals in the hardware design, flow metadata indicating whether the signal or a portion thereof was part of any of the data flows at one or more instances of simulation time based on the plurality of injection simulation trace logs; as well as Potential security issues within the hardware design are detected by applying policies to the stream metadata.

8. The method according to claim 7, It is characterized in that The potential security issue includes mixed data flows, and wherein the policy specifies a condition where multiple of the data flows exist in a given register of the hardware design at the same simulation time.

9. The method according to claim 7 or 8, It is characterized in that The potential security issue includes a stale data error, and wherein the policy specifies a condition in which one of the data streams is copied more than once to any adversarially observable register of the hardware design.

10. The method according to claim 7 or 8, It is characterized in that The potential security issue includes a stale data error, and wherein the policy specifies conditions in which data associated with a particular one of the data flows is propagated through the hardware design when the data should not be propagated.

11. A system, include: one or more processing resources; as well as instructions which, when executed by the one or more processing resources, cause the one or more processing resources to: receiving a data flow specification indicating a data flow of a contamination source within a hardware design to be evaluated; Obtaining a first simulation trace log of the first RTL simulation of the hardware design by causing a simulator to perform a first register transfer level RTL simulation; obtaining a second simulation trace log of the second RTL simulation of the hardware design by causing the simulator to perform a second RTL simulation, during which the pollution source is changed based on the data flow specification; generating, for each of a plurality of signals in the hardware design, flow metadata indicating whether the signal or a portion thereof was part of the data flow at one or more instances of simulation time based on the first simulation trace log and the second simulation trace log; as well as Potential security issues within the hardware design are detected by applying policies to the stream metadata.

12. The system according to claim 11, It is characterized in that The data flow specification comprises a start event, which defines the start of the data flow in the form of a time or period during the second RTL simulation, and wherein the start event is expressed as: A simulation time of the second RTL simulation; comparison of values ​​of signals related to said hardware design; The value is 0 or 1; a transition of the value from 0 to 1 or from 1 to 0; or Any logical condition of one or more of the above.

13. The system according to claim 11 or 12, It is characterized in that The first RTL simulation includes a baseline simulation during which the change of the contamination source is not performed.

14. The system of claim 13, It is characterized in that The second RTL simulation comprises an injection simulation, and wherein the changing of the contamination source during the injection simulation comprises writing a bit-for-bit inverse of a value of the contamination source during the baseline simulation to the contamination source during the injection simulation or forcing the contamination source to be the bit-for-bit inverse during the injection simulation.

15. The system according to claim 11 or 12, It is characterized in that The first RTL simulation includes a first injection simulation, during which 0 is written to the pollution source or the pollution source is forced to be 0.

16. The system of claim 15, It is characterized in that The second RTL simulation includes a second injection simulation during which a bitwise inverse of 0 is written to the contamination source or the contamination source is forced to be the bitwise inverse of 0.

17. The system according to claim 11 or 12, It is characterized in that The potential security issue includes mixing data flows, and wherein the policy specifies conditions in which the data flow exists in a given register of the hardware design at the same simulation time as another data flow.

18. The system according to claim 11 or 12, It is characterized in that The potential security issues described include stale data errors.

19. The system of claim 18, It is characterized in that The policy specifies the conditions under which the data stream is copied more than once to the user-facing bus of the hardware design.

20. The system of claim 18, It is characterized in that The policy specifies conditions under which data associated with the data flow propagates through the hardware design when the data should not propagate.

Citation Information

Cited By

  • Detecting potential security issues in a hardware design using register transfer level (RTL) information flow tracking

    US12769913B2