# CVE-2026-52991: sched/psi: fix race between file release and pressure write

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.15% (percentile 2, 2026-11-26)
- **CWE:** CWE-362, CWE-367
- **Published:** 2026-06-24T16:29:04.810Z
- **Modified:** 2026-10-30T13:19:05.697Z

## Who should check

- Anyone running Linux \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< 58e6ca11e45c9d6e52255d1135e7dbff0a360334; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< d8ddbc3330fa6851c56b046e630a8fc64830a0ce; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< af0638534bfae7980582c6482531a0872f8ee341; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< 03dc070fa0fc3cb4068693f468ccd5f8a7e58282; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< d4352c0709bfd38c752fccbde7fd72a82ac78f23; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< a5b98009f16d8a5fb4a8ff9a193f5735515c38fa
- Anyone running Linux 5.2

## Description

In the Linux kernel, the following vulnerability has been resolved:

sched/psi: fix race between file release and pressure write

A potential race condition exists between pressure write and cgroup file
release regarding the priv member of struct kernfs\_open\_file, which
triggers the uaf reported in \[1\].

Consider the following scenario involving execution on two separate CPUs:

   CPU0					CPU1
   ====					====
					vfs\_rmdir()
					kernfs\_iop\_rmdir()
					cgroup\_rmdir()
					cgroup\_kn\_lock\_live()
					cgroup\_destroy\_locked()
					cgroup\_addrm\_files()
					cgroup\_rm\_file()
					kernfs\_remove\_by\_name()
					kernfs\_remove\_by\_name\_ns()
 vfs\_write()				\_\_kernfs\_remove()
 new\_sync\_write()			kernfs\_drain()
 kernfs\_fop\_write\_iter()		kernfs\_drain\_open\_files()
 cgroup\_file\_write()			kernfs\_release\_file()
 pressure\_write()			cgroup\_file\_release()
 ctx = of-\>priv;
					kfree(ctx);
 					of-\>priv = NULL;
					cgroup\_kn\_unlock()
 cgroup\_kn\_lock\_live()
 cgroup\_get(cgrp)
 cgroup\_kn\_unlock()
 if (ctx-\>psi.trigger)  // here, trigger uaf for ctx, that is of-\>priv

The cgroup\_rmdir() is protected by the cgroup\_mutex, it also safeguards
the memory deallocation of of-\>priv performed within cgroup\_file\_release().
However, the operations involving of-\>priv executed within pressure\_write()
are not entirely covered by the protection of cgroup\_mutex. Consequently,
if the code in pressure\_write(), specifically the section handling the
ctx variable executes after cgroup\_file\_release() has completed, a uaf
vulnerability involving of-\>priv is triggered.

Therefore, the issue can be resolved by extending the scope of the
cgroup\_mutex lock within pressure\_write() to encompass all code paths
involving of-\>priv, thereby properly synchronizing the race condition
occurring between cgroup\_file\_release() and pressure\_write().

And, if an live kn lock can be successfully acquired while executing
the pressure write operation, it indicates that the cgroup deletion
process has not yet reached its final stage; consequently, the priv
pointer within open\_file cannot be NULL. Therefore, the operation to
retrieve the ctx value must be moved to a point \*after\* the live kn
lock has been successfully acquired.

In another situation, specifically after entering cgroup\_kn\_lock\_live()
but before acquiring cgroup\_mutex, there exists a different class of
race condition:

CPU0: write memory.pressure               CPU1: write cgroup.pressure=0
===========================		  =============================

kernfs\_fop\_write\_iter()
 kernfs\_get\_active\_of(of)
 pressure\_write()
   cgroup\_kn\_lock\_live(memory.pressure)
     cgroup\_tryget(cgrp)
     kernfs\_break\_active\_protection(kn)
     ... blocks on cgroup\_mutex

                                     	  cgroup\_pressure\_write()
                                     	  cgroup\_kn\_lock\_live(cgroup.pressure)
                                     	  cgroup\_file\_show(memory.pressure, false)
                                     	    kernfs\_show(false)
                                     	      kernfs\_drain\_open\_files()
                                     	        cgroup\_file\_release(of)
                                     	          kfree(ctx)
                                     	            of-\>priv = NULL
                                     	  cgroup\_kn\_unlock()

   ... acquires cgroup\_mutex
   ctx = of-\>priv;        // may now be NULL
   if (ctx-\>psi.trigger)  // NULL dereference

