CyberSecBulletin
CVE-2024-36894NVD status: Modified

Linux: Concurrent Execution using Shared Resource with Improper Synchronization

CVE-2024-36894 is a high-severity concurrent execution using shared resource with improper synchronization vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions f71a53148ce34898fef099b75386a3a9f4449311, 9e72ef59cbe61cd1243857a6418ca92104275867, e500b1c4e29ad0bd1c1332a1eaea2913627a92dd as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.2% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to f71a53148ce34898fef099b75386a3a9f4449311 or 9e72ef59cbe61cd1243857a6418ca92104275867 or e500b1c4e29ad0bd1c1332a1eaea2913627a92dd or 3613e5023f09b3308545e9d1acda86017ebd418a, whichever matches your release line, or a later version.
  2. Update linux_kernel to 73c05ad46bb4 or d74618308232 or 24729b307eef or f71a53148ce3, whichever matches your release line, or a later version.
  3. Update SIMATIC S7-1500 TM MFP - GNU/Linux subsystem to V1.1.1 or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, f71a53148ce34898fef099b75386a3a9f4449311; 2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, 9e72ef59cbe61cd1243857a6418ca92104275867; 2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, e500b1c4e29ad0bd1c1332a1eaea2913627a92dd; 2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, 3613e5023f09b3308545e9d1acda86017ebd418a; 2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, a0fdccb1c9e027e3195f947f61aa87d6d0d2ea14; 2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, 73c05ad46bb4fbbdb346004651576d1c8dbcffbb; 2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, d7461830823242702f5d84084bcccb25159003f4; 2e4c7553cd6f9c68bb741582dcb614edcbeca70f up to, but not including, 24729b307eefcd7c476065cd7351c1a018082c19; and 1 more rangesf71a53148ce34898fef099b75386a3a9f4449311, 9e72ef59cbe61cd1243857a6418ca92104275867, e500b1c4e29ad0bd1c1332a1eaea2913627a92dd, 3613e5023f09b3308545e9d1acda86017ebd418a, a0fdccb1c9e027e3195f947f61aa87d6d0d2ea14, 73c05ad46bb4fbbdb346004651576d1c8dbcffbb
Linuxlinux_kernel2e4c7553cd6f up to, but not including, 73c05ad46bb4; 2e4c7553cd6f up to, but not including, d74618308232; 2e4c7553cd6f up to, but not including, 24729b307eef; 2e4c7553cd6f up to, but not including, f71a53148ce3; 2e4c7553cd6f up to, but not including, 9e72ef59cbe6; 2e4c7553cd6f up to, but not including, e500b1c4e29a; 2e4c7553cd6f up to, but not including, 3613e5023f09; 2e4c7553cd6f up to, but not including, a0fdccb1c9e0; and 1 more ranges73c05ad46bb4, d74618308232, 24729b307eef, f71a53148ce3, 9e72ef59cbe6, e500b1c4e29a
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystembefore V1.1.1V1.1.1

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by CNA.

Scoring systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.15.6MediumCISA (ADP)

Official description

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete FFS based applications can utilize the aio_cancel() callback to dequeue pending USB requests submitted to the UDC. There is a scenario where the FFS application issues an AIO cancel call, while the UDC is handling a soft disconnect. For a DWC3 based implementation, the callstack looks like the following: DWC3 Gadget FFS Application dwc3_gadget_soft_disconnect() ... --> dwc3_stop_active_transfers() --> dwc3_gadget_giveback(-ESHUTDOWN) --> ffs_epfile_async_io_complete() ffs_aio_cancel() --> usb_ep_free_request() --> usb_ep_dequeue() There is currently no locking implemented between the AIO completion handler and AIO cancel, so the issue occurs if the completion routine is running in parallel to an AIO cancel call coming from the FFS application. As the completion call frees the USB request (io_data->req) the FFS application is also referencing it for the usb_ep_dequeue() call. This can lead to accessing a stale/hanging pointer. commit b566d38857fc ("usb: gadget: f_fs: use io_data->status consistently") relocated the usb_ep_free_request() into ffs_epfile_async_io_complete(). However, in order to properly implement locking to mitigate this issue, the spinlock can't be added to ffs_epfile_async_io_complete(), as usb_ep_dequeue() (if successfully dequeuing a USB request) will call the function driver's completion handler in the same context. Hence, leading into a deadlock. Fix this issue by moving the usb_ep_free_request() back to ffs_user_copy_worker(), and ensuring that it explicitly sets io_data->req to NULL after freeing it within the ffs->eps_lock. This resolves the race condition above, as the ffs_aio_cancel() routine will not continue attempting to dequeue a request that has already been freed, or the ffs_user_copy_work() not freeing the USB request until the AIO cancel is done referencing it. This fix depends on commit b566d38857fc ("usb: gadget: f_fs: use io_data->status consistently")

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Concurrent Execution using Shared Resource with Improper Synchronization

The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.

How developers prevent this class of flaw

  • In languages that support it, use synchronization primitives. Only wrap these around critical code to minimize the impact on performance.
  • Use thread-safe capabilities such as the data access abstraction in Spring.
  • Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring. Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).

More Concurrent Execution using Shared Resource with Improper Synchronization vulnerabilities (CWE-362)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Concurrent Execution using Shared Resource with Improper Synchronization vulnerabilities

Spotted an error? Tell us.