CVE-2018-8897 - Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Severity

72%

Complexity

39%

Confidentiality

165%

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

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).

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 6 years ago

2018-05-08 18:29:00

Last updated 5 years ago

2019-10-03 00:03:00

Affected Software

Debian Linux 7.0

7.0

Debian Linux 8.0 (Jessie)

8.0

Debian Linux 9.0

9.0

Canonical Ubuntu Linux 14.04 LTS (Long-Term Support)

14.04

Canonical Ubuntu Linux 16.04 LTS (Long-Term Support)

16.04

Canonical Ubuntu Linux 17.10

17.10

RedHat Enterprise Linux Server 7.0

7.0

RedHat Enterprise Linux Workstation 7.0

7.0

Red Hat Enterprise Virtualization Manager (aka RHEV-M) 3.0

3.0

Citrix XenServer 6.0.2

6.0.2

Citrix XenServer 7.0

7.0

Citrix XenServer 7.1

7.1

Citrix XenServer 7.2

7.2

Citrix XenServer 7.3

7.3

Citrix XenServer 7.4

7.4

Apple Mac OS X

FreeBSD

References

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9

Patch, Third Party Advisory

http://openwall.com/lists/oss-security/2018/05/08/1

Mailing List, Third Party Advisory

http://openwall.com/lists/oss-security/2018/05/08/4

Mailing List, Third Party Advisory

http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20190921-01-debug-en

104071

Third Party Advisory, VDB Entry

1040744

Third Party Advisory, VDB Entry

1040849

Third Party Advisory, VDB Entry

1040861

Third Party Advisory, VDB Entry

1040866

Third Party Advisory, VDB Entry

1040882

Third Party Advisory, VDB Entry

RHSA-2018:1318

Third Party Advisory

RHSA-2018:1319

Third Party Advisory

RHSA-2018:1345

Third Party Advisory

RHSA-2018:1346

Third Party Advisory

RHSA-2018:1347

Third Party Advisory

RHSA-2018:1348

Third Party Advisory

RHSA-2018:1349

Third Party Advisory

RHSA-2018:1350

Third Party Advisory

RHSA-2018:1351

Third Party Advisory

RHSA-2018:1352

Third Party Advisory

RHSA-2018:1353

Third Party Advisory

RHSA-2018:1354

Third Party Advisory

RHSA-2018:1355

Third Party Advisory

RHSA-2018:1524

Third Party Advisory

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

Issue Tracking, Third Party Advisory

https://github.com/can1357/CVE-2018-8897/

Exploit, Third Party Advisory

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

Patch, Third Party Advisory

https://help.ecostruxureit.com/display/public/UADCE725/Security+fixes+in+StruxureWare+Data+Center+Expert+v7.6.0

[debian-lts-announce] 20180525 [SECURITY] [DLA 1383-1] xen security update

Third Party Advisory

[debian-lts-announce] 20180601 [SECURITY] [DLA 1392-1] linux security update

Third Party Advisory

[debian-lts-announce] 20181112 [SECURITY] [DLA 1577-1] xen security update

https://patchwork.kernel.org/patch/10386677/

Patch, Third Party Advisory

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8897

Patch, Third Party Advisory, Vendor Advisory

https://security.netapp.com/advisory/ntap-20180927-0002/

https://support.apple.com/HT208742

Third Party Advisory

https://support.citrix.com/article/CTX234679

Third Party Advisory

https://svnweb.freebsd.org/base?view=revision&revision=333368

Third Party Advisory

USN-3641-1

Third Party Advisory

USN-3641-2

Third Party Advisory

DSA-4196

Third Party Advisory

DSA-4201

Third Party Advisory

44697

Exploit, Third Party Advisory, VDB Entry

45024

https://www.freebsd.org/security/advisories/FreeBSD-SA-18:06.debugreg.asc

Third Party Advisory

VU#631579

https://www.synology.com/support/security/Synology_SA_18_21

Third Party Advisory

https://www.triplefault.io/2018/05/spurious-db-exceptions-with-pop-ss.html

Third Party Advisory

https://xenbits.xen.org/xsa/advisory-260.html

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.