CVE-2022-48988·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: memcg: fix possible use-after-free in memcg_write_event_control() memcg_write_event_control() accesses the dentry->d_name of the specified control fd to route the write call. As a cgroup interface file can't be renamed, it's safe to access d_name as long as the specified file is a regular cgroup file. Also, as these cgroup interface files can't be removed before the directory, it's safe to access the parent too. Prior to 347c4a874710 ("memcg: remove cgroup_event->cft"), there was a call to __file_cft() which verified that the specified file is a regular cgroupfs file before further accesses. The cftype pointer returned from __file_cft() was no longer necessary and the commit inadvertently dropped the file type check with it allowing any file to slip through. With the invarients broken, the d_name and parent accesses can now race against renames and removals of arbitrary files and cause use-after-free's. Fix the bug by resurrecting the file type check in __file_cft(). Now that cgroupfs is implemented through kernfs, checking the file operations needs to go through a layer of indirection. Instead, let's check the superblock and dentry type.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.0.13
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 2% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2022-48988 scores 7 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 5.16
Until: 6.0.13
Fixed in: 6.0.13
How to fix this CVE
Update your Linux kernel to version 6.0.13 or later to patch the use-after-free vulnerability in the memory cgroup event control handler. This vulnerability affects kernels from 5.16 through 6.0.12 and can be exploited by local users with write access to cgroup control files. Apply the kernel update and reboot your system to fully remediate the issue.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r | grep -E '^(5\.(16|17|18|19)|6\.(0\.[0-9]|[0-9]\.[0-9]|0\.(1[0-2])))' && echo 'VULNERABLE' || echo 'NOT VULNERABLE'
- Verify cgroup v2 is in use: mount | grep cgroup2 && echo 'cgroup2 detected' || echo 'cgroup1 or none'
- Search kernel logs for memcg-related panics or memory corruption: sudo journalctl -k | grep -i 'memcg\|use-after-free\|memory corruption'
- Confirm patch applied: grep -i 'memcg.*event.*control' /boot/config-$(uname -r) && uname -r | grep -E '^6\.(0\.(13|[1-9][4-9])|[1-9]\.)' && echo 'PATCHED' || echo 'VERIFICATION NEEDED'
FAQ
What is CVE-2022-48988?
This is a use-after-free vulnerability in the Linux kernel's memory cgroup event control interface that occurs when file type validation is missing. An attacker with local access can craft malicious cgroup control file operations to trigger memory corruption.
Is CVE-2022-48988 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits have been released. However, it remains a high-severity local privilege escalation risk.
What versions of Kernel are affected by CVE-2022-48988?
Linux kernel versions 5.16 through 6.0.12 are affected. Versions 6.0.13 and later, as well as all 6.1+ releases, include the fix.
How do I check if my server is vulnerable to CVE-2022-48988?
Run: uname -r && if echo $(uname -r) | grep -E '^(5\.(16|17|18|19)|6\.(0\.[0-9]|0\.[1-2]))' > /dev/null; then echo 'VULNERABLE'; else echo 'NOT VULNERABLE'; fi
Does Defensia detect CVE-2022-48988?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2022-48988 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/0ed074317b835caa6c03bcfa8f133365324673dc
- https://git.kernel.org/stable/c/35963b31821920908e397146502066f6b032c917
- https://git.kernel.org/stable/c/4a7ba45b1a435e7097ca0f79a847d0949d0eb088
- https://git.kernel.org/stable/c/aad8bbd17a1d586005feb9226c2e9cfce1432e13
- https://git.kernel.org/stable/c/b77600e26fd48727a95ffd50ba1e937efb548125
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-48988. Free for 1 server.
Get started free