6.7 CVE-2023-21400
In multiple functions of io_uring.c, there is a possible kernel memory corruption due to improper locking. This could lead to local escalation of privilege in the kernel with System execution privileges needed. User interaction is not needed for exploitation.
https://nvd.nist.gov/vuln/detail/CVE-2023-21400
Categories
CWE-667 : Improper Locking
The product does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.) Use industry standard APIs to implement locking mechanism. Chain: improper locking (CWE-667) leads to race condition (CWE-362), as exploited in the wild per CISA KEV. Attacker provides invalid address to a memory-reading function, causing a mutex to be unlocked twice function in OS kernel unlocks a mutex that was not previously locked, causing a panic or overwrite of arbitrary memory. Chain: OS kernel does not properly handle a failure of a function call (CWE-755), leading to an unlock of a resource that was not locked (CWE-832), with resultant crash. OS kernel performs an unlock in some incorrect circumstances, leading to panic. OS deadlock OS deadlock involving 3 separate functions deadlock in library deadlock triggered by packets that force collisions in a routing table read/write deadlock between web server and script web server deadlock involving multiple listening connections multiple simultaneous calls to the same function trigger deadlock. chain: other weakness leads to NULL pointer dereference (CWE-476) or deadlock (CWE-833). deadlock when an operation is performed on a resource while it is being removed. Deadlock in device driver triggered by using file handle of a related device. Deadlock when large number of small messages cannot be processed quickly enough. OS kernel has deadlock triggered by a signal during a core dump. Race condition leads to deadlock. Chain: array index error (CWE-129) leads to deadlock (CWE-833) Program can not execute when attacker obtains a mutex. Program can not execute when attacker obtains a lock on a critical output file. Program can not execute when attacker obtains a lock on a critical output file. Critical file can be opened with exclusive read access by user, preventing application of security policy. Possibly related to improper permissions, large-window race condition. Chain: predictable file names used for locking, allowing attacker to create the lock beforehand. Resultant from permissions and randomness. Chain: Lock files with predictable names. Resultant from randomness. Product does not check if it can write to a log file, allowing attackers to avoid logging by accessing the file using an exclusive lock. Overlaps unchecked error condition. This is not quite CWE-412, but close.
References
CPE
cpe |
start |
end |
Configuration 1 |
cpe:2.3:o:google:android:-:*:*:*:*:*:*:* |
|
|
Configuration 2 |
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
|
|
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* |
|
|
REMEDIATION
EXPLOITS
Exploit-db.com
id |
description |
date |
|
No known exploits |
POC Github
Other Nist (github, ...)
CAPEC
Common Attack Pattern Enumerations and Classifications
id |
description |
severity |
25 |
Forced Deadlock
The adversary triggers and exploits a deadlock condition in the target software to cause a denial of service. A deadlock can occur when two or more competing actions are waiting for each other to finish, and thus neither ever does. Deadlock conditions can be difficult to detect. The adversary initiates an exploratory phase to get familiar with the system. The adversary triggers a first action (such as holding a resource) and initiates a second action which will wait for the first one to finish. If the target program has a deadlock condition, the program waits indefinitely resulting in a denial of service. |
High |
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. The adversary explores to gauge what level of access they have. The adversary gains access to a resource on the target host. The adversary modifies the targeted resource. The resource's value is used to determine the next normal execution action. The resource is modified/checked concurrently by multiple processes. By using one of the processes, the adversary is able to modify the value just before it is consumed by a different process. A race condition occurs and is exploited by the adversary to abuse the target host. |
High |
27 |
Leveraging Race Conditions via Symbolic Links
This attack leverages the use of symbolic links (Symlinks) in order to write to sensitive files. An attacker can create a Symlink link to a target file not otherwise accessible to them. When the privileged program tries to create a temporary file with the same name as the Symlink link, it will actually write to the target file pointed to by the attackers' Symlink link. If the attacker can insert malicious content in the temporary file they will be writing to the sensitive file by using the Symlink. The race occurs because the system checks if the temporary file exists, then creates the file. The attacker would typically create the Symlink during the interval between the check and the creation of the temporary file. [Verify that target host's platform supports symbolic links.] This attack pattern is only applicable on platforms that support symbolic links. [Examine application's file I/O behavior] Analyze the application's file I/O behavior to determine where it stores files, as well as the operations it performs to read/write files. [Verify ability to write to filesystem] The attacker verifies ability to write to the target host's file system. [Replace file with a symlink to a sensitive system file.] Between the time that the application checks to see if a file exists (or if the user has access to it) and the time the application actually opens the file, the attacker replaces the file with a symlink to a sensitive system file. |
High |
MITRE
Techniques
id |
description |
T1499.004 |
Endpoint Denial of Service: Application or System Exploitation |
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. |
Mitigations
id |
description |
M1037 |
Leverage services provided by Content Delivery Networks (CDN) or providers specializing in DoS mitigations to filter traffic upstream from services. Filter boundary traffic by blocking source addresses sourcing the attack, blocking ports that are being targeted, or blocking protocols being used for transport. |
© 2022 The MITRE Corporation. Esta obra se reproduce y distribuye con el permiso de The MITRE Corporation. |
Cybersecurity needs ?
Strengthen software security from the outset with our DevSecOps expertise
Integrate security right from the start of the software development cycle for more robust applications and greater customer confidence.
Our team of DevSecOps experts can help you secure your APIs, data pipelines, CI/CD chains, Docker containers and Kubernetes deployments.
Discover this offer