The product calls a non-reentrant function in a concurrent context in which a competing code sequence (e.g. thread or signal handler) may have an opportunity to call the same function or otherwise influence its state.
View on MITREUse reentrant functions if available.
Add synchronization to your non-reentrant function.
In Java, use the ReentrantLock Class.
No detection method information available for this CWE.
In this example, a signal handler uses syslog() to log a message:
The following code relies on getlogin() to determine whether or not a user is trusted. It is easily subverted.
SIGCHLD signal to FTP server can cause crash under heavy load while executing non-reentrant functions like malloc/free.
View DetailsNo relationship information available for this CWE.
CWE-663: Use of a Non-reentrant Function in a Concurrent Context is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product calls a non-reentrant function in a concurrent context in which a competing code sequence (e.g. thread or signal handler) may have an opportunity to call the same function or otherwise influence its state.
If exploited, CWE-663 (Use of a Non-reentrant Function in a Concurrent Context) it can compromise Integrity, Confidentiality and Other, leading to outcomes such as Modify Memory, Read Memory, Modify Application Data, Read Application Data and Alter Execution Logic.
Recommended mitigations for CWE-663 include: Use reentrant functions if available. Add synchronization to your non-reentrant function. In Java, use the ReentrantLock Class.
MITRE documents real CVEs mapped to CWE-663, including CVE-2001-1349 and CVE-2004-2259. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.
A CWE (Common Weakness Enumeration) like CWE-663 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.