Hardware description language code incorrectly defines register defaults or hardware Intellectual Property (IP) parameters to insecure values.
Integrated circuits and hardware IP software programmable controls and settings are commonly stored in register circuits. These register contents have to be initialized at hardware reset to defined default values that are hard coded in the hardware description language (HDL) code of the hardware unit. Hardware descriptive languages also support definition of parameter variables, which can be defined in code during instantiation of the hardware IP module. Such parameters are generally used to configure a specific instance of a hardware IP in the design. The system security settings of a hardware design can be affected by incorrectly defined default values or IP parameters. The hardware IP would be in an insecure state at power reset, and this can be exposed or exploited by untrusted software running on the system. Both register defaults and parameters are hardcoded values, which cannot be changed using software or firmware patches but must be changed in hardware silicon. Thus, such security issues are considerably more difficult to address later in the lifecycle. Hardware designs can have a large number of such parameters and register defaults settings, and it is important to have design tool support to check these settings in an automated way and be able to identify which settings are security sensitive.
Impact: Varies by Context
Degradation of system functionality, or loss of access control enforcement can occur.
// Parameterized Register module example // Secure_mode : REGISTER_DEFAULT[0] : When set to 1 register is read only and not writable// module register_example #( parameter REGISTER_WIDTH = 8, // Parameter defines width of register, default 8 bits parameter [REGISTER_WIDTH-1:0] REGISTER_DEFAULT = 2**REGISTER_WIDTH -2 // Default value of register computed from Width. Sets all bits to 1s except bit 0 (Secure _mode) ) ( input [REGISTER_WIDTH-1:0] Data_in, input Clk, input resetn, input write, output reg [REGISTER_WIDTH-1:0] Data_out );
reg Secure_mode;
always @(posedge Clk or negedge resetn)
verilogregister_example #(
verilogparameter MEM_SIZE = 100;
localparam JTAG_OFFSET = 81;
const logic [MEM_SIZE-1:0][31:0] mem = {
verilogparameter MEM_SIZE = 100;
localparam JTAG_OFFSET = 100;
module acct_wrapper #( ...
verilog
acct_mem[j] <= 32'hffffffff;** end end ...
module acct_wrapper #( ...
verilog
acct_mem[j] <= 32'h00000000;** end end ...