Description
A feature, API, or function does not perform according to its specification.
Potential Impact
Other
Quality Degradation, Varies by Context
Demonstrative Examples
module csr_regfile #(...)(...);
...
// ---------------------------
// CSR Write and update logic
// ---------------------------
...
if (csr_we) begin
unique case (csr_addr.address)
...
riscv::CSR_SIE: begin
// the mideleg makes sure only delegate-able register
//(and therefore also only implemented registers) are written
mie_d = (mie_q & ~mideleg_q) | (csr_wdata & mideleg_q) | utval_q;
end
...
endcase
end
endmodulemodule csr_regfile #(...)(...);
...
// ---------------------------
// CSR Write and update logic
// ---------------------------
...
if (csr_we) begin
unique case (csr_addr.address)
...
riscv::CSR_SIE: begin
// the mideleg makes sure only delegate-able register
//(and therefore also only implemented registers) are written
mie_d = (mie_q & ~mideleg_q) | (csr_wdata & mideleg_q);
end
...
endcase
end
endmoduleReal-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2003-0187 | Program uses large timeouts on unconfirmed connections resulting from inconsistency in linked lists implementations. |
| CVE-2003-0465 | "strncpy" in Linux kernel acts different than libc on x86, leading to expected behavior difference - sort of a multiple interpretation error? |
| CVE-2005-3265 | Buffer overflow in product stems the use of a third party library function that is expected to have internal protection against overflows, but doesn't. |
Related Weaknesses
Taxonomy Mappings
- PLOVER: — Expected behavior violation
Frequently Asked Questions
What is CWE-440?
CWE-440 (Expected Behavior Violation) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. A feature, API, or function does not perform according to its specification.
How can CWE-440 be exploited?
Attackers can exploit CWE-440 (Expected Behavior Violation) to quality degradation, varies by context. This weakness is typically introduced during the Architecture and Design, Implementation, Operation phase of software development.
How do I prevent CWE-440?
Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.
What is the severity of CWE-440?
CWE-440 is classified as a Base-level weakness (Medium abstraction). It has been observed in 3 real-world CVEs.