CVE-2022-49755
Linux Kernel USB Gadget Use-After-Free Vulnerability
Description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait While performing fast composition switch, there is a possibility that the process of ffs_ep0_write/ffs_ep0_read get into a race condition due to ep0req being freed up from functionfs_unbind. Consider the scenario that the ffs_ep0_write calls the ffs_ep0_queue_wait by taking a lock &ffs->ev.waitq.lock. However, the functionfs_unbind isn't bounded so it can go ahead and mark the ep0req to NULL, and since there is no NULL check in ffs_ep0_queue_wait we will end up in use-after-free. Fix this by making a serialized execution between the two functions using a mutex_lock(ffs->mutex).
INFO
Published Date :
March 27, 2025, 5:15 p.m.
Last Modified :
April 1, 2025, 3:40 p.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
5.9
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2022-49755
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2022-49755
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2022-49755
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Apr. 01, 2025
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:6.2:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.2:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.2:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.2:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.91 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.1.9 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 2.6.35 up to (excluding) 4.14.305 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.15 up to (excluding) 4.19.272 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20 up to (excluding) 5.4.231 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.166 Added Reference Type kernel.org: https://git.kernel.org/stable/c/6a19da111057f69214b97c62fb0ac59023970850 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2 Types: Patch -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Mar. 28, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Added CWE CWE-416 -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Mar. 27, 2025
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait While performing fast composition switch, there is a possibility that the process of ffs_ep0_write/ffs_ep0_read get into a race condition due to ep0req being freed up from functionfs_unbind. Consider the scenario that the ffs_ep0_write calls the ffs_ep0_queue_wait by taking a lock &ffs->ev.waitq.lock. However, the functionfs_unbind isn't bounded so it can go ahead and mark the ep0req to NULL, and since there is no NULL check in ffs_ep0_queue_wait we will end up in use-after-free. Fix this by making a serialized execution between the two functions using a mutex_lock(ffs->mutex). Added Reference https://git.kernel.org/stable/c/6a19da111057f69214b97c62fb0ac59023970850 Added Reference https://git.kernel.org/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217 Added Reference https://git.kernel.org/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78 Added Reference https://git.kernel.org/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064 Added Reference https://git.kernel.org/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a Added Reference https://git.kernel.org/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4 Added Reference https://git.kernel.org/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2022-49755
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2022-49755
weaknesses.