Advisory

CVE-2025-39964: Linux Kernel AF_ALG Race Condition Rated HIGH (CVSS 7.8) — Patch Now

A race condition in the Linux kernel's AF_ALG crypto socket interface allows concurrent write operations to unpredictably interleave data and corrupt internal socket state. The flaw carries a CVSS 3.1 score of 7.8 (HIGH) and has been added to the CISA Known Exploited Vulnerabilities catalog.

TL;DR: Apply the Linux kernel patch that introduces exclusive write ownership for AF_ALG sockets as directed by your distribution vendor. Because this CVE appears in the CISA KEV catalog, federal agencies must follow BOD 26-04 remediation timelines, and all organizations should treat this as a priority update.

What Is the Flaw?

CVE-2025-39964 is a race condition (CWE-362) in the Linux kernel's af_alg_sendmsg function, which serves the AF_ALG socket interface — the kernel's user-space gateway to its cryptographic framework.

When two threads (or processes) issue concurrent write calls to the same AF_ALG socket, the kernel previously had no mechanism to enforce exclusive ownership. The result is twofold:

  • Data interleaving: Cryptographic input from two callers is merged in an unpredictable order, corrupting the data fed to the crypto subsystem.
  • State corruption: Concurrent writes can leave the socket's internal state inconsistent, opening pathways to memory-safety violations that may be exploitable for privilege escalation.

The upstream fix resolves this by introducing a new ctx->write field that enforces exclusive write ownership, preventing a second caller from entering af_alg_sendmsg while another is already active on the same socket.

Who and What Is Affected?

Any system running a vulnerable version of the Linux kernel that exposes AF_ALG sockets to unprivileged or low-privileged users is in scope. The CVSS vector AV:L/AC:L/PR:L/UI:N tells us:

  • Local access required (AV:L): An attacker must have a local foothold — a shell, a container escape, or a compromised service account.
  • Low attack complexity (AC:L): No special timing precision or additional conditions beyond concurrent socket writes are needed.
  • Low privileges required (PR:L): A regular (non-root) user account is sufficient to trigger the condition.
  • No user interaction (UI:N): The victim does not need to take any action.

Environments most exposed include multi-tenant Linux hosts, container platforms, and any server where untrusted users can execute arbitrary code. The AF_ALG interface is enabled in most general-purpose distributions by default.

Potential Impact

The CVSS 3.1 score is 7.8 HIGH with High ratings across all three impact dimensions:

DimensionRatingMeaning
ConfidentialityHighCryptographic material or memory contents could be disclosed
IntegrityHighData fed to crypto operations can be silently corrupted
AvailabilityHighKernel state corruption may lead to system instability or crashes

Practically, a local attacker exploiting this race condition may be able to escalate privileges, corrupt cryptographic operations silently, or destabilize the host. The presence of this CVE in the CISA Known Exploited Vulnerabilities (KEV) catalog (added 2026-09-18) indicates that exploitation has been observed in the wild, making rapid remediation essential.

What to Do Now

CISA's required action for CVE-2025-39964 is to apply vendor-provided mitigations in accordance with BOD 26-04 guidance. Practical steps:

  1. Identify affected systems: Audit all Linux hosts across your environment and record the running kernel version. Focus first on internet-facing or multi-tenant systems.
  2. Apply the upstream patch: The fix is in the upstream Linux kernel. Obtain and apply the corrected kernel package from your distribution vendor (e.g., Red Hat, Ubuntu, SUSE, Debian). Refer directly to your vendor's security advisory for the exact fixed version applicable to your release.
  3. Follow BOD 26-04 timelines: Federal civilian executive branch agencies must comply with CISA's Binding Operational Directive 26-04 patching deadlines. All other organizations should treat this as a priority patch given KEV status.
  4. Restrict AF_ALG access where possible: If your workloads do not require user-space access to kernel crypto via AF_ALG, consider restricting socket creation through LSM policies (e.g., SELinux, AppArmor) or seccomp filters as a temporary compensating control while patching is in progress.
  5. Reboot or live-patch: Kernel updates require either a system reboot or a live-kernel-patch (where your distribution supports it) to take effect. Plan maintenance windows accordingly.
  6. Verify remediation: Confirm the running kernel version after patching with uname -r and cross-reference against your vendor's fixed-version list.

If mitigations are unavailable and the product cannot be patched, CISA's guidance states to discontinue use of the affected product until a fix is available.

How External Testing Surfaces Exposure

Race conditions in kernel interfaces are often invisible to standard vulnerability scanners that rely solely on banner-grabbing or service fingerprinting. Meaningful assessment requires a layered approach:

  • Kernel version enumeration: An authenticated or agent-based scan that reads the running kernel version (uname -r or equivalent) can compare the result against the fixed versions listed in vendor advisories, flagging unpatched hosts definitively.
  • Configuration review: Checking whether AF_ALG socket creation is accessible to low-privileged users (e.g., via namespace policies or capability restrictions) helps quantify the attack surface even before patch application.
  • Privilege boundary testing: Penetration testing that includes local privilege escalation scenarios can probe whether the race condition window is reachable from a low-privileged shell on a target system.
  • Patch compliance auditing: Continuous comparison of installed kernel packages against vendor errata feeds provides ongoing visibility into whether CVE-2025-39964 remediation has regressed (e.g., after a rollback).

Because exploitation requires local access, organizations should also consider whether lateral movement from a perimeter breach could land an attacker in a position to abuse this flaw — the local-only requirement does not make it low priority in environments where initial access is achievable.

Sources & further reading: NVD CVE-2025-39964 and the CISA KEV catalog are the authority on affected and fixed versions. Vendor/independent analysis: git.kernel.org, git.kernel.org, git.kernel.org, git.kernel.org. This advisory contains no exploit code.

Frequently asked questions

Does an attacker need physical access to exploit CVE-2025-39964?

No. The CVSS vector specifies local network access is not required — 'local' in this context means the attacker must be able to run code on the target system. That could be achieved through a compromised application, a container escape, SSH access with a low-privileged account, or similar methods, without physical presence.

Is this vulnerability being actively exploited?

Yes. CVE-2025-39964 was added to the CISA Known Exploited Vulnerabilities (KEV) catalog on 2026-09-18, which indicates that exploitation has been observed. Organizations should not treat this as a theoretical risk.

What is AF_ALG and can I simply disable it?

AF_ALG is a Linux kernel socket family that allows user-space applications to access kernel-implemented cryptographic algorithms without copying data to and from user space repeatedly. Disabling it system-wide may not be straightforward without recompiling the kernel, but access to it can be restricted via security modules (SELinux, AppArmor) or seccomp policies as a compensating control while patching is prioritized. Consult your distribution's documentation for the specific mechanism appropriate to your environment.

Where can I find the official fix and vendor advisories?

The authoritative sources are: the NVD entry for CVE-2025-39964 (nvd.nist.gov), the CISA KEV catalog entry (cisa.gov/known-exploited-vulnerabilities-catalog), and your Linux distribution vendor's security advisory portal (such as Red Hat Security Advisories, Ubuntu Security Notices, or SUSE Security Advisories). Always apply packages from your distribution's official repositories rather than manually patching kernel source unless you have the operational capability to build and validate custom kernels.