CWE-558Use of getlogin() in Multithreaded Application

PUBLISHEDweakness record
released 2006-07-19 · last modified 2025-12-11

Metadata

CWE ID:
CWE-558
摘要:
Variant
结构:
Simple
状态:
Draft
发布日期:
2006-07-19
更新日期:
2025-12-11

名称

Use of getlogin() in Multithreaded Application

描述

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.

常见后果

范围:
Integrity, Access Control, Other
影响:
Modify Application Data, Bypass Protection Mechanism, Other

相关 CWE