[Forgot Password]
Login  Register Subscribe

30479

 
 

423868

 
 

250038

 
 

909

 
 

195843

 
 

282

Paid content will be excluded from the download.


Download | Alert*
CWE
view XML

Exposed IOCTL with Insufficient Access Control

ID: 782Date: (C)2012-05-14   (M)2022-10-10
Type: weaknessStatus: DRAFT
Abstraction Type: Variant





Description

The software implements an IOCTL with functionality that should be restricted, but it does not properly enforce access control for the IOCTL.

Extended Description

When an IOCTL contains privileged functionality and is exposed unnecessarily, attackers may be able to access this functionality by invoking the IOCTL. Even if the functionality is benign, if the programmer has assumed that the IOCTL would only be accessed by a trusted process, there may be little or no validation of the incoming data, exposing weaknesses that would never be reachable if the attacker cannot call the IOCTL directly.

The implementations of IOCTLs will differ between operating system types and versions, so the methods of attack and prevention may vary widely.

Likelihood of Exploit: Low to Medium

Applicable Platforms
Language: Often
Language: C
Language: Often
Language: C++
Operating System Class: UNIX-based
Operating System Class: Windows-based

Time Of Introduction

  • Architecture and Design
  • Implementation

Common Consequences

ScopeTechnical ImpactNotes
Integrity
Availability
Confidentiality
 
 Attackers can invoke any functionality that the IOCTL offers. Depending on the functionality, the consequences may include code execution, denial-of-service, and theft of data.
 

Detection Methods
None

Potential Mitigations

PhaseStrategyDescriptionEffectivenessNotes
Architecture and Design
 
 In Windows environments, use proper access control for the associated device or device namespace. See References.
 
  

Relationships
This can be primary to many other weaknesses when the programmer assumes that the IOCTL can only be accessed by trusted parties. For example, a program or driver might not validate incoming addresses in METHOD_NEITHER IOCTLs in Windows environments (CWE-781), which could allow buffer overflow and similar attacks to take place, even when the attacker never should have been able to access the IOCTL at all.

Related CWETypeViewChain
CWE-782 CanPrecede CWE-781 Weakness CWE-1000  

Demonstrative Examples
None

Observed Examples

  1. CVE-2009-2208 : Operating system does not enforce permissions on an IOCTL that can be used to modify network settings.
  2. CVE-2008-3831 : Device driver does not restrict ioctl calls to its master.
  3. CVE-2008-3525 : ioctl does not check for a required capability before processing certain requests.
  4. CVE-2008-0322 : Chain: insecure device permissions allows access to an IOCTL, allowing arbitrary memory to be overwritten.
  5. CVE-2007-4277 : Chain: anti-virus product uses weak permissions for a device, leading to resultant buffer overflow in an exposed IOCTL.
  6. CVE-2007-1400 : Chain: sandbox allows opening of a TTY device, enabling shell commands through an exposed ioctl.
  7. CVE-2006-4926 : Anti-virus product uses insecure security descriptor for a device driver, allowing access to a privileged IOCTL.
  8. CVE-1999-0728 : Unauthorized user can disable keyboard or mouse by directly invoking a privileged IOCTL.

For more examples, refer to CVE relations in the bottom box.

White Box Definitions
None

Black Box Definitions
None

Taxynomy Mappings
None

References:

  1. Microsoft .Securing Device Objects.

© SecPod Technologies