CVE Vulnerabilities

CVE-2011-0419

Allocation of Resources Without Limits or Throttling

Published: May 16, 2011 | Modified: Nov 21, 2024
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
4.3 MEDIUM
AV:N/AC:M/Au:N/C:N/I:N/A:P
RedHat/V2
4.3 MODERATE
AV:N/AC:M/Au:N/C:N/I:N/A:P
RedHat/V3
Ubuntu
MEDIUM

Stack consumption vulnerability in the fnmatch implementation in apr_fnmatch.c in the Apache Portable Runtime (APR) library before 1.4.3 and the Apache HTTP Server before 2.2.18, and in fnmatch.c in libc in NetBSD 5.1, OpenBSD 4.8, FreeBSD, Apple Mac OS X 10.6, Oracle Solaris 10, and Android, allows context-dependent attackers to cause a denial of service (CPU and memory consumption) via *? sequences in the first argument, as demonstrated by attacks against mod_autoindex in httpd.

Weakness

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.

Affected Software

Name Vendor Start Version End Version
Portable_runtime Apache * 1.4.3 (excluding)
JBEWS 1.0 for RHEL 4 RedHat ant-0:1.7.1-13.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat antlr-0:2.7.7-7.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat bcel-0:5.2-8.1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat cglib-0:2.2-5.1.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat dom4j-0:1.6.1-11.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat ecj-1:3.3.1.1-3.2.2.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat glassfish-jaf-0:1.1.0-6.1.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat glassfish-javamail-0:1.4.2-0.4.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat glassfish-jsf-0:1.2_13-2.2.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat hibernate3-1:3.3.2-1.5.GA_CP04.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat hibernate3-annotations-0:3.4.0-3.3.GA_CP04.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat hibernate3-commons-annotations-0:3.1.0-1.8.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat hibernate3-ejb-persistence-3.0-api-1:1.0.2-3.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat hibernate3-entitymanager-0:3.4.0-4.3.GA_CP04.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat httpd22-0:2.2.17-14.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-beanutils-0:1.8.0-4.1.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-chain-0:1.2-2.2.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-codec-0:1.3-9.1.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-collections-0:3.2.1-4.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-daemon-1:1.0.5-1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-daemon-jsvc-1:1.0.5-1.4.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-dbcp-0:1.2.1-16.4.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-digester-0:1.8.1-8.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-el-0:1.0-19.2.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-fileupload-1:1.1.1-7.4.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-httpclient-1:3.1-1.1.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-io-0:1.4-1.3.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-launcher-0:1.1-4.6.1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-logging-0:1.1.1-0.4.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-logging-jboss-0:1.1-10.2.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-modeler-0:2.0-4.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-pool-0:1.3-11.2.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-commons-validator-0:1.3.1-7.5.1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-oro-0:2.0.8-3.3.2.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jakarta-taglibs-standard-0:1.1.1-9.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat javassist-0:3.12.0-1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jboss-common-core-0:2.2.17-1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jboss-common-logging-jdk-0:2.1.2-1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jboss-common-logging-spi-0:2.1.2-1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jboss-javaee-0:5.0.1-2.9.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jcommon-0:1.0.16-1.2.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat jfreechart-0:1.0.13-2.3.2.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat log4j-0:1.2.14-18.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat mod_cluster-0:1.0.10-2.GA_CP01.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat mod_cluster-native-0:1.0.10-2.GA_CP01.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat mod_jk-0:1.2.31-1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat mx4j-1:3.0.1-9.3.4.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat objectweb-asm-0:3.1-5.3.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat regexp-0:1.5-1.2.1.jdk6.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat struts12-0:1.2.9-3.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat tomcat5-0:5.5.33-14_patch_04.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat tomcat6-0:6.0.32-15_patch_03.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat tomcat-jkstatus-ant-0:1.2.31-2.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat tomcat-native-0:1.1.20-2.0.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat xalan-j2-0:2.7.1-5.3_patch_04.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat xerces-j2-0:2.9.1-3.patch01.1.ep5.el4 *
JBEWS 1.0 for RHEL 4 RedHat xml-commons-1:1.3.04-7.12.ep5.el4 *
Red Hat Enterprise Linux 4 RedHat apr-0:0.9.4-25.el4 *
Red Hat Enterprise Linux 5 RedHat apr-0:1.2.7-11.el5_6.4 *
Red Hat Enterprise Linux 6 RedHat apr-0:1.3.9-3.el6_0.1 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat ant-0:1.7.1-13.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat antlr-0:2.7.7-7.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat cglib-0:2.2-5.1.1.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat dom4j-0:1.6.1-11.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat ecj3-1:3.3.1.1-3.1.1.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat glassfish-jsf-0:1.2_13-3.1.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat hibernate3-1:3.3.2-1.4.GA_CP04.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat hibernate3-annotations-0:3.4.0-3.2.GA_CP04.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat hibernate3-commons-annotations-0:3.1.0-1.8.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat hibernate3-ejb-persistence-3.0-api-1:1.0.2-3.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat hibernate3-entitymanager-0:3.4.0-4.3.GA_CP04.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat httpd-0:2.2.17-11.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-beanutils-0:1.8.0-4.1.2.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-chain-0:1.2-2.2.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-codec-0:1.3-9.2.1.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-collections-0:3.2.1-4.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-daemon-1:1.0.5-1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-daemon-jsvc-1:1.0.5-1.4.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-dbcp-0:1.2.1-16.4.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-digester-0:1.8.1-8.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-fileupload-1:1.1.1-7.4.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-httpclient-1:3.1-1.2.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-io-0:1.4-1.3.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-logging-0:1.1.1-0.4.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-logging-jboss-0:1.1-10.2.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-pool-0:1.3-11.2.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-commons-validator-0:1.3.1-7.5.2.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-oro-0:2.0.8-3.3.2.1.1.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jakarta-taglibs-standard-0:1.1.1-9.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat javassist-0:3.12.0-1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jboss-common-core-0:2.2.17-1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jboss-common-logging-jdk-0:2.1.2-1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jboss-common-logging-spi-0:2.1.2-1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jboss-javaee-0:5.0.1-2.9.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jcommon-0:1.0.16-1.2.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat jfreechart-0:1.0.13-2.3.2.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat mod_cluster-0:1.0.10-2.1.GA_CP01.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat mod_cluster-native-0:1.0.10-2.1.GA_CP01.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat mod_jk-0:1.2.31-1.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat objectweb-asm-0:3.1-5.3.1.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat struts12-0:1.2.9-3.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat tomcat5-0:5.5.33-16_patch_04.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat tomcat6-0:6.0.32-15.1_patch_03.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat tomcat-jkstatus-ant-0:1.2.31-2.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat tomcat-native-0:1.1.20-2.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat xalan-j2-0:2.7.1-5.3_patch_04.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat xerces-j2-0:2.9.1-3.patch01.1.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 5 RedHat xml-commons-0:1.3.04-7.10.jdk6.ep5.el5 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat ant-0:1.7.1-14.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat antlr-0:2.7.7-7.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat cglib-0:2.2-5.4.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat dom4j-0:1.6.1-11.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat ecj3-1:3.3.1.1-4.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat glassfish-jsf-0:1.2_13-3.1.4.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat hibernate3-1:3.3.2-1.8.GA_CP04.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat hibernate3-annotations-0:3.4.0-3.5.GA_CP04.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat hibernate3-commons-annotations-0:3.1.0-1.8.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat hibernate3-ejb-persistence-3.0-api-1:1.0.2-3.3.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat hibernate3-entitymanager-0:3.4.0-4.4.GA_CP04.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat httpd-0:2.2.17-11.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-beanutils-0:1.8.0-9.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-chain-0:1.2-2.2.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-codec-0:1.3-12.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-collections-0:3.2.1-4.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-daemon-1:1.0.5-1.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-daemon-jsvc-1:1.0.5-1.4.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-dbcp-0:1.2.1-16.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-digester-0:1.8.1-8.1.1.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-fileupload-1:1.1.1-7.5.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-httpclient-1:3.1-1.2.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-io-0:1.4-4.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-logging-0:1.1.1-1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-logging-jboss-0:1.1-10.2.2.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-pool-0:1.3-15.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-commons-validator-0:1.3.1-7.5.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-oro-0:2.0.8-7.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jakarta-taglibs-standard-0:1.1.1-12.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat javassist-0:3.12.0-3.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jboss-common-core-0:2.2.17-1.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jboss-common-logging-jdk-0:2.1.2-1.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jboss-common-logging-spi-0:2.1.2-1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jboss-javaee-0:5.0.1-2.9.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jcommon-0:1.0.16-1.2.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat jfreechart-0:1.0.13-2.3.2.1.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat mod_cluster-0:1.0.10-2.2.GA_CP01.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat mod_cluster-native-0:1.0.10-2.1.1.GA_CP01.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat mod_jk-0:1.2.31-1.1.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat objectweb-asm31-0:3.1-12.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat struts12-0:1.2.9-3.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat tomcat5-0:5.5.33-15_patch_04.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat tomcat6-0:6.0.32-14_patch_03.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat tomcat-jkstatus-ant-0:1.2.31-2.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat tomcat-native-0:1.1.20-2.1.2.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat xalan-j2-0:2.7.1-5.3_patch_04.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat xerces-j2-0:2.9.1-8.patch01.1.ep5.el6 *
Red Hat JBoss Enterprise Web Server 1 for RHEL 6 RedHat xml-commons-0:1.3.04-7.14.ep5.el6 *
Red Hat JBoss Web Server 1.0 RedHat *
Apache2 Ubuntu dapper *
Apr Ubuntu hardy *
Apr Ubuntu lucid *
Apr Ubuntu maverick *
Apr Ubuntu natty *
Apr Ubuntu upstream *

Extended Description

Code frequently has to work with limited resources, so programmers must be careful to ensure that resources are not consumed too quickly, or too easily. Without use of quotas, resource limits, or other protection mechanisms, it can be easy for an attacker to consume many resources by rapidly making many requests, or causing larger resources to be used than is needed. When too many resources are allocated, or if a single resource is too large, then it can prevent the code from working correctly, possibly leading to a denial of service.

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”

  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  • Mitigation of resource exhaustion attacks requires that the target system either:

  • The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.

  • The second solution can be difficult to effectively institute – and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.

  • If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.

  • Ensure that all failures in resource allocation place the system into a safe posture.

  • Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems.

  • When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users.

  • Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).

References