CVE-2022-48821·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: misc: fastrpc: avoid double fput() on failed usercopy If the copy back to userland fails for the FASTRPC_IOCTL_ALLOC_DMA_BUFF ioctl(), we shouldn't assume that 'buf->dmabuf' is still valid. In fact, dma_buf_fd() called fd_install() before, i.e. "consumed" one reference, leaving us with none. Calling dma_buf_put() will therefore put a reference we no longer own, leading to a valid file descritor table entry for an already released 'file' object which is a straight use-after-free. Simply avoid calling dma_buf_put() and rely on the process exit code to do the necessary cleanup, if needed, i.e. if the file descriptor is still valid.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.16.10
- Published
- 2024-07-16
Affected versions
From: 5.16
Until: 5.16.10
Fixed in: 5.16.10
How to fix this CVE
Update your Linux kernel to version 5.16.10 or later to patch a use-after-free vulnerability in the FASTRPC driver. This flaw occurs when a DMA buffer allocation ioctl fails during userspace copy operations, causing a double file descriptor release that could lead to privilege escalation. Kernel versions 5.16 through 5.16.9 are affected and should be upgraded immediately.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and verify it is 5.16.10 or later
- Step 2: Confirm FASTRPC module is loaded by running `lsmod | grep fastrpc` (if output exists, the vulnerable component is present)
- Step 3: Search system logs for FASTRPC-related errors with `grep -i fastrpc /var/log/kern.log /var/log/syslog` to identify failed DMA buffer allocations
- Step 4: After patching, reboot the system and confirm the new kernel version runs with `uname -r`, then verify no FASTRPC allocation failures appear in post-reboot logs
FAQ
What is CVE-2022-48821?
CVE-2022-48821 is a use-after-free vulnerability in the Linux kernel's FASTRPC (Fast RPC) driver. When a DMA buffer allocation ioctl fails during data transfer back to userspace, the kernel incorrectly releases a file descriptor reference that was already consumed, leaving a dangling pointer that could be exploited for privilege escalation.
Is CVE-2022-48821 being actively exploited?
No, there are no confirmed active exploits or public proof-of-concept code for CVE-2022-48821, and it is not listed in the CISA Known Exploited Vulnerabilities catalog. However, the vulnerability's nature as a use-after-free flaw in a kernel subsystem makes it a potential target for future research.
What versions of Kernel are affected by CVE-2022-48821?
Linux kernel versions 5.16 through 5.16.9 are vulnerable. Version 5.16.10 and all later releases contain the fix.
How do I check if my server is vulnerable to CVE-2022-48821?
Run `uname -r` to display your kernel version. If it reports 5.16.0 through 5.16.9, your system is vulnerable. For kernel versions outside the 5.16.x series (e.g., 5.15.x or 5.17.x), this CVE does not apply.
Does Defensia detect CVE-2022-48821?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2022-48821 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/46963e2e0629cb31c96b1d47ddd89dc3d8990b34
- https://git.kernel.org/stable/c/4e6fd2b5fcf8e7119305a6042bd92e7f2b9ed215
- https://git.kernel.org/stable/c/76f85c307ef9f10aa2cef1b1d5ee654c1f3345fc
- https://git.kernel.org/stable/c/a5ce7ee5fcc07583159f54ab4af5164de00148f5
- https://git.kernel.org/stable/c/e4382d0a39f9a1e260d62fdc079ddae5293c037d
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-48821. Free for 1 server.
Get started free