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

Severity

72%

Complexity

39%

Confidentiality

165%

Race condition in the key_gc_unused_keys function in security/keys/gc.c in the Linux kernel through 3.18.2 allows local users to cause a denial of service (memory corruption or panic) or possibly have unspecified other impact via keyctl commands that trigger access to a key structure member during garbage collection of a key.

Race condition in the key_gc_unused_keys function in security/keys/gc.c in the Linux kernel through 3.18.2 allows local users to cause a denial of service (memory corruption or panic) or possibly have unspecified other impact via keyctl commands that trigger access to a key structure member during garbage collection of a key.

CVSS 2.0 Base Score 7.2. CVSS Attack Vector: local. CVSS Attack Complexity: low. CVSS Vector: (AV:L/AC:L/Au:N/C:C/I:C/A:C).

CVSS 2.0 Base Score 6.9. CVSS Attack Vector: local. CVSS Attack Complexity: medium. CVSS Vector: (AV:L/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

First reported 10 years ago

2015-01-09 21:59:00

Last updated 4 years ago

2020-05-21 17:41:00

Affected Software

Linux Kernel

Red Hat Enterprise Linux Desktop 6.0

6.0

RedHat Enterprise Linux Desktop 7.0

7.0

Red Hat Enterprise Linux Server 6.0

6.0

RedHat Enterprise Linux Server 7.0

7.0

Red Hat Enterprise Linux Advanced mission critical Update Support (AUS) 7.3

7.3

Red Hat Enterprise Linux Server Advanced mission critical Update Support (AUS) 7.4

7.4

Red Hat Enterprise Linux Server Advanced mission critical Update Support (AUS) 7.6

7.6

Red Hat Enterprise Linux Server EUS 7.2

7.2

Red Hat Enterprise Linux Server Extended Update Support (EUS) 7.3

7.3

Red Hat Enterprise Linux Server Extended Update Support (EUS) 7.4

7.4

Red Hat Enterprise Linux Server Extended Update Support (EUS) 7.5

7.5

Red Hat Enterprise Linux Server Extended Update Support (EUS) 7.6

7.6

Red Hat Enterprise Linux Server Telecommunications Update Service (TUS) 6.6

6.6

Red Hat Enterprise Linux Server Telecommunications Update Service (TUS) 7.6

7.6

Red Hat Enterprise Linux Workstation 6.0

6.0

RedHat Enterprise Linux Workstation 7.0

7.0

OpenSUSE 13.1

13.1

Fedora 20

20

Fedora 21

21

Debian Linux 7.0

7.0

Debian Linux 8.0 (Jessie)

8.0

Canonical Ubuntu Linux 10.04 LTS

10.04

Canonical Ubuntu Linux 12.04 LTS

12.04

Canonical Ubuntu Linux 14.04 LTS (Long-Term Support)

14.04

Canonical Ubuntu Linux 14.10

14.10

References

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a3a8784454692dd72e5d5d34dcdab17b4420e74c

FEDORA-2015-0517

FEDORA-2015-0515

openSUSE-SU-2015:0714

RHSA-2015:0864

RHSA-2015:1137

RHSA-2015:1138

DSA-3128

MDVSA-2015:058

[oss-security] 20150106 CVE-2014-9529 - Linux kernel security/keys/gc.c race condition

71880

1036763

USN-2511-1

USN-2512-1

USN-2513-1

USN-2514-1

USN-2515-1

USN-2516-1

USN-2517-1

USN-2518-1

https://bugzilla.redhat.com/show_bug.cgi?id=1179813

linux-kernel-cve20149529-dos(99641)

https://github.com/torvalds/linux/commit/a3a8784454692dd72e5d5d34dcdab17b4420e74c

Vendor Advisory

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a3a8784454692dd72e5d5d34dcdab17b4420e74c

Patch, Vendor Advisory

FEDORA-2015-0517

Third Party Advisory

FEDORA-2015-0515

Third Party Advisory

openSUSE-SU-2015:0714

Mailing List, Third Party Advisory

RHSA-2015:0864

Third Party Advisory

RHSA-2015:1137

Third Party Advisory

RHSA-2015:1138

Third Party Advisory

DSA-3128

Third Party Advisory

MDVSA-2015:058

Third Party Advisory

[oss-security] 20150106 CVE-2014-9529 - Linux kernel security/keys/gc.c race condition

Mailing List, Patch, Third Party Advisory

71880

Third Party Advisory, VDB Entry

1036763

Third Party Advisory, VDB Entry

USN-2511-1

Third Party Advisory

USN-2512-1

Third Party Advisory

USN-2513-1

Third Party Advisory

USN-2514-1

Third Party Advisory

USN-2515-1

Third Party Advisory

USN-2516-1

Third Party Advisory

USN-2517-1

Third Party Advisory

USN-2518-1

Third Party Advisory

https://bugzilla.redhat.com/show_bug.cgi?id=1179813

Issue Tracking, Patch, Third Party Advisory

linux-kernel-cve20149529-dos(99641)

Third Party Advisory, VDB Entry

https://github.com/torvalds/linux/commit/a3a8784454692dd72e5d5d34dcdab17b4420e74c

Patch, Third Party Advisory

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.