Skip to content

Commit 2a5fc56

Browse files
author
CKI Backport Bot
committed
cgroup/psi: Set of->priv to NULL upon file release
JIRA: https://issues.redhat.com/browse/RHEL-119145 CVE: CVE-2025-39881 commit 94a4acf Author: Chen Ridong <chenridong@huawei.com> Date: Fri Aug 22 07:07:15 2025 +0000 cgroup/psi: Set of->priv to NULL upon file release Setting of->priv to NULL when the file is released enables earlier bug detection. This allows potential bugs to manifest as NULL pointer dereferences rather than use-after-free errors[1], which are generally more difficult to diagnose. [1] https://lore.kernel.org/cgroups/38ef3ff9-b380-44f0-9315-8b3714b0948d@huaweicloud.com/T/#m8a3b3f88f0ff3da5925d342e90043394f8b2091b Signed-off-by: Chen Ridong <chenridong@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
1 parent b4f44f0 commit 2a5fc56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/cgroup/cgroup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4109,6 +4109,7 @@ static void cgroup_file_release(struct kernfs_open_file *of)
41094109
cft->release(of);
41104110
put_cgroup_ns(ctx->ns);
41114111
kfree(ctx);
4112+
of->priv = NULL;
41124113
}
41134114

41144115
static ssize_t cgroup_file_write(struct kernfs_open_file *of, char *buf,

0 commit comments

Comments
 (0)