CWE-560

Variant Abstraction Level
Pillar — Highest-level weakness category
Class — Abstract, language-independent
Base — Specific enough to detect
Variant — Tied to specific technology
Compound — Requires multiple weaknesses
Draft MITRE CWE Status
Stable — Fully reviewed and complete
Draft — Under development, may change
Incomplete — Partially defined by MITRE
Deprecated — No longer recommended
Obsolete — Replaced by another CWE
Use of umask() with chmod-style Argument

Description

The product calls umask() with an incorrect argument that is specified as if it is an argument to chmod().

Consequences

Confidentiality, Integrity, Access Control — Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism

Mitigations

Phase: Implementation

Use umask() with the correct argument.

Detection

Automated Static Analysis

If you suspect misuse of umask(), you can use grep to spot call instances of umask().