Improper Ownership Management

Draft Class
Structure: Simple
Description

The product assigns the wrong ownership, or does not properly verify the ownership, of an object or resource.

Common Consequences 1
Scope: Access Control

Impact: Gain Privileges or Assume Identity

Detection Methods 1
Automated Static AnalysisHigh
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Potential Mitigations 1
Phase: Architecture and DesignOperation
Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
Demonstrative Examples 1
This function is part of a privileged program that takes input from users with potentially lower privileges.

Code Example:

Bad
Python
python
This code does not confirm that the process to be killed is owned by the requesting user, thus allowing an attacker to kill arbitrary processes.
This function remedies the problem by checking the owner of the process before killing it:

Code Example:

Good
Python
python

#Check process owner against requesting user* if getProcessOwner(processID) == user: ``` os.kill(processID, signal.SIGKILL) return else: print("You cannot kill a process you don't own") return

Observed Examples 1
CVE-1999-1125Program runs setuid root but relies on a configuration file owned by a non-root user.
Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Architecture and Design
Affected Resources
  1. File or Directory
Related Weaknesses
Taxonomy Mapping
  • PLOVER
Notes
MaintenanceThe relationships between privileges, permissions, and actors (e.g. users and groups) need further refinement within the Research view. One complication is that these concepts apply to two different pillars, related to control of resources (Improper Control of a Resource Through its Lifetime) and protection mechanism failures (Protection Mechanism Failure).