[Forgot Password]
Login  Register Subscribe

23631

 
 

115083

 
 

97147

 
 

909

 
 

78730

 
 

109

Paid content will be excluded from the download.


Download | Alert*
CWE
view XML

File Descriptor Exhaustion

ID: 769Date: (C)2012-05-14   (M)2017-10-18
Type: categoryStatus: INCOMPLETE





Description

The software can be influenced by an attacker to open more files than are supported by the system.

Extended Description

There are at least three distinct scenarios which can commonly lead to file descriptor exhaustion:

Lack of throttling for the number of open file descriptors

Losing all references to a file descriptor before reaching the shutdown stage

Not closing file descriptors after processing

Likelihood of Exploit: Low to Medium

Applicable Platforms
None

Time Of Introduction

  • Architecture and Design
  • Implementation

Common Consequences
None

Detection Methods
None

Potential Mitigations

PhaseStrategyDescriptionEffectivenessNotes
Implementation
Architecture and Design
 
 If file I/O is being supported by an application for multiple users, balancing the resource allotment across the group may help to prevent exhaustion as well as differentiate malicious activity from an insufficient resource pool.
 
  
Implementation
 
 Consider using the getrlimit() function included in the sys/resources library in order to determine how many files are currently allowed to be opened for the process.
 
  

Relationships

Related CWETypeViewChain
CWE-769 ChildOf CWE-400 Weakness CWE-699  

Demonstrative Examples
None

White Box Definitions
None

Black Box Definitions
None

Taxynomy Mappings
None

References:

  1. .kernel.org man page for getrlmit().

© 2013 SecPod Technologies