CWE-558 - Use of getlogin() in Multithreaded Application
CWE-558
- Abstraction:
- Variant
- Structure:
- Simple
- Status:
- Draft
- Weakness Name
Use of getlogin() in Multithreaded Application
- Description
The product uses the getlogin() function in a multithreaded context, potentially causing it to return incorrect values.
The getlogin() function returns a pointer to a string that contains the name of the user associated with the calling process. The function is not reentrant, meaning that if it is called from another process, the contents are not locked out and the value of the string can be changed by another process. This makes it very risky to use because the username can be changed by other processes, so the results of the function cannot be trusted.
- Common Consequences
Scope: Integrity, Access Control, Other
Impact: Modify Application Data, Bypass Protection Mechanism, Other
- Related Weaknesses
- Release Date:
- 2006-07-19
- Latest Modification Date:
- 2023-10-26
Free online web security scanner