CVE-2022-48822
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2022-48822 is a use-after-free vulnerability in the Linux kernel's USB Function File System (ffs) component. The vulnerability occurs when ffsfuncepsdisable is called from ffsfuncdisable during a composition switch while ffsepfilerelease is simultaneously called from userspace. This race condition can lead to accessing already freed memory (NVD).

Technical details

The vulnerability stems from a race condition between two operations: when ffsepfilerelease frees the read buffer and calls ffsdataclosed (which destroys ffs->epfiles and marks it as NULL), while simultaneously ffsfunceps_disable has initialized a local epfile that is now freed but waiting to acquire the spinlock. Once the spinlock is acquired, the driver proceeds with the stale value of epfile and attempts to free an already freed read buffer, resulting in a use-after-free condition. The vulnerability has been assigned a CVSS v3.1 base score of 7.8 (HIGH) with vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability affects multiple versions of the Linux kernel from version 4.9 up to versions before 4.14.267, 4.19.230, 5.4.180, 5.10.101, 5.15.24, and 5.16.10. If exploited, this use-after-free vulnerability could potentially lead to privilege escalation, system crashes, or arbitrary code execution in the kernel context (NVD).

Mitigation and workarounds

The vulnerability has been fixed by modifying the code to take epfiles local copy and assign it under spinlock, and if epfiles(local) is null then update it in ffs->epfiles before finally destroying it. The fix extends protection to ep related structures and concurrent accesses. Multiple patches have been released for different kernel versions (Kernel Patch).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40343MEDIUM6.4
  • Linux KernelLinux Kernel
  • kernel-rt-modules-internal
NoYesDec 09, 2025
CVE-2025-40342MEDIUM6.4
  • Linux KernelLinux Kernel
  • kernel-debug-modules-extra
NoYesDec 09, 2025
CVE-2025-40341MEDIUM5.1
  • Linux KernelLinux Kernel
  • linux-nvidia-tegra
NoYesDec 09, 2025
CVE-2025-40345N/AN/A
  • Linux KernelLinux Kernel
  • kernel-headers
NoYesDec 12, 2025
CVE-2025-40344N/AN/A
  • Linux KernelLinux Kernel
  • linux-azure-6.14
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management