CWE-364

Signal Handler Race Condition

The product uses a signal handler that introduces a race condition.

Mitigation ID: MIT-3

Phase: Requirements

Strategy: Language Selection

Description:

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
Mitigation

Phase: Architecture and Design

Description:

  • 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.
Mitigation

Phase: Implementation

Description:

  • 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.

No CAPEC attack patterns related to this CWE.

Back to CWE stats page