CWE-584: Return Inside Finally Block

Export to Word

Description

The code has a return statement inside a finally block, which will cause any thrown exception in the try block to be discarded.

Extended Description

N/A


ThreatScore

Threat Mapped score: 0.0

Industry: Finiancial

Threat priority: Unclassified


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)

N/A


Attack TTPs

N/A

Modes of Introduction

Phase Note
Implementation N/A

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: In the following code excerpt, the IllegalArgumentException will never be delivered to the caller. The finally block will cause the exception to be discarded.

try { ... throw IllegalArgumentException(); } finally { return r; }

Notes

← Back to CWE list