CVE-2022-49755
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
27/03/2025
Last modified:
01/04/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait<br />
<br />
While performing fast composition switch, there is a possibility that the<br />
process of ffs_ep0_write/ffs_ep0_read get into a race condition<br />
due to ep0req being freed up from functionfs_unbind.<br />
<br />
Consider the scenario that the ffs_ep0_write calls the ffs_ep0_queue_wait<br />
by taking a lock &ffs->ev.waitq.lock. However, the functionfs_unbind isn&#39;t<br />
bounded so it can go ahead and mark the ep0req to NULL, and since there<br />
is no NULL check in ffs_ep0_queue_wait we will end up in use-after-free.<br />
<br />
Fix this by making a serialized execution between the two functions using<br />
a mutex_lock(ffs->mutex).
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 2.6.35 (including) | 4.14.305 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.15 (including) | 4.19.272 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.231 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.166 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.91 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.9 (excluding) |
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:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/6a19da111057f69214b97c62fb0ac59023970850
- https://git.kernel.org/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217
- https://git.kernel.org/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78
- https://git.kernel.org/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064
- https://git.kernel.org/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a
- https://git.kernel.org/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4
- https://git.kernel.org/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2