1274
Mapped Taxonomy Name Node ID Fit Mapped Node Name
7 Pernicious Kingdoms Often Misused: Authentication
Software Fault Patterns SFP3 Use of an improper API
CWE-560: Use of umask() with chmod-style Argument
Weakness ID : 560
Structure : Simple
Abstraction : Variant
Description
The product calls umask() with an incorrect argument that is specified as if it is an argument to
chmod().
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 687 Function Call With Incorrectly Specified Argument Value 1510
Applicable Platforms
Language : C (Prevalence = Undetermined)
Common Consequences
Scope Impact Likelihood
Confidentiality
Integrity
Access Control
Read Files or Directories
Modify Files or Directories
Bypass Protection Mechanism
Potential Mitigations
Phase: Implementation
Use umask() with the correct argument.
Phase: Testing
If you suspect misuse of umask(), you can use grep to spot call instances of umask().
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 946 SFP Secondary Cluster: Insecure Resource
Permissions
888 2394
MemberOf 1412 Comprehensive Categorization: Poor Coding Practices 1400 2538
Notes
Other
Some umask() manual pages begin with the false statement: "umask sets the umask to mask
& 0777" Although this behavior would better align with the usage of chmod(), where the user
CWE Version 4.14
CWE-561: Dead Code
CWE-561: Dead Code