CWE-781: Improper Address Validation in IOCTL with METHOD_NEITHER I/O Control Code
The product defines an IOCTL that uses METHOD_NEITHER for I/O, but it does not validate or incorrectly validates the addresses that are provided.
Last updated
Overview
When an IOCTL uses the METHOD_NEITHER option for I/O control, it is the responsibility of the IOCTL to validate the addresses that have been supplied to it. If validation is missing or incorrect, attackers can supply arbitrary memory addresses, leading to code execution or a denial of service.
Common consequences
What can happen when CWE-781 is exploited.
Modify Memory, Read Memory, Execute Unauthorized Code or Commands, DoS: Crash, Exit, or Restart
Affects: Integrity, Availability, Confidentiality
An attacker may be able to access memory that belongs to another process or user. If the attacker can control the contents that the IOCTL writes, it may lead to code execution at high privilege levels. At the least, a crash can occur.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages
Operating systems