CWE-364: CWE-364: Signal Handler Race Condition

BaseStable

Description

View on MITRE
Back to CWE Lookup

Extended Description

Extended Description

Technical Details

Structure
Simple
Vulnerability Mapping
ALLOWED

Applicable To

Languages
Languages
Platforms
Languages

Frequently Asked Questions

What is CWE-364: CWE-364: Signal Handler Race Condition?+

CWE-364: CWE-364: Signal Handler Race Condition is a Common Weakness Enumeration (CWE) entry maintained by MITRE. Description Extended Description

What are the security consequences of CWE-364: Signal Handler Race Condition?+

If exploited, CWE-364 (CWE-364: Signal Handler Race Condition) it can compromise Modify Application Data, Modify Memory, DoS: Crash, Exit, or Restart and Execute Unauthorized Code or Commands, leading to outcomes such as Scope: Integrity, Confidentiality, Availability It may be possible to cause data corruption and possibly execute arbitrary code by modifying global variables or data structures at unexpected times, violating the assumptions of code that uses this global data., Scope: Access Control If a signal handler interrupts code that is executing with privileges and it may be possible that the signal handler will also be executed with elevated privileges.

How do you prevent or mitigate CWE-364: Signal Handler Race Condition?+

Recommended mitigations for CWE-364 include: Strategy: Language Selection Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Design signal handlers to only set flags, rather than perform complex functionality. These flags can then be checked and acted upon within the main program loop. Only use reentrant functions within signal handlers. Also, use validation to ensure that state is consistent while performing asynchronous actions that affect the state of execution.

Which programming languages are affected by CWE-364: Signal Handler Race Condition?+

CWE-364 commonly affects Languages. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-364 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More