CVE-2014-0616 - Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Severity

71%

Complexity

86%

Confidentiality

115%

Juniper Junos 10.4 before 10.4R16, 11.4 before 11.4R10, 12.1R before 12.1R8-S2, 12.1X44 before 12.1X44-D30, 12.1X45 before 12.1X45-D20, 12.1X46 before 12.1X46-D10, 12.2 before 12.2R7, 12.3 before 12.3R4-S2, 13.1 before 13.1R3-S1, 13.2 before 13.2R2, and 13.3 before 13.3R1 allows remote attackers to cause a denial of service (rdp crash) via a large BGP UPDATE message which immediately triggers a withdraw message to be sent, as demonstrated by a long AS_PATH and a large number of BGP Communities.

Juniper Junos 10.4 before 10.4R16, 11.4 before 11.4R10, 12.1R before 12.1R8-S2, 12.1X44 before 12.1X44-D30, 12.1X45 before 12.1X45-D20, 12.1X46 before 12.1X46-D10, 12.2 before 12.2R7, 12.3 before 12.3R4-S2, 13.1 before 13.1R3-S1, 13.2 before 13.2R2, and 13.3 before 13.3R1 allows remote attackers to cause a denial of service (rdp crash) via a large BGP UPDATE message which immediately triggers a withdraw message to be sent, as demonstrated by a long AS_PATH and a large number of BGP Communities.

CVSS 2.0 Base Score 7.1. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:N/I:N/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

Juniper JUNOS

First reported 11 years ago

2014-01-15 16:08:00

Last updated 11 years ago

2014-01-24 19:21:00

Affected Software

Juniper JUNOS 10.4

10.4

Juniper JUNOS 11.4

11.4

Juniper JUNOS 12.1R

12.1r

Juniper JUNOS 12.1X44

12.1x44

Juniper JUNOS 12.1X45

12.1x45

Juniper JUNOS 12.1X46

12.1x46

Juniper JUNOS 12.2

12.2

Juniper JUNOS 12.3

12.3

Juniper JUNOS 13.1

13.1

Juniper JUNOS 13.2

13.2

Juniper JUNOS 13.3

13.3

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.