Description
Specific combinations of processor instructions lead to undesirable behavior such as locking the processor until a hard reset performed.
If the instruction set architecture (ISA) and processor logic are not designed carefully and tested thoroughly, certain combinations of instructions may lead to locking the processor or other unexpected and undesirable behavior. Upon encountering unimplemented instruction opcodes or illegal instruction operands, the processor should throw an exception and carry on without negatively impacting security. However, specific combinations of legal and illegal instructions may cause unexpected behavior with security implications such as allowing unprivileged programs to completely lock the CPU.
Potential Impact
Integrity, Availability
Varies by Context
Demonstrative Examples
lock cmpxchg8b eaxif (csr_exception_i.valid && csr_exception_i.cause[63] && commit_instr_i[0].fu != CSR) begin
exception_o = csr_exception_i;
exception_o.tval = commit_instr_i[0].ex.tval;
endif (csr_exception_i.valid && csr_exception_i.cause[63] && !amo_valid_commit_o && commit_instr_i[0].fu != CSR) begin
exception_o = csr_exception_i;
exception_o.tval = commit_instr_i[0].ex.tval;
endMitigations & Prevention
Implement a rigorous testing strategy that incorporates randomization to explore instruction sequences that are unlikely to appear in normal workloads in order to identify halt and catch fire instruction sequences.
Patch operating system to avoid running Halt and Catch Fire type sequences or to mitigate the damage caused by unexpected behavior. See [REF-1108].
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2021-26339 | A bug in AMD CPU's core logic allows a potential DoS by using a specific x86 instruction sequence to hang the processor |
| CVE-1999-1476 | A bug in some Intel Pentium processors allow DoS (hang) via an invalid "CMPXCHG8B" instruction, causing a deadlock |
Related Weaknesses
Frequently Asked Questions
What is CWE-1281?
CWE-1281 (Sequence of Processor Instructions Leads to Unexpected Behavior) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. Specific combinations of processor instructions lead to undesirable behavior such as locking the processor until a hard reset performed.
How can CWE-1281 be exploited?
Attackers can exploit CWE-1281 (Sequence of Processor Instructions Leads to Unexpected Behavior) to varies by context. This weakness is typically introduced during the Architecture and Design, Implementation phase of software development.
How do I prevent CWE-1281?
Key mitigations include: Implement a rigorous testing strategy that incorporates randomization to explore instruction sequences that are unlikely to appear in normal workloads in order to identify halt and catch fire instruct
What is the severity of CWE-1281?
CWE-1281 is classified as a Base-level weakness (Medium abstraction). It has been observed in 2 real-world CVEs.