The product implements an IOCTL with functionality that should be restricted, but it does not properly enforce access control for the IOCTL.
View on MITREWhen 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.
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.
In Windows environments, use proper access control for the associated device or device namespace. See References.
No detection method information available for this CWE.
Operating system does not enforce permissions on an IOCTL that can be used to modify network settings.
View DetailsDevice driver does not restrict ioctl calls to its direct rendering manager.
View Detailsioctl does not check for a required capability before processing certain requests.
View DetailsChain: insecure device permissions allows access to an IOCTL, allowing arbitrary memory to be overwritten.
View DetailsChain: anti-virus product uses weak permissions for a device, leading to resultant buffer overflow in an exposed IOCTL.
View DetailsChain: sandbox allows opening of a TTY device, enabling shell commands through an exposed ioctl.
View DetailsAnti-virus product uses insecure security descriptor for a device driver, allowing access to a privileged IOCTL.
View DetailsUnauthorized user can disable keyboard or mouse by directly invoking a privileged IOCTL.
View DetailsCWE-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.
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.
Recommended mitigations for CWE-782 include: In Windows environments, use proper access control for the associated device or device namespace. See References.
CWE-782 commonly affects C and C++. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.
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.
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.