This vulnerability occurs when code contains a conditional expression that can never evaluate to true, causing a section of the program to be permanently unreachable.
An 'always false' expression is a type of dead code that often results from logical errors, incorrect assumptions about data, or leftover debugging checks. For example, comparing a variable against a fixed value it can never hold, or checking a condition after it has already been definitively ruled out earlier in the logic. This creates a maintenance hazard, as developers might waste time debugging non-functional code, and it can mask deeper logical flaws that affect the program's real behavior. While the unreachable code itself might not directly cause a crash, it indicates flawed reasoning that could lead to security issues elsewhere. It can prevent security-critical validation routines from executing, cause resource leaks if cleanup code is skipped, or create unexpected program flow that attackers could analyze to understand the codebase. Regular code reviews and static analysis tools are effective at catching these expressions before they reach production.
Impact: Quality DegradationVaries by Context
javajavacc