CVE-2022-48822
usb: f_fs: Fix use-after-free for epfile
Mitigation
- Upgrade Linux to 4.9 or later.
Who should check
- Anyone running Linux >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 32048f4be071f9a6966744243f1786f45bb22dc2; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < cfe5f6fd335d882bcc829a1c8a7d462a455c626e; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < c9fc422c9a43e3d58d246334a71f3390401781dc; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 0042178a69eb77a979e36a50dcce9794a3140ef8; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 72a8aee863af099d4434314c4536d6c9a61dcf3c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 3e078b18753669615301d946297bafd69294ad2c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < ebe2b1add1055b903e2acd86b290a85297edc0b3; 5cd8f6788ff34999dbd4cbec81a6adfc215e1e60; >= 4.8.10, < 4.9
- Anyone running Linux 4.9
Vulnerability facts
- Affected
- Linux >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 32048f4be071f9a6966744243f1786f45bb22dc2; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < cfe5f6fd335d882bcc829a1c8a7d462a455c626e; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < c9fc422c9a43e3d58d246334a71f3390401781dc; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 0042178a69eb77a979e36a50dcce9794a3140ef8; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 72a8aee863af099d4434314c4536d6c9a61dcf3c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 3e078b18753669615301d946297bafd69294ad2c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < ebe2b1add1055b903e2acd86b290a85297edc0b3; 5cd8f6788ff34999dbd4cbec81a6adfc215e1e60; >= 4.8.10, < 4.9; Linux 4.9
- Fixed in
- Linux 32048f4be071f9a6966744243f1786f45bb22dc2, Linux 0042178a69eb77a979e36a50dcce9794a3140ef8, Linux 72a8aee863af099d4434314c4536d6c9a61dcf3c, Linux 3e078b18753669615301d946297bafd69294ad2c, Linux 4.9
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.32% chance of exploitation in 30 days (percentile 17, 2026-11-26)
- CWE
- CWE-416
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: usb: f_fs: Fix use-after-free for epfile Consider a case where ffs_func_eps_disable is called from ffs_func_disable as part of composition switch and at the same time ffs_epfile_release get called from userspace. ffs_epfile_release will free up the read buffer and call ffs_data_closed which in turn destroys ffs->epfiles and mark it as NULL. While this was happening the driver has already initialized the local epfile in ffs_func_eps_disable which is now freed and waiting to acquire the spinlock. Once spinlock is acquired the driver proceeds with the stale value of epfile and tries to free the already freed read buffer causing use-after-free. Following is the illustration of the race: CPU1 CPU2 ffs_func_eps_disable epfiles (local copy) ffs_epfile_release ffs_data_closed if (last file closed) ffs_data_reset ffs_data_clear ffs_epfiles_destroy spin_lock dereference epfiles Fix this races by taking epfiles local copy & assigning it under spinlock and if epfiles(local) is null then update it in ffs->epfiles then finally destroy it. Extending the scope further from the race, protecting the ep related structures, and concurrent accesses.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 32048f4be071f9a6966744243f1786f45bb22dc2; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < cfe5f6fd335d882bcc829a1c8a7d462a455c626e; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < c9fc422c9a43e3d58d246334a71f3390401781dc; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 0042178a69eb77a979e36a50dcce9794a3140ef8; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 72a8aee863af099d4434314c4536d6c9a61dcf3c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 3e078b18753669615301d946297bafd69294ad2c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < ebe2b1add1055b903e2acd86b290a85297edc0b3; 5cd8f6788ff34999dbd4cbec81a6adfc215e1e60; >= 4.8.10, < 4.9 | — | cvelist |
| Linux | 4.9 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-48822. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-48822.md Affected: Linux >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 32048f4be071f9a6966744243f1786f45bb22dc2; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < cfe5f6fd335d882bcc829a1c8a7d462a455c626e; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < c9fc422c9a43e3d58d246334a71f3390401781dc; >= a9e6f83c2df199187a5248f… Fixed in: Linux 32048f4be071f9a6966744243f1786f45bb22dc2, Linux 0042178a69eb77a979e36a50dcce9794a3140ef8, Linux 72a8aee863af099d4434314c4536d6c9a61dcf3c, Linux 3e078b18753669615301d946297bafd69294ad2c, Linux 4.9 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/32048f4be071f9a6966744243f1786f45bb22dc2
- https://git.kernel.org/stable/c/cfe5f6fd335d882bcc829a1c8a7d462a455c626e
- https://git.kernel.org/stable/c/c9fc422c9a43e3d58d246334a71f3390401781dc
- https://git.kernel.org/stable/c/0042178a69eb77a979e36a50dcce9794a3140ef8
- https://git.kernel.org/stable/c/72a8aee863af099d4434314c4536d6c9a61dcf3c
- https://git.kernel.org/stable/c/3e078b18753669615301d946297bafd69294ad2c
- https://git.kernel.org/stable/c/ebe2b1add1055b903e2acd86b290a85297edc0b3
FAQ
Is CVE-2022-48822 being exploited?
There is no confirmed exploitation: CVE-2022-48822 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-48822?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2022-48822?
Linux >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 32048f4be071f9a6966744243f1786f45bb22dc2; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < cfe5f6fd335d882bcc829a1c8a7d462a455c626e; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < c9fc422c9a43e3d58d246334a71f3390401781dc; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 0042178a69eb77a979e36a50dcce9794a3140ef8; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 72a8aee863af099d4434314c4536d6c9a61dcf3c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < 3e078b18753669615301d946297bafd69294ad2c; >= a9e6f83c2df199187a5248f824f31b6787ae23ae, < ebe2b1add1055b903e2acd86b290a85297edc0b3; 5cd8f6788ff34999dbd4cbec81a6adfc215e1e60; >= 4.8.10, < 4.9; Linux 4.9.
Is there a fix for CVE-2022-48822?
Yes. Fixed in Linux 32048f4be071f9a6966744243f1786f45bb22dc2, Linux 0042178a69eb77a979e36a50dcce9794a3140ef8, Linux 72a8aee863af099d4434314c4536d6c9a61dcf3c, Linux 3e078b18753669615301d946297bafd69294ad2c, Linux 4.9. Upgrade Linux to 4.9 or later.
How do I check if I'm affected by CVE-2022-48822?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.