CVE-2025-39964: Linux Kernel Race Condition Vulnerability
In the Linux kernel, the following vulnerability has been resolved: crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg Issuing two writes to the same af_alg socket is bogus as the data will be interleaved in an unpredictable fashion. Furthermore, concurrent writes may create inconsistencies in the internal socket state. Disallow this by adding a new ctx->write field that indiciates exclusive ownership for writing.
CVE-2025-39964 is a race condition in the Linux kernel affecting AF_ALG sockets. Concurrent writes to the same socket can interleave data unpredictably and leave the socket’s internal state inconsistent. For IT and security teams, this matters because kernel-level state corruption can undermine cryptographic or other AF_ALG-backed operations and may be abused for denial of service or further compromise depending on how the feature is used. Confirm exact impact, fixed versions, and scope against the vendor advisory.
CISA notes the weakness and directs organizations to apply vendor mitigations in line with BOD 26-04 risk-based prioritization and related forensics guidance. Ransomware use is not documented in the provided facts.
How it works
This issue is classed as CWE-362 (concurrent execution using shared resource with improper synchronization). AF_ALG provides a userspace interface to kernel crypto algorithms via sockets. When multiple writers can operate on the same AF_ALG socket without adequate synchronization, their writes can race. The CISA summary states that concurrent writes cause data to be unpredictably interleaved and create inconsistencies in the socket’s internal state.
An attacker who can drive concurrent write activity against a vulnerable AF_ALG socket path may trigger those inconsistent states. Exact exploit preconditions, privilege level, and resulting impact (for example crash, incorrect crypto results, or escalation) are not specified in the given facts; treat them as product- and configuration-dependent and verify against the kernel vendor advisory and your distribution’s notes. Do not assume remote unauthenticated reachability without confirmation.
Am I affected? How to find it in your systems
The affected component is the Linux kernel. AF_ALG is used where applications or libraries talk to kernel crypto via AF_ALG sockets (for example certain crypto offload or userspace crypto stacks that bind to algif interfaces). It commonly appears on servers, cloud images, containers’ host kernels, embedded/Linux appliances, and developer workstations running mainline or distribution kernels that include the vulnerable code path.
- Inventory: record kernel version (uname -r), distribution and package set (for example rpm/dpkg kernel packages), and whether workloads use AF_ALG (process lists, library dependencies, or configs referencing algif/AF_ALG).
- Versions and builds: the facts do not list fixed or vulnerable version numbers—compare your running kernel and backports to the vendor or distribution advisory for CVE-2025-39964.
- Configuration: note multi-threaded or multi-process clients that share an AF_ALG socket; shared use is the scenario called out in the summary.
- Telemetry: watch for kernel oops/warnings tied to algif or AF_ALG, unexpected crypto failures, process crashes around concurrent crypto I/O, and anomalous local activity that opens or writes heavily to AF_ALG sockets. There is no universal exploit signature in the provided facts; baseline normal AF_ALG usage first.
How to remediate
Patch first. Apply the vendor or distribution kernel update that addresses CVE-2025-39964 as named in the official advisory, then reboot into the patched kernel per your change process. Confirm the running kernel matches the fixed package.
- Follow CISA’s direction: apply mitigations per vendor instructions and BOD 26-04 prioritization; evaluate internet exposure of each asset; for cloud or managed kernels, follow the provider’s fixed image/kernel guidance or discontinue use if mitigations are unavailable.
- After patching, reduce unnecessary AF_ALG exposure: limit which users and service accounts may create AF_ALG sockets; avoid sharing a single AF_ALG socket across untrusted or highly concurrent writers where design allows dedicated sockets or userspace crypto instead.
- Hardening for this class: keep kernel and crypto-related packages on a rapid patch cadence; use least privilege for processes performing kernel crypto; enable available kernel hardening and memory-safety options your vendor supports; segment hosts that must expose crypto interfaces from untrusted networks and tenants.
If you can't patch immediately
Until a patched kernel is deployed, reduce likelihood and blast radius of concurrent AF_ALG abuse and state corruption.
- Segmentation: isolate hosts that run AF_ALG-dependent workloads; restrict local user and container privileges so untrusted code cannot open or write those sockets.
- Disable or avoid the affected path: where operationally feasible, stop using AF_ALG shared sockets—prefer non-shared designs, userspace crypto libraries, or vendor-recommended alternate interfaces until patched.
- Access control: tighten policy (seccomp, LSM, capabilities, file permissions on relevant device/socket paths) so only required services exercise AF_ALG.
- Virtual patching / WAF: network WAF rules do not fix in-kernel races; focus on host controls. Host IDS/EDR can still flag suspicious local socket and crypto API abuse patterns.
- Monitoring: increase logging and alerting on kernel anomalies, AF_ALG-related errors, and privilege use around crypto; retain logs for triage consistent with CISA forensics expectations.
- Exposure review: prioritize internet-facing or multi-tenant systems for emergency maintenance windows.
If your data may have been exposed
Actively exploited kernel vulnerabilities can lead to host compromise and data exposure even when ransomware use is not documented for this CVE. If you suspect exploitation, isolate affected systems, preserve memory and disk evidence, rotate credentials and keys that may have been processed on the host, and follow your incident response plan and CISA forensics triage requirements. You can run a free exposure scan of your email addresses against known breach datasets to see whether associated accounts appear in prior public breaches while you complete kernel remediation and investigation.
AICompiled with AI assistance from public sources and published under our editorial standards.
Details
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HReferences
- git.kernel.org/stable/c/0f28c4adbc4a97437874c9b669fd7958a8c6d6ce
- git.kernel.org/stable/c/1b34cbbf4f011a121ef7b2d7d6e6920a036d5285
- git.kernel.org/stable/c/1f323a48e9b5ebfe6dc7d130fdf5c3c0e92a07c8
- git.kernel.org/stable/c/45bcf60fe49b37daab1acee57b27211ad1574042
- git.kernel.org/stable/c/7c4491b5644e3a3708f3dbd7591be0a570135b84
- git.kernel.org/stable/c/9aee87da5572b3a14075f501752e209801160d3d
- git.kernel.org/stable/c/e4c1ec11132ec466f7362a95f36a506ce4dc08c9
- cert-portal.siemens.com/productcert/html/ssa-019113.html