CAPEC

Common Attack Pattern Enumeration and Classification
Common Attack Pattern Enumeration and Classification

A Community Knowledge Resource for Building Secure Software

Home > CAPEC List > Individual CAPEC Dictionary Definition (Release 1.1)   View the CAPEC List

Individual CAPEC Dictionary Definition (Release 1.1)
Individual CAPEC Dictionary Definition (Release 1.1)

Forced Deadlock
Attack Pattern ID
Pattern Abstraction: Standard

25

Typical Severity

High

Description

Summary

This attack attempts to trigger and exploit a deadlock condition in the target software to cause a denial of service. A deadlock can occur when two or more competing actions are waiting for each other to finish, and thus neither ever does. Deadlock condition are not easy to detect.

Attack Execution Flow

  1. The attacker initiates an exploratory phase to get familiar with the system.

  2. The attacker triggers a first action (such as holding a resource) and initiates a second action which will wait for the first one to finish.

  3. If the target program has a deadlock condition, the program waits indefinitevely resulting in a denial of service.

Attack Prerequisites

The target host has a deadlock condition. There are four conditions for a deadlock to occur, known as the Coffman conditions (See reference, Wikipedia)

The target host exposes an API to the user.

Typical Likelihood of Exploit

Low

Methods of Attack
  • Analysis
  • API Abuse
Examples-Instances

Description

An example of a deadlock which may occur in database products is the following. Client applications using the database may require exclusive access to a table, and in order to gain exclusive access they ask for a lock. If one client application holds a lock on a table and attempts to obtain the lock on a second table that is already held by a second client application, this may lead to deadlock if the second application then attempts to obtain the lock that is held by the first application (Source: Wikipedia, http://en.wikipedia.org/wiki/Deadlock)

Attacker Skill or Knowledge Required

Medium/High: This type of attack may be sophisticated and require knowledge about the system's resources and APIs.

Probing Techniques

The attacker can probe by trying to hold resources and call APIs which are directly using the same resources.

The attacker may try to find actions (threads, processes) competing for the same resources.

Solutions and Mitigations

Use known algorithm to avoid deadlock condition (for instance non-blocking synchronization algorithms).

For competing actions use well known libraries which implement synchronization.

Attack Motivation-Consequences
  • Denial of Service
Related Weaknesses
CWE-IDWeakness NameWeakness Relationship Type
412Unrestricted Lock on Critical ResourceSecondary
567Unsynchronized Access to Shared DataSecondary
Purpose

Exploitation

CIA Impact
Confidentiality ImpactIntegrity ImpactAvailability Impact
LowLowHigh
Technical Context
Architectural ParadigmFrameworkPlatformLanguage
AllAllAllAll
References

G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.

CWE – Unrestricted Critical Resource Lock

Deadlock, http://en.wikipedia.org/wiki/Deadlock

Source
Submission(s)
SubmitterOrganizationDateComment
Eric DalciCigital, Inc2007-01-25
Modification(s)
ModifierOrganizationDateComment
Sean BarnumCigital, Inc2007-03-07Review and revise
Richard StruseVOXEM, Inc2007-03-26Review and feedback leading to changes in Likelihood and other general areas
Sean BarnumCigital, Inc2007-04-13Modified pattern content according to review and feedback
 
Page Last Updated: April 18, 2008