Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

Failing to observe the correct revocation order while relinquishing privileges allows an attacker to regain elevated privileges.

Rule

Severity

Likelihood

Remediation Cost

Detectable

Repairable

Priority

Level

POS36-C

high

High

Probable

probable

Yes

medium

Yes

P12

P18

L1

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V

user_defined

Soundly supported
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-POS36
Compass/ROSE

 

 



Can detect some violations of this rule. In particular, it warns when calls to setgid() are immediately preceded by a call to setuid()

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

DF4891, DF4892, DF4893


Klocwork
Include Page
Klocwork_V
Klocwork_V

SV.

FIU

USAGERULES.PERMISSIONS


SV.USAGERULES.PERMISSIONS




Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-POS36-a

Observe correct revocation order while relinquishing privileges

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rule POS36-CChecks for bad order of dropping privileges (rule fully covered)
 

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

Related Guidelines

Key here (explains table format and definitions)

Taxonomy

Taxonomy item

Relationship

ISO/IEC TR 24772Privilege Sandbox Issues [XYO]
MITRE CWE
Prior to 2018-01-12: CERT: Unspecified Relationship
CWE 2.11CWE-
250, Execution with unnecessary privileges
696, Incorrect behavior order2017-07-07: CERT: Rule subset of CWE

CERT-CWE Mapping Notes

Key here for mapping notes

CWE-696 and POS36-C

CWE-696

...

= Union( POS36-C, list) where list =


  • Misordered executions besides dropping group privileges before dropping user privileges


Bibliography

[Chen 2002]"Setuid Demystified"
[Dowd 2006]Chapter 9, "UNIX I: Privileges and Files"
[Open Group 2004]setuid()
setgid()
[Tsafrir 2008]"The Murky Issue of Changing Process Identity: Revising 'Setuid Demystified'"

...


...

Image Modified Image Modified Image Modified