CWE-910: Use of Expired File Descriptor
Description
The product uses or accesses a file descriptor after it has been closed.
After a file descriptor for a particular file or device has been released, it can be reused. The code might not write to the original file, since the reused file descriptor might reference a different file or device.
- Abstraction
- BaseA weakness specific enough to point to detection and prevention methods.
- Likelihood of exploit
- Medium
- Status
- Incomplete
Common consequences
- Confidentiality
Read Files or Directories
The program could read data from the wrong file.
- Availability
DoS: Crash, Exit, or Restart
Accessing a file descriptor that has been closed can cause a crash.
Related weaknesses
Parent weaknesses
CAPEC attack patterns that exploit it
CWE 4.20 links no CAPEC attack pattern to this weakness.