Consequently, there is a possibility that of-\>priv is NULL, the pressure
write needs to check for this.

Now that the scope of the cgroup\_mutex has been expanded, the original
explicit cgroup\_get/put operations are no longer necessary, this is
because acquiring/releasing the live kn lock inherently executes a
cgroup get/put operation.

\[1\]
BUG: KASAN: slab-use-after-free in pressure\_write+0xa4/0x210 kernel/cgroup/cgroup.c:4011
Call Trace:
 pressure\_write+0xa4/0x210 kernel/cgroup/cgroup.c:4011
 cgroup\_file\_write+0x36f/0x790 kernel/cgroup/cgroup.c:43
---truncated---

## Affected and fixed versions

- Linux: \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< 58e6ca11e45c9d6e52255d1135e7dbff0a360334; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< d8ddbc3330fa6851c56b046e630a8fc64830a0ce; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< af0638534bfae7980582c6482531a0872f8ee341; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< 03dc070fa0fc3cb4068693f468ccd5f8a7e58282; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< d4352c0709bfd38c752fccbde7fd72a82ac78f23; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< a5b98009f16d8a5fb4a8ff9a193f5735515c38fa (cvelist)
- Linux: 5.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-52991. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-52991.md
Affected: Linux >= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, < 58e6ca11e45c9d6e52255d1135e7dbff0a360334; >= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, < d8ddbc3330fa6851c56b046e630a8fc64830a0ce; >= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, < af0638534bfae7980582c6482531a0872f8ee341; >= 0e94682b73bfa6c44c98af7…
Fixed in: Linux 58e6ca11e45c9d6e52255d1135e7dbff0a360334, Linux 03dc070fa0fc3cb4068693f468ccd5f8a7e58282

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-52991 being exploited?

There is no confirmed exploitation: CVE-2026-52991 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.15% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-52991?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-52991?

Linux \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< 58e6ca11e45c9d6e52255d1135e7dbff0a360334; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< d8ddbc3330fa6851c56b046e630a8fc64830a0ce; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< af0638534bfae7980582c6482531a0872f8ee341; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< 03dc070fa0fc3cb4068693f468ccd5f8a7e58282; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< d4352c0709bfd38c752fccbde7fd72a82ac78f23; \>= 0e94682b73bfa6c44c98af7a26771c9c08c055d5, \< a5b98009f16d8a5fb4a8ff9a193f5735515c38fa; Linux 5.2.

### Is there a fix for CVE-2026-52991?

Yes. Fixed in Linux 58e6ca11e45c9d6e52255d1135e7dbff0a360334, Linux 03dc070fa0fc3cb4068693f468ccd5f8a7e58282. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-52991?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2026:57251>
- vendor: <https://access.redhat.com/errata/RHSA-2026:57252>
- vendor: <https://access.redhat.com/errata/RHSA-2026:57253>
- vendor: <https://access.redhat.com/errata/RHSA-2026:57254>
- patch: <https://git.kernel.org/stable/c/03dc070fa0fc3cb4068693f468ccd5f8a7e58282>
- patch: <https://git.kernel.org/stable/c/d4352c0709bfd38c752fccbde7fd72a82ac78f23>
- patch: <https://git.kernel.org/stable/c/a5b98009f16d8a5fb4a8ff9a193f5735515c38fa>
- other: <https://git.kernel.org/stable/c/58e6ca11e45c9d6e52255d1135e7dbff0a360334>
- other: <https://git.kernel.org/stable/c/d8ddbc3330fa6851c56b046e630a8fc64830a0ce>
- other: <https://git.kernel.org/stable/c/af0638534bfae7980582c6482531a0872f8ee341>
- other: <https://access.redhat.com/security/cve/CVE-2026-52991>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2492403>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-52991.json>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-52991>

HTML: <https://flawdb.com/CVE-2026-52991> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-52991>
