CVE-2006-5051 - Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Severity

93%

Complexity

86%

Confidentiality

165%

Successful code execution exploitation requires that GSSAPI authentication is enabled.

Signal handler race condition in OpenSSH before 4.4 allows remote attackers to cause a denial of service (crash), and possibly execute arbitrary code if GSSAPI authentication is enabled, via unspecified vectors that lead to a double-free.

Successful code execution exploitation requires that GSSAPI authentication is enabled.

CVSS 2.0 Base Score 9.3. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:C/I:C/A:C).

Demo Examples

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

CWE-362

This code could be used in an e-commerce application that supports transfers between accounts. It takes the total amount of the transfer, sends it to the new account, and deducts the amount from the original account.


               
NotifyUser("New balance: $newbalance");
FatalError("Bad Transfer Amount");
FatalError("Insufficient Funds");

A race condition could occur between the calls to GetBalanceFromDatabase() and SendNewBalanceToDatabase().

Suppose the balance is initially 100.00. An attack could be constructed as follows:


               
PROGRAM-2 sends a request to update the database, setting the balance to 99.00

At this stage, the attacker should have a balance of 19.00 (due to 81.00 worth of transfers), but the balance is 99.00, as recorded in the database.

To prevent this weakness, the programmer has several options, including using a lock to prevent multiple simultaneous requests to the web application, or using a synchronization mechanism that includes all the code between GetBalanceFromDatabase() and SendNewBalanceToDatabase().

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

CWE-362

The following function attempts to acquire a lock in order to perform operations on a shared resource.


               
}
pthread_mutex_unlock(mutex);/* access shared resource */

However, the code does not check the value returned by pthread_mutex_lock() for errors. If pthread_mutex_lock() cannot acquire the mutex for any reason, the function may introduce a race condition into the program and result in undefined behavior.

In order to avoid data races, correctly written programs must check the result of thread synchronization functions and appropriately handle all errors, either by attempting to recover from them or reporting it to higher levels.


               
}
return pthread_mutex_unlock(mutex);
return result;
/* access shared resource */

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

CWE-362

Suppose a processor's Memory Management Unit (MMU) has 5 other shadow MMUs to distribute its workload for its various cores. Each MMU has the start address and end address of "accessible" memory. Any time this accessible range changes (as per the processor's boot status), the main MMU sends an update message to all the shadow MMUs.

Suppose the interconnect fabric does not prioritize such "update" packets over other general traffic packets. This introduces a race condition. If an attacker can flood the target with enough messages so that some of those attack packets reach the target before the new access ranges gets updated, then the attacker can leverage this scenario.

Overview

Type

OpenBSD OpenSSH

First reported 18 years ago

2006-09-27 23:07:00

Last updated 7 years ago

2017-10-11 01:31:00

Affected Software

OpenBSD OpenSSH 1.2

1.2

OpenBSD OpenSSH 1.2.1

1.2.1

OpenBSD OpenSSH 1.2.2

1.2.2

OpenBSD OpenSSH 1.2.3

1.2.3

OpenBSD OpenSSH 1.2.27

1.2.27

OpenBSD OpenSSH 2.1

2.1

OpenBSD OpenSSH 2.1.1

2.1.1

OpenBSD OpenSSH 2.2

2.2

OpenBSD OpenSSH 2.3

2.3

OpenBSD OpenSSH 2.5

2.5

OpenBSD OpenSSH 2.5.1

2.5.1

OpenBSD OpenSSH 2.5.2

2.5.2

OpenBSD OpenSSH 2.9

2.9

OpenBSD OpenSSH 2.9.9

2.9.9

OpenBSD OpenSSH 2.9.9 p2

2.9.9p2

OpenBSD OpenSSH 2.9 p1

2.9p1

OpenBSD OpenSSH 2.9 p2

2.9p2

OpenBSD OpenSSH 3.0

3.0

OpenBSD OpenSSH 3.0.1

3.0.1

OpenBSD OpenSSH 3.0.1 p1

3.0.1p1

OpenBSD OpenSSH 3.0.2

3.0.2

OpenBSD OpenSSH 3.0.2p1

3.0.2p1

OpenBSD OpenSSH 3.0 p1

3.0p1

OpenBSD OpenSSH 3.1

3.1

