CWE-479: Signal Handler Use of a Non-reentrant Function
2 CVEs have CWE-479 as their primary weakness. 0 of them are in the CISA KEV catalog. The highest EPSS score among them is 0.839%.
The product defines a signal handler that calls a non-reentrant function.
The function call syslog() is an example of this. In order to perform its functionality, it allocates a small amount of memory as scratch space. If syslog() is suspended by a signal call and the signal handler calls syslog(), the memory used by both of these functions enters an undefined, and possibly, exploitable state. Implementations of malloc() and free() manage metadata in global structures in order to track which memory is allocated versus which memory is available, but they are non-reentrant. Simultaneous calls to these functions can cause corruption of the metadata.
Child of CWE-828: Signal Handler with Functionality that is not Asynchronous-Safe
Mitigations
- 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.
Observed examples
- CVE-2005-0893: signal handler calls function that ultimately uses malloc()
- CVE-2004-2259: SIGCHLD signal to FTP server can cause crash under heavy load while executing non-reentrant functions like malloc/free.
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-479'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-479'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).