CWEweakness

CWE-560 Use of umask() with chmod-style Argument

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Draft
Languages
C
CWE version
5.0

Description

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

Common consequences

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

Potential mitigations

• [Implementation] Use umask() with the correct argument.

Detection methods

• Automated Static Analysis: If you suspect misuse of umask(), you can use grep to spot call instances of umask().

Related

Child of · CWE (1)

  • CWE-687 Function Call With Incorrectly Specified Argument Value weakness