OpenBSD OpenSSH 3.1 p1

3.1p1

OpenBSD OpenSSH 3.2

3.2

OpenBSD OpenSSH 3.2.2

3.2.2

OpenBSD OpenSSH 3.2.2 p1

3.2.2p1

OpenBSD OpenSSH 3.2.3 p1

3.2.3p1

OpenBSD OpenSSH 3.3

3.3

OpenBSD OpenSSH 3.3 p1

3.3p1

OpenBSD OpenSSH 3.4

3.4

OpenBSD OpenSSH 3.4 p1

3.4p1

OpenBSD OpenSSH 3.5

3.5

OpenBSD OpenSSH 3.5 p1

3.5p1

OpenBSD OpenSSH 3.6

3.6

OpenBSD OpenSSH 3.6.1

3.6.1

OpenBSD OpenSSH 3.6.1 p1

3.6.1p1

OpenBSD OpenSSH 3.6.1 p2

3.6.1p2

OpenBSD OpenSSH 3.7

3.7

OpenBSD OpenSSH 3.7.1

3.7.1

OpenBSD OpenSSH 3.7.1 p1

3.7.1p1

OpenBSD OpenSSH 3.7.1 p2

3.7.1p2

OpenBSD OpenSSH 3.8

3.8

OpenBSD OpenSSH 3.8.1

3.8.1

OpenBSD OpenSSH 3.8.1 p1

3.8.1p1

OpenBSD OpenSSH 3.9

3.9

OpenBSD OpenSSH 3.9.1

3.9.1

OpenBSD OpenSSH 3.9.1 p1

3.9.1p1

OpenBSD OpenSSH 4.0

4.0

OpenBSD OpenSSH Portable 4.0.p1

4.0p1

OpenBSD OpenSSH Portable 4.1.p1

4.1p1

OpenBSD OpenSSH 4.2

4.2

OpenBSD OpenSSH Portable 4.2.p1

4.2p1

OpenBSD OpenSSH 4.3

4.3

OpenBSD OpenSSH Portable 4.3.p1

4.3p1

References

FreeBSD-SA-06:22.openssh

20061001-01-P

http://docs.info.apple.com/article.html?artnum=305214

APPLE-SA-2007-03-13

[freebsd-security] 20061002 FreeBSD Security Advisory FreeBSD-SA-06:22.openssh

[openssh-unix-dev] 20060927 Announce: OpenSSH 4.4 released

http://openssh.org/txt/release-4.4

22158

Vendor Advisory

22173

Vendor Advisory

22183

Vendor Advisory

22196

Vendor Advisory

22208

Vendor Advisory

22236

Vendor Advisory

22245

Vendor Advisory

22270

Vendor Advisory

22352

Vendor Advisory

22362

Vendor Advisory

22487

Vendor Advisory

22495

22823

Vendor Advisory

22926

Vendor Advisory

23680

Vendor Advisory

24479

Vendor Advisory

24799

Vendor Advisory

24805

Vendor Advisory

FreeBSD-SA-06:22

GLSA-200611-06

1016940

SSA:2006-272-02

http://sourceforge.net/forum/forum.php?forum_id=681763

http://support.avaya.com/elmodocs2/security/ASA-2006-216.htm

http://www.arkoon.fr/upload/alertes/36AK-2006-07-FR-1.0_FAST360_OPENSSH.pdf

http://www.arkoon.fr/upload/alertes/43AK-2006-09-FR-1.0_SSL360_OPENSSH.pdf

DSA-1189

DSA-1212

VU#851340

US Government Resource

MDKSA-2006:179

SUSE-SA:2006:062

[2.9] 015: SECURITY FIX: October 12, 2006

OpenPKG-SA-2006.022

29264

RHSA-2006:0697

RHSA-2006:0698

20241

USN-355-1

TA07-072A

US Government Resource

http://www.vmware.com/support/vi3/doc/esx-3069097-patch.html

http://www.vmware.com/support/vi3/doc/esx-9986131-patch.html

ADV-2006-4018

ADV-2006-4329

ADV-2007-0930

ADV-2007-1332

[security-announce] 20070409 Globus Security Advisory 2007-02: GSI-OpenSSH vulnerability

openssh-signal-handler-race-condition(29254)

oval:org.mitre.oval:def:11387

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.