VariantDraft
CWE-479Signal Handler Use of a Non-reentrant Function
Category: other
Description
The product defines a signal handler that calls a non-reentrant function.
Common consequences· 2
- Integrity / Confidentiality / Availability — Execute Unauthorized Code or CommandsIt may be possible to execute arbitrary code through the use of a write-what-where condition.
- Integrity — Modify Memory, Modify Application DataSignal race conditions often result in data corruption.
Potential mitigations· 4
- [Requirements]Require languages or libraries that provide reentrant functionality, or otherwise make it easier to avoid this weakness.
- [Architecture and Design]Design signal handlers to only set flags rather than perform complex functionality.
- [Implementation]Ensure that non-reentrant functions are not found in signal handlers.
- [Implementation]Use sanity checks to reduce the timing window for exploitation of race conditions. This is only a partial solution, since many attacks might fail, but other attacks still might work within the narrower window, even accidentally.
References
Related by meaning· 6
Nearest entities by semantic similarity across the cs-graph corpus.