Cyber Resilience

CVE-2025-21893

High

Published: 31 March 2025

Published
31 March 2025
Modified
08 April 2025
KEV Added
Patch
CVSS Score v3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0005 15.3th percentile
Risk Priority 16 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2025-21893 is a high-severity Use After Free (CWE-416) vulnerability in Linux Linux Kernel. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 15.3th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified are NIST 800-53 SI-2 (Flaw Remediation) and RA-5 (Vulnerability Monitoring and Scanning).

Deeper analysis

CVE-2025-21893 is a use-after-free (UAF) vulnerability in the Linux kernel's keys subsystem, specifically within the key_put() function. The flaw occurs when a key's reference count drops to zero, after which the kernel's garbage collector thread may destroy the key at any time. However, key_put() accesses the key structure beyond this point in an attempt to accelerate quota reclamation, violating the constraint that it should not touch the key post-decrement except for the static global key_gc_work variable. This issue is classified under CWE-416 and carries a CVSS v3.1 base score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

A local attacker with low privileges can exploit this vulnerability without requiring user interaction. Exploitation involves manipulating key reference counts to trigger the UAF condition in key_put(), potentially leading to high-impact consequences such as unauthorized data access, memory corruption, arbitrary code execution, or denial of service through system instability.

Mitigation is addressed in the referenced stable kernel patches: commits 6afe2ea2daec156bd94ad2c5a6f4f4c48240dcd3, 75845c6c1a64483e9985302793dbf0dfa5f71e32, and f6a3cf833188e897c97028cd7b926e3f2cb1a8c0. These fixes introduce a flag to signal immediate garbage collection eligibility for the key, avoiding direct inspection of the reference count in the collector and preventing post-zero access in key_put(). Security practitioners should update to kernels incorporating these commits.

EU & UK References

Vulnerability details

In the Linux kernel, the following vulnerability has been resolved: keys: Fix UAF in key_put() Once a key's reference count has been reduced to 0, the garbage collector thread may destroy it at any time and so key_put() is not…

more

allowed to touch the key after that point. The most key_put() is normally allowed to do is to touch key_gc_work as that's a static global variable. However, in an effort to speed up the reclamation of quota, this is now done in key_put() once the key's usage is reduced to 0 - but now the code is looking at the key after the deadline, which is forbidden. Fix this by using a flag to indicate that a key can be gc'd now rather than looking at the key's refcount in the garbage collector.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
Why these techniques?

Local use-after-free in Linux kernel keys subsystem enables arbitrary code execution/privilege escalation by low-privileged attacker, directly mapping to exploitation for privilege escalation.

Confidence: HIGH · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2026-23111Same product: Linux Linux Kernel
CVE-2026-31530Same product: Linux Linux Kernel
CVE-2026-43019Same product: Linux Linux Kernel
CVE-2026-23158Same product: Linux Linux Kernel
CVE-2026-31446Same product: Linux Linux Kernel
CVE-2026-31650Same product: Linux Linux Kernel
CVE-2026-23001Same product: Linux Linux Kernel
CVE-2024-50051Same product: Linux Linux Kernel
CVE-2025-21759Same product: Linux Linux Kernel
CVE-2026-23077Same product: Linux Linux Kernel

Affected Assets

linux
linux kernel
6.14 · 6.10 — 6.12.21 · 6.13 — 6.13.9

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

prevent

Directly mitigates CVE-2025-21893 by requiring timely remediation through application of the specific Linux kernel patches that fix the UAF in key_put().

prevent

Provides kernel memory protections that mitigate exploitation of the UAF vulnerability for unauthorized access, modification, or execution.

detect

Enables detection of the CVE-2025-21893 vulnerability in Linux kernels through regular scanning, facilitating timely patching.

References