data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2025-39964 in the interactive tracker

CVE-2025-39964

crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg

KEV 7.8 EPSS 1.4% AV:L

Published 2025-10-13 (12 months ago) by the Linux kernel CNA. Subsystem crypto. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2025-39964 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormfixedDSA-6053-1 · 2025-11-11 · text6.1.158-1Update the kernel and reboot. DSA-6053-1 shipped the fix on 2025-11-11, in 6.1.158-1. A running kernel keeps the old code until the machine restarts.
Debian 13trixiefixed6.12.57-1Update the kernel and reboot. Fixed in 6.12.57-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.16.9-1Update the kernel and reboot. Fixed in 6.16.9-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.16.9-1Update the kernel and reboot. Fixed in 6.16.9-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

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.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

crypto/af_alg.c
include/crypto/if_alg.h

What this is
CRYPTO APIMAINTAINERS section matched on crypto/ · linux-crypto@vger.kernel.org · Maintained
Kernel module
af_alg

Check it on the machine

grep -w CONFIG_CRYPTO_USER_API /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w af_alg

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.

  • bookworm, trixie, forky, sidm
m
a loadable module on every flavour - check lsmod, can be blacklisted
Build switch
CONFIG_CRYPTO_USER_API

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Known to be exploited in the wild

Added to KEV
2026-09-18
Federal due date
2026-09-21
Ransomware use
unknown
Required action
Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.

the KEV catalogue

Signals

Published
2025-10-13 (12 months ago)source
CVSS
7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
local (AV:L)source
EPSS
1.36%, higher than 71.3% of all CVEssource
CISA KEV
listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
crypto

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
2.6.385.10.2450f28c4adbc4a
2.6.385.15.194e4c1ec11132e
2.6.386.1.1541f323a48e9b5
2.6.386.6.1087c4491b5644e
2.6.386.12.499aee87da5572
2.6.386.16.945bcf60fe49b
2.6.386.171b34cbbf4f01

Debian advisories

AdvisoryDateShipped toDebian
DLA-4404-12025-12-12bullseye 5.10.247-1tracker
DLA-4379-12025-11-25bullseye 6.1.158-1~deb11u1tracker
DSA-6053-12025-11-11bookworm 6.1.158-1tracker

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:LAttack vector, local
The vulnerability is reached through the AF_ALG socket family via `socket()`/`bind()`/`sendmsg()`/`recvmsg()` syscalls, which requires local system access. There is no remote or adjacent-network path to `af_alg_sendmsg()`.
AC:LAttack complexity, low
The attacker controls both sides of the race entirely — two of its own threads on a socket it owns — and can force writer A to park deterministically in `af_alg_wait_for_wmem()` by sizing `SO_SNDBUF` and filling it, then wake it on demand with its own `recvmsg()`. The error exit that leaves `cur == 0` is triggered at will with a deliberately faulting user buffer, so no condition is outside the attacker's control.
PR:LPrivileges required, low
`alg_create()`, `alg_bind()` and `alg_setkey()` perform no capability checks whatsoever, so any unprivileged local user — including one inside a container or unprivileged user namespace — can open, bind and write to an AF_ALG skcipher/aead socket. The required modules are auto-loaded on demand via `MODULE_ALIAS_NETPROTO(AF_ALG)` and `request_module("algif-%s")`.
UI:NUser interaction, none
The attacking process performs every step itself — socket creation, bind, and the two concurrent `sendmsg()` calls. No victim action or interaction of any kind is needed.
S:UScope, unchanged
The corruption is confined to kernel heap objects (`struct af_alg_tsgl`/scatterlist and adjacent slab memory) within the same security authority. No hypervisor, IOMMU, or other trust boundary is crossed.
C:HConfidentiality impact, high
The out-of-bounds scatterlist entry is fabricated from kernel list pointers and is subsequently handed to the cipher by `skcipher_recvmsg`/`aead_recvmsg` via `af_alg_pull_tsgl()`, so arbitrary kernel memory is encrypted/decrypted and returned to userspace. This yields a kernel memory disclosure primitive, not merely a pointer leak.
I:HIntegrity impact, high
`memcpy_from_msg(page_address(sg_page(sg)) + sg->offset + sg->length, msg, len)` on the underflowed scatterlist writes attacker-controlled data of attacker-chosen length to an address derived from attacker-influenceable heap contents. Combined with heap grooming of the 4KB tsgl allocations, this is a controlled kernel write suitable for privilege escalation.
A:HAvailability impact, high
Dereferencing `page_address(sg_page(sg))` on a bogus page_link, and the later `put_page()` on that fabricated page, reliably produce an oops/panic or page refcount corruption. Any unprivileged user can trigger this repeatedly, crashing the machine.