7.0
HIGH
CVE-2022-48988
Linux kernel memcg Use-After-Free
Description

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.

INFO

Published Date :

Oct. 21, 2024, 8:15 p.m.

Last Modified :

Nov. 1, 2024, 3:20 p.m.

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67

Remotely Exploitable :

No

Impact Score :

5.9

Exploitability Score :

1.0
Affected Products

The following products are affected by CVE-2022-48988 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-48988 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-48988 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Nov. 01, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://git.kernel.org/stable/c/0ed074317b835caa6c03bcfa8f133365324673dc No Types Assigned https://git.kernel.org/stable/c/0ed074317b835caa6c03bcfa8f133365324673dc Patch
    Changed Reference Type https://git.kernel.org/stable/c/35963b31821920908e397146502066f6b032c917 No Types Assigned https://git.kernel.org/stable/c/35963b31821920908e397146502066f6b032c917 Patch
    Changed Reference Type https://git.kernel.org/stable/c/4a7ba45b1a435e7097ca0f79a847d0949d0eb088 No Types Assigned https://git.kernel.org/stable/c/4a7ba45b1a435e7097ca0f79a847d0949d0eb088 Patch
    Changed Reference Type https://git.kernel.org/stable/c/aad8bbd17a1d586005feb9226c2e9cfce1432e13 No Types Assigned https://git.kernel.org/stable/c/aad8bbd17a1d586005feb9226c2e9cfce1432e13 Patch
    Changed Reference Type https://git.kernel.org/stable/c/b77600e26fd48727a95ffd50ba1e937efb548125 No Types Assigned https://git.kernel.org/stable/c/b77600e26fd48727a95ffd50ba1e937efb548125 Patch
    Changed Reference Type https://git.kernel.org/stable/c/e1ae97624ecf400ea56c238bff23e5cd139df0b8 No Types Assigned https://git.kernel.org/stable/c/e1ae97624ecf400ea56c238bff23e5cd139df0b8 Patch
    Changed Reference Type https://git.kernel.org/stable/c/f1f7f36cf682fa59db15e2089039a2eeb58ff2ad No Types Assigned https://git.kernel.org/stable/c/f1f7f36cf682fa59db15e2089039a2eeb58ff2ad Patch
    Added CWE NIST CWE-416
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 3.14 up to (excluding) 4.14.302 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.15 up to (excluding) 4.19.269 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20 up to (excluding) 5.4.227 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.159 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.83 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.0.13 *cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.1:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.1:rc6:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.1:rc7:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.1:rc8:*:*:*:*:*:*
  • CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Oct. 21, 2024

    Action Type Old Value New Value
    Added Description 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.
    Added Reference kernel.org https://git.kernel.org/stable/c/b77600e26fd48727a95ffd50ba1e937efb548125 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/e1ae97624ecf400ea56c238bff23e5cd139df0b8 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/35963b31821920908e397146502066f6b032c917 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/f1f7f36cf682fa59db15e2089039a2eeb58ff2ad [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/aad8bbd17a1d586005feb9226c2e9cfce1432e13 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/0ed074317b835caa6c03bcfa8f133365324673dc [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/4a7ba45b1a435e7097ca0f79a847d0949d0eb088 [No types assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-48988 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2022-48988 weaknesses.

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability