CVE-2016-1267 - Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Severity

44%

Complexity

34%

Confidentiality

106%

Race condition in the RPC functionality in Juniper Junos OS before 12.1X44-D55, 12.1X46 before 12.1X46-D40, 12.1X47 before 12.1X47-D25, 12.3 before 12.3R11, 12.3X48 before 12.3X48-D20, 13.2 before 13.2R8, 13.2X51 before 13.2X51-D39, 13.3 before 13.3R7, 14.1 before 14.1R6, 14.1X53 before 14.1X53-D30, 14.2 before 14.2R3-S4, 15.1 before 15.1F2, or 15.1R2, 15.1X49 before 15.1X49-D20, and 16.1 before 16.1R1 allows local users to read, delete, or modify arbitrary files via unspecified vectors.

Race condition in the RPC functionality in Juniper Junos OS before 12.1X44-D55, 12.1X46 before 12.1X46-D40, 12.1X47 before 12.1X47-D25, 12.3 before 12.3R11, 12.3X48 before 12.3X48-D20, 13.2 before 13.2R8, 13.2X51 before 13.2X51-D39, 13.3 before 13.3R7, 14.1 before 14.1R6, 14.1X53 before 14.1X53-D30, 14.2 before 14.2R3-S4, 15.1 before 15.1F2, or 15.1R2, 15.1X49 before 15.1X49-D20, and 16.1 before 16.1R1 allows local users to read, delete, or modify arbitrary files via unspecified vectors.

CVSS 3.0 Base Score 6.7. CVSS Attack Vector: local. CVSS Attack Complexity: high. CVSS Vector: (CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H).

CVSS 2.0 Base Score 4.4. CVSS Attack Vector: local. CVSS Attack Complexity: medium. CVSS Vector: (AV:L/AC:M/Au:N/C:P/I:P/A:P).

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

First reported 8 years ago

2016-04-15 14:59:00

Last updated 8 years ago

2016-12-03 03:20:00

Affected Software

Juniper JUNOS 12.1X46

12.1x46

Juniper Junos 12.1x46 D10

12.1x46

Juniper Junos 12.1x46 D15

12.1x46

Juniper JUNOS 12.1X46-D20

12.1x46

Juniper Junos 12.1x46 D25

12.1x46

Juniper JunOS 12.1x46 D30

12.1x46

Juniper JunOS 12.1x46 D35

12.1x46

Juniper JUNOS 12.1X47

12.1x47

Juniper JUNOS 12.1X47-D10

12.1x47

Juniper JunOS 12.1x47 D15

12.1x47

Juniper JunOS 12.1x47 D20

12.1x47

Juniper JUNOS 12.3

12.3

Juniper Junos 12.3 R1

12.3

Juniper JunOS 12.3 R10

12.3

Juniper Junos 12.3 R2

12.3

Juniper Junos 12.3 R3

12.3

Juniper Junos 12.3 R4

12.3

Juniper Junos 12.3 R5

12.3

Juniper Junos 12.3 R6

12.3

Juniper JUNOS 12.3R7

12.3

Juniper Junos 12.3 R8

12.3

Juniper JunOS 12.3 R9

12.3

Juniper JunOS 12.3x48 D10

12.3x48

Juniper JunOS 12.3x48 D15

12.3x48

Juniper JUNOS 13.2

13.2

Juniper Junos 13.2 R1

13.2

Juniper Junos 13.2 R2

13.2

Juniper Junos 13.2 R3

13.2

Juniper Junos 13.2 R4

13.2

Juniper JUNOS 13.2R5

13.2

Juniper JunOS 13.2 R6

13.2

Juniper JunOS 13.2 R7

13.2

Juniper JunOS 13.2 R7-s1

13.2

Juniper JunOS 13.2 R7-s2

13.2

Juniper JunOS 13.2x51 D15

13.2x51

Juniper Junos 13.2X51 D20

13.2x51

Juniper JunOS 13.2x51 D21

13.2x51

Juniper Junos 13.2X51 D25

13.2x51

Juniper JunOS 13.2x51 D26

13.2x51

Juniper JunOS 13.2x51 D30

13.2x51

Juniper Junos 13.2X51 D35

13.2x51

Juniper JUNOS 13.3

13.3

Juniper Junos 13.3 R1

13.3

Juniper Junos 13.3 R2

13.3

Juniper JUNOS 13.3R2-S2

13.3

Juniper Junos 13.3 R3

13.3

Juniper Junos 13.3 R4

13.3

Juniper Junos 13.3 R5

13.3

Juniper JUNOS 13.3 R6

13.3

Juniper JUNOS 14.1

14.1

Juniper JUNOS 14.1R1

14.1

Juniper Junos 14.1 R2

14.1

Juniper Junos 14.1 R3

14.1

Juniper JunOS 14.1 R4

14.1

Juniper Junos 14.1 R5

14.1

Juniper JunOS 14.1x53

14.1x53

Juniper JunOS 14.1x53 D10

14.1x53

Juniper JunOS 14.1x53 D15

14.1x53

Juniper JunOS 14.1x53 D16

14.1x53

Juniper JunOS 14.1x53 D25

14.1x53

Juniper JunOS 14.1x53 D26

14.1x53

Juniper Junos 14.2 R1

14.2

Juniper Junos 14.2 R2

14.2

Juniper Junos 14.2 R3

14.2

Juniper JunOS 15.1x49 D10

15.1x49

Juniper JUNOS 16.1

16.1

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.