CVE-2022-49755 json
usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait
published 2025-03-27 19 mo ago modified 2026-08-05 3 mo ago also EUVD-2022-55168
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 14%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- Linux Linux 4.14.305, 4.19.272, 5.4.231, 5.10.166, 5.15.91, 6.1.9, 6.2
- linux Debian 14, Debian 13, Debian 12 6.1.11-1
debian advisories DEBIAN-CVE-2022-49755
- linux Ubuntu 18.04 LTS 4.15.0-209.220
- linux Ubuntu 20.04 LTS 5.4.0-147.164
- linux Ubuntu 22.04 LTS 5.15.0-70.77
- linux-aws Ubuntu 18.04 LTS 4.15.0-1154.167
- linux-aws Ubuntu 20.04 LTS 5.4.0-1100.108
- linux-aws Ubuntu 22.04 LTS 5.15.0-1034.38
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1103.112
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1032.40
ubuntu advisories UBUNTU-CVE-2022-49755
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-64kb SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS, SLE High Performance Computing 15 SP5-ESPOS 5.14.21-150500.55.100.1
- kernel-syms SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.100.1
- kernel-source SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.100.1
- kernel-default SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +3 more 5.14.21-150500.55.100.1
- kernel-obs-build SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.100.1
- kernel-default-base SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.100.1.150500.6.47.1
- kernel-64kb SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS, SLE High Performance Computing 15 SP4-ESPOS 5.14.21-150400.24.161.1
- kernel-syms SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +3 more 5.14.21-150400.24.161.1
suse advisories SUSE-SU-2025:1241-1SUSE-SU-2025:1195-1SUSE-SU-2025:1183-1SUSE-SU-2025:1176-1
- git.kernel.org/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2 commit
- git.kernel.org/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4 commit
- git.kernel.org/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064 commit
- git.kernel.org/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78 commit
- git.kernel.org/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a commit
- git.kernel.org/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217 commit
- git.kernel.org/stable/c/6a19da111057f69214b97c62fb0ac59023970850 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-49755 updated cvss 7.8
kernel: usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 19 mo ago
Exploit prediction
0.23% chance of exploitation in the next 30 days, higher than 14% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA ADP | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2
patch
-
git.kernel.org
/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4
patch
-
git.kernel.org
/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064
patch
-
git.kernel.org
/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78
patch
-
git.kernel.org
/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a
patch
-
git.kernel.org
/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217
patch
-
git.kernel.org
/stable/c/6a19da111057f69214b97c62fb0ac59023970850
patch
Sources
- CVE List CVE-2022-49755
- NVD CVE-2022-49755
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.