CWE-1222 Variant Incomplete

Insufficient Granularity of Address Regions Protected by Register Locks

This vulnerability occurs when a hardware design uses a single lock bit to protect a large, coarse block of memory addresses. This lack of granularity creates a conflict: the system needs to lock…

Definition

What is CWE-1222?

This vulnerability occurs when a hardware design uses a single lock bit to protect a large, coarse block of memory addresses. This lack of granularity creates a conflict: the system needs to lock critical configuration settings early for security, but software also needs to write to other parts of that same address region during normal operation, which the lock incorrectly prevents.
In many systems, a trusted boot process (like the BIOS or bootloader) sets a hardware lock bit to permanently freeze critical configuration registers, preventing malware or errors from altering them later. This lock typically protects an entire predefined address region, not individual registers. However, if this protected region is too large and not finely segmented, it becomes a security and functionality trade-off. Setting the lock too early can block legitimate software from updating necessary settings within that same region, while not setting it leaves the system vulnerable. Fixing this conflict after manufacturing requires a hardware redesign, as the lock granularity is baked into the silicon.
Auswirkungen in der Praxis

Real-world CVEs caused by CWE-1222

Bisher sind in MITREs Katalog keine öffentlichen CVE-Referenzen mit dieser CWE verknüpft.

Wie Angreifer es ausnutzen

Angreiferpfad Schritt für Schritt

  1. 1

    Identifiziere einen Codepfad, der nicht vertrauenswürdige Eingaben ohne Validierung verarbeitet.

  2. 2

    Erzeuge eine Payload, die das unsichere Verhalten auslöst — Injection, Traversal, Overflow oder Logik-Missbrauch.

  3. 3

    Liefere die Payload über einen normalen Request aus und beobachte die Reaktion der Anwendung.

  4. 4

    Iteriere, bis die Antwort Daten preisgibt, Angreifer-Code ausführt oder Berechtigungen eskaliert.

Verwundbares Codebeispiel

Vulnerable Other

For example, consider a hardware unit with a 32 kilobyte configuration address space where the first 8 kilobyte address contains security sensitive controls that must only be writable by device bootloader. One way to protect the security configuration could be to define a 32 bit system configuration locking register (SYS_LOCK) where each bit lock locks the corresponding 1 kilobyte region.

Verwundbar Other
| Address | Register | 
| --- | --- |
| 0x0000 | SYS_LOCK: 32 bit system configuration lock register, each bit is write-1-once  |
| 0x0004 | SECURITY_FEATURE_ENABLE: 32 bit register controlling enabling of security features  |
| ... |    |
| 0x0310 | SW_MODE: 32 bit Software Mode indication register   |

  | Address region | Lock bit | 
| --- | --- |
| 0x0000 - 0x03FF | SYS_LOCK[0]  |
| 0x0400 - 0x07FF | SYS_LOCK[1]  |
| ... |    |
| 0x7C00 - 0x7FFF | SYS_LOCK[31]  |
Sicheres Codebeispiel

Secure pseudo

Sicher pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
  const safe = validateAndEscape(input);
  return executeWithGuards(safe);
}
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Präventions-Checkliste

How to prevent CWE-1222

  • Architecture and Design The defining of protected locked registers should be reviewed or tested early in the design phase with software teams to ensure software flows are not blocked by the security locks. As an alternative to using register lock control bits and fixed access control regions, the hardware design could use programmable security access control configuration so that device trusted firmware can configure and change the protected regions based on software usage and security models.
Erkennungssignale

How to detect CWE-1222

SAST High

Führe statische Analyse (SAST) auf der Codebasis aus und suche im Datenfluss nach dem unsicheren Muster.

DAST Moderate

Führe dynamische Application-Security-Tests gegen den Live-Endpoint aus.

Runtime Moderate

Beobachte Runtime-Logs auf ungewöhnliche Exception-Traces, fehlerhafte Eingaben oder Versuche, Autorisierung zu umgehen.

Code review Moderate

Code Review: Markiere jeden neuen Code, der Eingaben von dieser Oberfläche ohne validierte Framework-Helper verarbeitet.

Plexicus Auto-Fix

Plexicus erkennt CWE-1222 automatisch und öffnet in unter 60 Sekunden einen Fix-PR.

Codex Remedium scannt jeden Commit, identifiziert genau diese Schwachstelle und liefert einen reviewer-ready Pull Request mit dem Patch. Keine Tickets. Keine Hand-offs.

Häufig gestellte Fragen

Frequently asked questions

Was ist CWE-1222?

This vulnerability occurs when a hardware design uses a single lock bit to protect a large, coarse block of memory addresses. This lack of granularity creates a conflict: the system needs to lock critical configuration settings early for security, but software also needs to write to other parts of that same address region during normal operation, which the lock incorrectly prevents.

Wie gravierend ist CWE-1222?

MITRE hat für diese Schwachstelle keine Exploit-Wahrscheinlichkeit veröffentlicht. Behandle sie als mittlere Auswirkung, bis dein Threat Model anderes belegt.

Welche Sprachen oder Plattformen sind von CWE-1222 betroffen?

MITRE lists the following affected platforms: Not OS-Specific, Not Architecture-Specific, System on Chip.

Wie kann ich CWE-1222 verhindern?

The defining of protected locked registers should be reviewed or tested early in the design phase with software teams to ensure software flows are not blocked by the security locks. As an alternative to using register lock control bits and fixed access control regions, the hardware design could use programmable security access control configuration so that device trusted firmware can configure and change the protected regions based on software usage and security models.

Wie erkennt und behebt Plexicus CWE-1222?

Die SAST-Engine von Plexicus erkennt die Datenfluss-Signatur von CWE-1222 bei jedem Commit. Bei einem Treffer öffnet unser Codex-Remedium-Agent einen Fix-PR mit korrigiertem Code, Tests und einer einzeiligen Zusammenfassung für den Reviewer.

Wo erfahre ich mehr über CWE-1222?

MITRE veröffentlicht die kanonische Definition unter https://cwe.mitre.org/data/definitions/1222.html. Für ergänzende Hinweise kannst du auch die OWASP- und NIST-Dokumentation heranziehen.

Bereit, wenn du es bist

Schluss mit dem Bezahlen pro Entwickler.
Schließ den Kreislauf.

Plexicus ist die KI-native ASPM, die scannt, filtert, fixt, pentestet und erklärt — autonom. Unbegrenzte Entwickler, unbegrenzte Repos, Fair-Use-KI-Aktionen. Echter kostenloser Tarif, €269/mo jährlich, wenn du bereit bist.