---
title: "CWE-1234: Hardware Internal or Debug Modes Allow Override of Locks"
url: https://radicalnotion.ai/cwe/cwe-1234
type: cwe
description: "System configuration protection may be bypassed during debug mode."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1234: Hardware Internal or Debug Modes Allow Override of Locks

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 4
- **Of those, in CISA KEV:** 0
- **New in 2026:** 2
- **CWE catalog version:** 4.21

## Description

System configuration protection may be bypassed during debug mode.

## Background

Device configuration controls are commonly programmed after a device power reset by a trusted firmware or software module (e.g., BIOS/bootloader) and then locked from any further modification. This is commonly implemented using a trusted lock bit, which when set, disables writes to a protected set of registers or address regions. The lock protection is intended to prevent modification of certain system configuration (e.g., memory/memory protection unit configuration).

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | Debug features supported by hardware or internal modes/system states might be supported in the hardware design. |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control | Bypass Protection Mechanism | Bypass of the lock bit protection may allow access and modification of system configuration information, even when the lock bit is set. |

## Potential mitigations

### Architecture and Design, Implementation, Testing

- Security Lock bit protections should be reviewed for any bypass/override modes supported.
- Any supported override modes either should be removed or protected using authenticated debug modes.
- Security lock programming flow and lock properties should be tested in pre-silicon and post-silicon testing.

Effectiveness: High

## Demonstrative examples

### Example 1

For example, consider the example Locked\_override\_register example. This register module supports a lock mode that blocks any writes after lock is set to 1.

However, it also allows override of the lock protection when scan\_mode or debug\_unlocked modes are active.

Bad code:

```systemverilog
module Locked_register_example
(
input [15:0] Data_in,
input Clk,
input resetn,
input write,
input Lock,
input scan_mode,
input debug_unlocked,
output reg [15:0] Data_out
);

reg lock_status;

always @(posedge Clk or negedge resetn)
    if (~resetn) // Register is reset resetn
    begin
        lock_status <= 1'b0;
    end
    else if (Lock)
    begin
        lock_status <= 1'b1;
    end
    else if (~Lock)
    begin
        lock_status <= lock_status
    end
always @(posedge Clk or negedge resetn)
    if (~resetn) // Register is reset resetn
    begin
        Data_out <= 16'h0000;
    end
    else if (write & (~lock_status | scan_mode | debug_unlocked) ) // Register protected by Lock bit input, overrides supported for scan_mode & debug_unlocked
    begin
        Data_out <= Data_in;
    end
    else if (~write)
    begin
        Data_out <= Data_out;
    end
endmodule
```

If either the scan\_mode or the debug\_unlocked modes can be triggered by software, then the lock protection may be bypassed.

### Example 2

The following example code \[REF-1375\] is taken from the register lock security peripheral of the HACK@DAC'21 buggy OpenPiton SoC. It demonstrates how to lock read or write access to security-critical hardware registers (e.g., crypto keys, system integrity code, etc.). The configuration to lock all the sensitive registers in the SoC is managed through the reglk\_mem registers. These reglk\_mem registers are reset when the hardware powers up and configured during boot up. Malicious users, even with kernel-level software privilege, do not get access to the sensitive contents that are locked down. Hence, the security of the entire system can potentially be compromised if the register lock configurations are corrupted or if the register locks are disabled.

Bad code:

```systemverilog
...
always @(posedge clk_i)
    begin
        if(~(rst_ni && ~jtag_unlock && ~rst_9))
            begin
                for (j=0; j < 6; j=j+1) begin
                    reglk_mem[j] <= 'h0;
                end
            end
...
```

Good code:

```systemverilog
...
always @(posedge clk_i)
    begin
        if(~(rst_ni && ~rst_9))
            begin
                for (j=0; j < 6; j=j+1) begin
                    reglk_mem[j] <= 'h0;
                end
            end
...
```

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2023-44297 | - | high | 7.1 | - | No | 2023-12-05 |
| CVE-2025-59104 | Unlocked Bootloader in dormakaba access manager | high | 7.0 | - | No | 2026-01-26 |
| CVE-2023-44298 | - | medium | 6.8 | - | No | 2023-12-05 |
| CVE-2025-33242 | - | medium | 5.9 | - | No | 2026-03-24 |

## Related attack patterns (CAPEC)

- [CAPEC-176](https://radicalnotion.ai/capec/capec-176): Configuration/Environment Manipulation

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-667](https://radicalnotion.ai/cwe/cwe-667) | Improper Locking |

## Frequently asked questions

### What is CWE-1234?

System configuration protection may be bypassed during debug mode.

### What CVEs are caused by CWE-1234?

4 recorded CVEs are attributed to CWE-1234, including CVE-2023-44297, CVE-2025-59104 and CVE-2023-44298.

### What are the consequences of CWE-1234?

Exploiting CWE-1234 can lead to: Bypass Protection Mechanism.

### Is CWE-1234 actively exploited?

4 recorded CVEs are caused by CWE-1234; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/1234.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-1234). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
