CVE-2022-48988
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2022-48988 is a use-after-free vulnerability in the Linux kernel's memory control group (memcg) subsystem. The vulnerability was discovered in the memcgwriteeventcontrol() function, where the dentry->dname access could race against renames and removals of arbitrary files. The issue was introduced when a file type check was inadvertently dropped in commit 347c4a874710 ("memcg: remove cgroup_event->cft"). The vulnerability affects Linux kernel versions from 3.14 up to versions before 6.1 (NVD).

Technical details

The vulnerability occurs in the memcgwriteeventcontrol() function which accesses the dentry->dname of the specified control fd to route write calls. While cgroup interface files cannot be renamed and are safe to access when they are regular cgroup files, the removal of the _filecft() verification check allowed arbitrary files to be processed. This broke invariants around d_name and parent accesses, potentially leading to use-after-free conditions when racing against renames and removals of arbitrary files. The CVSS v3.1 base score is 7.0 HIGH with vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

If successfully exploited, this vulnerability could allow an attacker to cause use-after-free conditions in the kernel's memory subsystem, potentially leading to privilege escalation, information disclosure, or system crashes. The vulnerability requires local access and high complexity to exploit, but could affect system confidentiality, integrity, and availability (NVD).

Mitigation and workarounds

The vulnerability has been fixed by resurrecting the file type check in _filecft(). The fix involves checking the superblock and dentry type instead of file operations, as cgroupfs is now implemented through kernfs. Users should update to patched kernel versions. The fix has been backported to multiple stable kernel versions (Kernel Patch).

Additional resources


SourceThis report was generated using AI

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