CWE-782: Exposed IOCTL with Insufficient Access Control

VariantDraft

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

View on MITRE
Back to CWE Lookup

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.

Technical Details

Structure
Simple

Applicable To

Languages
CC++
Platforms
UnixWindows

Frequently Asked Questions

What is CWE-782: Exposed IOCTL with Insufficient Access Control?+

CWE-782: Exposed IOCTL with Insufficient Access Control is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product implements an IOCTL with functionality that should be restricted, but it does not properly enforce access control for the IOCTL. 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.

What are the security consequences of Exposed IOCTL with Insufficient Access Control?+

If exploited, CWE-782 (Exposed IOCTL with Insufficient Access Control) it can compromise Integrity, Availability and Confidentiality, leading to outcomes such as Varies by Context.

How do you prevent or mitigate Exposed IOCTL with Insufficient Access Control?+

Recommended mitigations for CWE-782 include: In Windows environments, use proper access control for the associated device or device namespace. See References.

Which programming languages are affected by Exposed IOCTL with Insufficient Access Control?+

CWE-782 commonly affects C and C++. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Exposed IOCTL with Insufficient Access Control?+

MITRE documents real CVEs mapped to CWE-782, including CVE-2009-2208, CVE-2008-3831, CVE-2008-3525, CVE-2008-0322 and CVE-2007-4277. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-782 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More