Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

memcg: fix possible use-after-free in memcg_write_event_control()

CVSS 3.1 7.8 HIGHCheck source for fixed versionsKEV status unknown

cve-program · CVE-2022-48988

Published

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.

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2022-48988

Published

Linux

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/linux/cgroup.h",
                        "kernel/cgroup/cgroup-internal.h",
                        "mm/memcontrol.c"
                    ],
                    "versions": [
                        {
                            "version": "347c4a8747104a945ecced358944e42879176ca5",
                            "lessThan": "b77600e26fd48727a95ffd50ba1e937efb548125",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "347c4a8747104a945ecced358944e42879176ca5",
                            "lessThan": "e1ae97624ecf400ea56c238bff23e5cd139df0b8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "347c4a8747104a945ecced358944e42879176ca5",
                            "lessThan": "35963b31821920908e397146502066f6b032c917",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "347c4a8747104a945ecced358944e42879176ca5",
                            "lessThan": "f1f7f36cf682fa59db15e2089039a2eeb58ff2ad",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "347c4a8747104a945ecced358944e42879176ca5",
                            "lessThan": "aad8bbd17a1d586005feb9226c2e9cfce1432e13",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "347c4a8747104a945ecced358944e42879176ca5",
                            "lessThan": "0ed074317b835caa6c03bcfa8f133365324673dc",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "347c4a8747104a945ecced358944e42879176ca5",
                            "lessThan": "4a7ba45b1a435e7097ca0f79a847d0949d0eb088",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                }

Linux

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/linux/cgroup.h",
                        "kernel/cgroup/cgroup-internal.h",
                        "mm/memcontrol.c"
                    ],
                    "versions": [
                        {
                            "version": "3.14",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.14",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.14.302",
                            "lessThanOrEqual": "4.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.269",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.227",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.159",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.83",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.13",
                            "lessThanOrEqual": "6.0.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 23 Nov 05:15 UTC · 274 of 275 readable · 270 fully read · documentation 469/469 current