CWE-362
Allowed-with-ReviewConcurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Abstraction: Class · Status: Draft
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.
2921 vulnerabilities reference this CWE, most recent first.
GHSA-GQ3J-R743-MX26
Vulnerability from github – Published: 2022-05-14 02:35 – Updated: 2022-05-14 02:35Race condition in the thread-creation implementation in win32k.sys in the kernel-mode drivers in Microsoft Windows XP SP3 allows local users to gain privileges via a crafted application, aka "Win32k.sys Race Condition Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2012-1868"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-06-12T22:55:00Z",
"severity": "MODERATE"
},
"details": "Race condition in the thread-creation implementation in win32k.sys in the kernel-mode drivers in Microsoft Windows XP SP3 allows local users to gain privileges via a crafted application, aka \"Win32k.sys Race Condition Vulnerability.\"",
"id": "GHSA-gq3j-r743-mx26",
"modified": "2022-05-14T02:35:15Z",
"published": "2022-05-14T02:35:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-1868"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2012/ms12-041"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A15647"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA12-164A.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQ4H-F254-7CW9
Vulnerability from github – Published: 2021-08-25 21:00 – Updated: 2026-01-23 22:53Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-77m6-x95j-75r5. This link is maintained to preserve external references.
Original Description
Affected versions of this crate unconditionally implemented Send for ReadTicket<T> & WriteTicket<T>.
This allows to send non-Send T to other threads.
This can allows creating data races by cloning types with internal mutability and sending them to other threads (as T of ReadTicket<T>/WriteTicket<T>). Such data races can cause memory corruption or other undefined behavior.
The flaw was corrected in commit a986a93 by adding T: Send bounds to Send impls of ReadTicket<T>/WriteTicket<T>.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "ticketed_lock"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": true,
"github_reviewed_at": "2021-08-05T21:48:24Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-77m6-x95j-75r5. This link is maintained to preserve external references.\n\n## Original Description\nAffected versions of this crate unconditionally implemented `Send` for `ReadTicket\u003cT\u003e` \u0026 `WriteTicket\u003cT\u003e`.\nThis allows to send non-Send `T` to other threads.\n\nThis can allows creating data races by cloning types with internal mutability and sending them to other threads (as `T` of `ReadTicket\u003cT\u003e`/`WriteTicket\u003cT\u003e`). Such data races can cause memory corruption or other undefined behavior.\n\nThe flaw was corrected in commit `a986a93` by adding `T: Send` bounds to `Send` impls of `ReadTicket\u003cT\u003e`/`WriteTicket\u003cT\u003e`.",
"id": "GHSA-gq4h-f254-7cw9",
"modified": "2026-01-23T22:53:30Z",
"published": "2021-08-25T21:00:34Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/kvark/ticketed_lock/issues/7"
},
{
"type": "WEB",
"url": "https://github.com/kvark/ticketed_lock/commit/a986a9335d591fa5c826157d1674d47aa525357f"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2020-0119.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Duplicate Advisory: Data races in ticketed_lock",
"withdrawn": "2026-01-23T22:53:29Z"
}
GHSA-GQ83-8Q7Q-9HFX
Vulnerability from github – Published: 2026-03-03 23:32 – Updated: 2026-04-24 20:58Impact
Concurrent updateRegistry/removeRegistryEntry operations for sandbox containers and browsers could lose updates or resurrect removed entries under race conditions.
The registry writes were read-modify-write in a window with no locking and permissive fallback parsing, so concurrent registry updates could produce stale snapshots and overwrite each other.
That desyncs sandbox state and can affect sandbox list, sandbox prune, and sandbox recreate --all behavior.
Affected Packages / Versions
- Package:
openclaw(npm) - Affected versions:
<= 2026.2.17 - Patched versions:
2026.2.18
Fix Commit(s)
cc29be8c9
OpenClaw thanks @kexinoh for reporting.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.2.19"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-32018"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-03T23:32:49Z",
"nvd_published_at": "2026-03-19T22:16:35Z",
"severity": "MODERATE"
},
"details": "## Impact\n\nConcurrent `updateRegistry`/`removeRegistryEntry` operations for sandbox containers and browsers could lose updates or resurrect removed entries under race conditions.\n\nThe registry writes were read-modify-write in a window with no locking and permissive fallback parsing, so concurrent registry updates could produce stale snapshots and overwrite each other.\n\nThat desyncs sandbox state and can affect `sandbox list`, `sandbox prune`, and `sandbox recreate --all` behavior.\n\n## Affected Packages / Versions\n\n- Package: `openclaw` (npm)\n- Affected versions: `\u003c= 2026.2.17`\n- Patched versions: `2026.2.18`\n\n## Fix Commit(s)\n\n- `cc29be8c9`\n\nOpenClaw thanks @kexinoh for reporting.",
"id": "GHSA-gq83-8q7q-9hfx",
"modified": "2026-04-24T20:58:29Z",
"published": "2026-03-03T23:32:49Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-gq83-8q7q-9hfx"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32018"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/cc29be8c9"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/cc29be8c9bcdfaecb90f0ab13124c8f5362a6741"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-race-condition-in-sandbox-registry-write-operations"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OpenClaw\u0027s serialize sandbox registry writes to prevent races and delete-rollback corruption"
}
GHSA-GQ8H-7HR7-25CG
Vulnerability from github – Published: 2022-05-17 02:50 – Updated: 2022-05-17 02:50The _checkPolkitPrivilege function in serviceHelper.py in Back In Time (aka backintime) 1.1.18 and earlier uses a deprecated polkit authorization method (unix-process) that is subject to a race condition (time of check, time of use). With this authorization method, the owner of a process requesting a polkit operation is checked by polkitd via /proc//status, by which time the requesting process may have been replaced by a different process with the same PID that has different privileges then the original requester.
{
"affected": [],
"aliases": [
"CVE-2017-7572"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-04-06T18:59:00Z",
"severity": "HIGH"
},
"details": "The _checkPolkitPrivilege function in serviceHelper.py in Back In Time (aka backintime) 1.1.18 and earlier uses a deprecated polkit authorization method (unix-process) that is subject to a race condition (time of check, time of use). With this authorization method, the owner of a process requesting a polkit operation is checked by polkitd via /proc/\u003cpid\u003e/status, by which time the requesting process may have been replaced by a different process with the same PID that has different privileges then the original requester.",
"id": "GHSA-gq8h-7hr7-25cg",
"modified": "2022-05-17T02:50:37Z",
"published": "2022-05-17T02:50:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-7572"
},
{
"type": "WEB",
"url": "https://github.com/bit-team/backintime/commit/7f208dc547f569b689c888103e3b593a48cd1869"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-GQGP-HH7H-FH5J
Vulnerability from github – Published: 2022-03-26 00:00 – Updated: 2022-04-08 00:00A use-after-free flaw was found in nci_request in net/nfc/nci/core.c in NFC Controller Interface (NCI) in the Linux kernel. This flaw could allow a local attacker with user privileges to cause a data race problem while the device is getting removed, leading to a privilege escalation problem.
{
"affected": [],
"aliases": [
"CVE-2021-4202"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-03-25T19:15:00Z",
"severity": "HIGH"
},
"details": "A use-after-free flaw was found in nci_request in net/nfc/nci/core.c in NFC Controller Interface (NCI) in the Linux kernel. This flaw could allow a local attacker with user privileges to cause a data race problem while the device is getting removed, leading to a privilege escalation problem.",
"id": "GHSA-gqgp-hh7h-fh5j",
"modified": "2022-04-08T00:00:39Z",
"published": "2022-03-26T00:00:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4202"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2036682"
},
{
"type": "WEB",
"url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3e3b5dfcd16a3e254aab61bd1e8c417dd4503102"
},
{
"type": "WEB",
"url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=48b71a9e66c2eab60564b1b1c85f4928ed04e406"
},
{
"type": "WEB",
"url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=86cdf8e38792545161dbe3350a7eced558ba4d15"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20220513-0002"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2022/06/01/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2022/06/04/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2022/06/07/2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-GQP4-WW82-42W3
Vulnerability from github – Published: 2022-05-17 02:39 – Updated: 2022-05-17 02:39Race condition in the _get_masked_mode function in Lib/os.py in Python 3.2 through 3.5, when exist_ok is set to true and multiple threads are used, might allow local users to bypass intended file permissions by leveraging a separate application vulnerability before the umask has been set to the expected value.
{
"affected": [],
"aliases": [
"CVE-2014-2667"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-11-16T01:59:00Z",
"severity": "LOW"
},
"details": "Race condition in the _get_masked_mode function in Lib/os.py in Python 3.2 through 3.5, when exist_ok is set to true and multiple threads are used, might allow local users to bypass intended file permissions by leveraging a separate application vulnerability before the umask has been set to the expected value.",
"id": "GHSA-gqp4-ww82-42w3",
"modified": "2022-05-17T02:39:09Z",
"published": "2022-05-17T02:39:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-2667"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/201503-10"
},
{
"type": "WEB",
"url": "http://bugs.python.org/issue21082"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-updates/2014-05/msg00007.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-updates/2014-05/msg00008.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2014/03/28/15"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2014/03/29/5"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2014/03/30/4"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQPG-3VHQ-Q494
Vulnerability from github – Published: 2026-04-02 21:32 – Updated: 2026-04-02 21:32A race condition was addressed with additional validation. This issue is fixed in macOS Sequoia 15.1. An app may be able to break out of its sandbox.
{
"affected": [],
"aliases": [
"CVE-2024-40849"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-02T19:17:57Z",
"severity": "HIGH"
},
"details": "A race condition was addressed with additional validation. This issue is fixed in macOS Sequoia 15.1. An app may be able to break out of its sandbox.",
"id": "GHSA-gqpg-3vhq-q494",
"modified": "2026-04-02T21:32:52Z",
"published": "2026-04-02T21:32:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-40849"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/121564"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-GQQ9-63P6-624H
Vulnerability from github – Published: 2022-05-17 02:42 – Updated: 2022-05-17 02:42In the Embedded File System in all Android releases from CAF using the Linux kernel, a Time-of-Check Time-of-Use Race Condition vulnerability could potentially exist.
{
"affected": [],
"aliases": [
"CVE-2014-9941"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-06-06T14:29:00Z",
"severity": "HIGH"
},
"details": "In the Embedded File System in all Android releases from CAF using the Linux kernel, a Time-of-Check Time-of-Use Race Condition vulnerability could potentially exist.",
"id": "GHSA-gqq9-63p6-624h",
"modified": "2022-05-17T02:42:15Z",
"published": "2022-05-17T02:42:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-9941"
},
{
"type": "WEB",
"url": "https://source.android.com/security/bulletin/2017-05-01"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/98242"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-GQXP-FJ3H-CR3V
Vulnerability from github – Published: 2026-06-24 18:32 – Updated: 2026-07-14 21:31In the Linux kernel, the following vulnerability has been resolved:
ice: fix race condition in TX timestamp ring cleanup
Fix a race condition between ice_free_tx_tstamp_ring() and ice_tx_map() that can cause a NULL pointer dereference.
ice_free_tx_tstamp_ring currently clears the ICE_TX_FLAGS_TXTIME flag after NULLing the tstamp_ring. This could allow a concurrent ice_tx_map call on another CPU to dereference the tstamp_ring, which could lead to a NULL pointer dereference.
| CPU A:ice_free_tx_tstamp_ring() | CPU B:ice_tx_map() |
|---|---|
| tx_ring->tstamp_ring = NULL | |
| ice_is_txtime_cfg() -> true | |
| tstamp_ring = tx_ring->tstamp_ring | |
| tstamp_ring->count // NULL deref! | |
| flags &= ~ICE_TX_FLAGS_TXTIME |
Fix by: 1. Reordering ice_free_tx_tstamp_ring() to clear the flag before NULLing the pointer, with smp_wmb() to ensure proper ordering. 2. Adding smp_rmb() in ice_tx_map() after the flag check to order the flag read before the pointer read, using READ_ONCE() for the pointer, and adding a NULL check as a safety net. 3. Converting tx_ring->flags from u8 to DECLARE_BITMAP() and using atomic bitops (set_bit(), clear_bit(), test_bit()) for all flag operations throughout the driver: - ICE_TX_RING_FLAGS_XDP - ICE_TX_RING_FLAGS_VLAN_L2TAG1 - ICE_TX_RING_FLAGS_VLAN_L2TAG2 - ICE_TX_RING_FLAGS_TXTIME
{
"affected": [],
"aliases": [
"CVE-2026-53008"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-24T17:17:12Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nice: fix race condition in TX timestamp ring cleanup\n\nFix a race condition between ice_free_tx_tstamp_ring() and ice_tx_map()\nthat can cause a NULL pointer dereference.\n\nice_free_tx_tstamp_ring currently clears the ICE_TX_FLAGS_TXTIME flag\nafter NULLing the tstamp_ring. This could allow a concurrent ice_tx_map\ncall on another CPU to dereference the tstamp_ring, which could lead to\na NULL pointer dereference.\n\n CPU A:ice_free_tx_tstamp_ring() | CPU B:ice_tx_map()\n --------------------------------|---------------------------------\n tx_ring-\u003etstamp_ring = NULL |\n | ice_is_txtime_cfg() -\u003e true\n | tstamp_ring = tx_ring-\u003etstamp_ring\n | tstamp_ring-\u003ecount // NULL deref!\n flags \u0026= ~ICE_TX_FLAGS_TXTIME |\n\nFix by:\n1. Reordering ice_free_tx_tstamp_ring() to clear the flag before\n NULLing the pointer, with smp_wmb() to ensure proper ordering.\n2. Adding smp_rmb() in ice_tx_map() after the flag check to order the\n flag read before the pointer read, using READ_ONCE() for the\n pointer, and adding a NULL check as a safety net.\n3. Converting tx_ring-\u003eflags from u8 to DECLARE_BITMAP() and using\n atomic bitops (set_bit(), clear_bit(), test_bit()) for all flag\n operations throughout the driver:\n - ICE_TX_RING_FLAGS_XDP\n - ICE_TX_RING_FLAGS_VLAN_L2TAG1\n - ICE_TX_RING_FLAGS_VLAN_L2TAG2\n - ICE_TX_RING_FLAGS_TXTIME",
"id": "GHSA-gqxp-fj3h-cr3v",
"modified": "2026-07-14T21:31:28Z",
"published": "2026-06-24T18:32:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-53008"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/097409d20465723283632515df73038a4a853eda"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/7c72ec18c2a4111204c2e915f8e4f6d849ce9398"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-GR49-4MW7-963Q
Vulnerability from github – Published: 2024-05-17 15:31 – Updated: 2025-12-23 21:30In the Linux kernel, the following vulnerability has been resolved:
eeprom: at24: fix memory corruption race condition
If the eeprom is not accessible, an nvmem device will be registered, the read will fail, and the device will be torn down. If another driver accesses the nvmem device after the teardown, it will reference invalid memory.
Move the failure point before registering the nvmem device.
{
"affected": [],
"aliases": [
"CVE-2024-35848"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-17T15:15:21Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\neeprom: at24: fix memory corruption race condition\n\nIf the eeprom is not accessible, an nvmem device will be registered, the\nread will fail, and the device will be torn down. If another driver\naccesses the nvmem device after the teardown, it will reference\ninvalid memory.\n\nMove the failure point before registering the nvmem device.",
"id": "GHSA-gr49-4mw7-963q",
"modified": "2025-12-23T21:30:18Z",
"published": "2024-05-17T15:31:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-35848"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/26d32bec4c6d255a03762f33c637bfa3718be15a"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/2af84c46b9b8f2d6c0f88d09ee5c849ae1734676"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/6d8b56ec0c8f30d5657382f47344a32569f7a9bc"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c43e5028f5a35331eb25017f5ff6cc21735005c6"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c850f71fca09ea41800ed55905980063d17e01da"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/f42c97027fb75776e2e9358d16bf4a99aeb04cf2"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00019.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
In languages that support it, use synchronization primitives. Only wrap these around critical code to minimize the impact on performance.
Mitigation
Use thread-safe capabilities such as the data access abstraction in Spring.
Mitigation
- 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).
Mitigation
When using multithreading and operating on shared variables, only use thread-safe functions.
Mitigation
Use atomic operations on shared variables. Be wary of innocent-looking constructs such as "x++". This may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read, followed by a computation, followed by a write.
Mitigation
Use a mutex if available, but be sure to avoid related weaknesses such as CWE-412.
Mitigation
Avoid double-checked locking (CWE-609) and other implementation errors that arise when trying to avoid the overhead of synchronization.
Mitigation
Disable interrupts or signals over critical parts of the code, but also make sure that the code does not go into a large or infinite loop.
Mitigation
Use the volatile type modifier for critical variables to avoid unexpected compiler optimization or reordering. This does not necessarily solve the synchronization problem, but it can help.
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
CAPEC-26: Leveraging Race Conditions
The adversary targets a race condition occurring when multiple processes access and manipulate the same resource concurrently, and the outcome of the execution depends on the particular order in which the access takes place. The adversary can leverage a race condition by "running the race", modifying the resource and modifying the normal execution flow. For instance, a race condition can occur while accessing a file: the adversary can trick the system by replacing the original file with their version and cause the system to read the malicious file.
CAPEC-29: Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions
This attack targets a race condition occurring between the time of check (state) for a resource and the time of use of a resource. A typical example is file access. The adversary can leverage a file access race condition by "running the race", meaning that they would modify the resource between the first time the target program accesses the file and the time the target program uses the file. During that period of time, the adversary could replace or modify the file, causing the application to behave unexpectedly.