Cyber Resilience

CVE-2025-21958

Race Condition in Linux Kernel 6.12 – 6.12.20

Published
01 April 2025
Modified
31 October 2025
Patch / advisory
CVSS Score v3.1 4.7
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0013 3th percentile
Risk Priority 35 floored blend · peak EPSS

Summary

CVE-2025-21958 is a medium-severity Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367) vulnerability in Linux Linux Kernel. Its CVSS base score is 4.7 (Medium).

Operationally, ranked at the 3th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SI-2 (Flaw Remediation) and CM-7 (Least Functionality) — see the control section below for these in your framework.

EU & UK References

Vulnerability Data

In the Linux kernel, the following vulnerability has been resolved: Revert "openvswitch: switch to per-action label counting in conntrack" Currently, ovs_ct_set_labels() is only called for confirmed conntrack entries (ct) within ovs_ct_commit(). However, if the conntrack entry does not have the…

more

labels_ext extension, attempting to allocate it in ovs_ct_get_conn_labels() for a confirmed entry triggers a warning in nf_ct_ext_add(): WARN_ON(nf_ct_is_confirmed(ct)); This happens when the conntrack entry is created externally before OVS increments net->ct.labels_used. The issue has become more likely since commit fcb1aa5163b1 ("openvswitch: switch to per-action label counting in conntrack"), which changed to use per-action label counting and increment net->ct.labels_used when a flow with ct action is added. Since there’s no straightforward way to fully resolve this issue at the moment, this reverts the commit to avoid breaking existing use cases.

CWE(s)

Related Threats

CVEs Like This One

CVE-2025-38217Same product: Linux Linux Kernel
CVE-2026-53250Same product: Linux Linux Kernel
CVE-2026-31678Same product: Linux Linux Kernel
CVE-2023-52478Same product: Linux Linux Kernel
CVE-2025-22060Same product: Linux Linux Kernel
CVE-2025-21746Same product: Linux Linux Kernel
CVE-2024-50234Same product: Linux Linux Kernel
CVE-2024-50220Same product: Linux Linux Kernel
CVE-2024-43882Same product: Linux Linux Kernel
CVE-2026-52991Same product: Linux Linux Kernel

Affected Assets

linux
linux kernel
6.14 · 6.12 — 6.12.20 · 6.13 — 6.13.8

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SI-2 Flaw Remediation
  • CM-7 Least Functionality
Detect
Catch it (NIST detect / respond)
  • SI-4 System Monitoring
Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V15.4.2
  • V17.2.6

Mitigating Controls (NIST 800-53 r5) AI

prevent

Directly requires applying the kernel patch that reverts the per-action label counting change, eliminating the TOCTOU condition in ovs_ct_set_labels() for externally-created conntrack entries.

prevent

Restricts enabling of OVS conntrack label actions (and net->ct.labels_used increments) to only those flows that truly require them, reducing the window for the nf_ct_ext_add() warning on confirmed entries.

detect

Monitors kernel logs for the specific WARN_ON(nf_ct_is_confirmed(ct)) triggered inside ovs_ct_get_conn_labels(), providing early indication that the race has been exercised.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly include coding standards and reviews that prevent TOCTOU race conditions.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

none

Reliable, synchronized time across systems narrows the exploitable window in which a resource state can change between a security check and its use.

References