CVE-2026-64436
High · 7.1CVSS
7.1
EPSS
0.1%
Published
Jul 25, 2026
CISA due date
—
Cloudanix analysis
A local user with certain network-management privileges could make vulnerable Linux systems crash or potentially expose sensitive system memory.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Exposure
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
This is a Linux kernel memory-safety flaw in the AF_KEY/PF_KEY IPsec key-management path for IPComp security associations. When an IPComp state is created through PF_KEY, the kernel allocates an XFRM compression algorithm structure but fails to initialize alg_key_len. During a later XFRM migration operation, that uninitialized value is treated as a length, causing kmemdup() to read beyond the end of the allocated object or attempt an oversized allocation. The result can be a kernel slab out-of-bounds read, kernel fault/panic, failed migration, and potential exposure of adjacent kernel memory contents depending on allocator state and system hardening. The XFRM netlink SA creation path is described as not affected because it validates the compression algorithm attribute length.
Why it matters to the business
An attacker with local privileges sufficient to manipulate IPsec/XFRM state may be able to crash affected Linux systems or potentially read sensitive kernel memory. For servers, appliances, VPN gateways, container hosts, and network devices that expose IPsec/XFRM functionality to privileged local users or delegated containers, the main operational risk is service disruption and possible confidentiality loss. The vulnerability is not currently listed in CISA KEV, has no reported ransomware association, and has a very low EPSS score, so internet-scale exploitation is not indicated; however, local kernel bugs should still be prioritized on multi-user systems, shared hosting, and systems where containers or service accounts may hold network administration capabilities.
How an attack unfolds
An attacker first needs local code execution with enough privilege to create or manipulate IPsec security associations through the PF_KEY interface and trigger XFRM migration. They create an IPComp security association using PF_KEY, causing the kernel to allocate the compression algorithm structure without clearing alg_key_len. They then trigger an XFRM migration operation for that state. During migration, the kernel clones the algorithm structure and computes the copy size from the uninitialized alg_key_len value. If the stale slab value is non-zero, the clone operation may read past the end of the object or request an unexpectedly large allocation. In practice this can produce a kernel warning, KASAN report, oops, panic, or failed migration; under favorable conditions, the out-of-bounds read may expose adjacent kernel memory to kernel paths that copy or log the cloned state.
How to fix it
Apply the vendor kernel update that initializes the IPComp compression algorithm key length to zero in the AF_KEY/PF_KEY path. If fixed package versions are not yet published for a distribution, track the relevant Linux kernel and distribution advisories and upgrade as soon as patched kernels are available. As temporary risk reduction, restrict local users and containers from obtaining CAP_NET_ADMIN or equivalent privileges, avoid delegating IPsec/XFRM management to untrusted workloads, disable or avoid PF_KEY/IPComp functionality where not required, and consider kernel hardening options that reduce information disclosure impact. On systems where IPsec/IPComp is not used, remove unnecessary tooling and limit access to interfaces used to manage XFRM state, but do not rely on this as a substitute for patching.
How to confirm the fix worked
Confirm the running kernel includes the upstream or vendor fix for the AF_KEY IPComp alg_key_len initialization issue. Use the distribution package manager and security advisories to verify the installed kernel build is at or above the fixed release once available, and reboot into the fixed kernel. For source-based or custom kernels, inspect the PF_KEY IPComp handling in pfkey_msg2xfrm_state() and verify the compression algorithm structure explicitly sets alg_key_len to 0 before the state can be migrated. Validate that no outdated kernels remain bootable or running by comparing package inventory with `uname -r`. In controlled non-production testing only, a regression test that creates an IPComp SA through PF_KEY and triggers XFRM migration should no longer produce KASAN, slab out-of-bounds, kernel oops, or migration clone failures related to xfrm_algo_clone().
Typical attack path
- Obtain local execution on an affected Linux system.
- Gain or abuse privileges that allow PF_KEY/IPsec/XFRM state manipulation, such as network-administration capability in the relevant namespace.
- Open/use the PF_KEY interface to add an IPComp security association.
- Ensure the IPComp state is created through the PF_KEY path where the compression algorithm key length is not initialized.
- Trigger XFRM migration for the affected state.
- Cause the kernel to clone the malformed compression algorithm structure, resulting in an out-of-bounds read or oversized allocation attempt.
- Leverage the outcome for denial of service, crash evidence removal attempts, or possible kernel memory disclosure depending on system behavior.
How to detect it
Detection is primarily forensic because this flaw does not create a distinctive file, process, or network beacon. Review kernel logs, journal logs, crash dumps, audit records, and process accounting for sequences involving PF_KEY IPComp security-association creation followed by XFRM migration and kernel memory errors. Relevant log sources include `dmesg`, `/var/log/kern.log`, `/var/log/messages`, `journalctl -k`, auditd syscall logs, eBPF/EDR telemetry for socket and netlink activity, kdump/vmcore artifacts, and container runtime logs showing workloads granted CAP_NET_ADMIN. Look for KASAN or slab out-of-bounds reports in kmemdup/kmemdup_noprof with stack frames containing xfrm_state_migrate, xfrm_migrate, xfrm_do_migrate, pfkey_add, pfkey_process, or pfkey_sendmsg. Also investigate unexpected reboots, kernel panics, XFRM migration failures, and oversized allocation failures occurring near local processes that manage IPsec, PF_KEY, or XFRM state. Because legitimate VPN/IPsec software may use related interfaces, correlate events with change windows and known administrative activity before declaring malicious use.
- BUG: KASAN: slab-out-of-bounds in kmemdup
- BUG: KASAN: slab-out-of-bounds in kmemdup_noprof
- slab-out-of-bounds in kmemdup_noprof
- xfrm_state_migrate
- xfrm_state_clone_and_setup
- xfrm_algo_clone
- xfrm_alg_len
- xfrm_migrate
- xfrm_do_migrate
- xfrm_user_rcv_msg
- xfrm_netlink_rcv
- pfkey_add
- pfkey_process
- pfkey_sendmsg
- SADB_X_SATYPE_IPCOMP
- XFRM_MSG_MIGRATE
- IPComp
- calg->alg_key_len
- Read of size 4164
- kmalloc-96
- allocated 68-byte region
What your security team should do
- Inventory Linux systems that run IPsec, XFRM, VPN, container networking, network appliances, or workloads with CAP_NET_ADMIN.
- Prioritize patching multi-user systems, shared compute, container hosts, VPN gateways, and systems where non-root service accounts or containers can administer networking.
- Remove CAP_NET_ADMIN and similar network-management privileges from containers and service accounts unless strictly required.
- Monitor kernel, audit, and system logs for PF_KEY/IPComp activity followed by XFRM migration errors, KASAN reports, kernel oopses, or unexplained reboots.
- If exploitation is suspected, preserve kernel logs, crash dumps, audit logs, process accounting, and container/runtime metadata before rebooting or rotating logs.
- Disable or avoid IPComp/PF_KEY workflows where operationally unnecessary until patched.
- Track vendor advisories for the exact fixed kernel package and ensure systems are rebooted into the patched kernel, not merely updated on disk.
The record
In the Linux kernel, the following vulnerability has been resolved: net: af_key: initialize alg_key_len for IPComp states pfkey_msg2xfrm_state() handles the IPComp (SADB_X_SATYPE_IPCOMP) case by allocating x->calg and copying only the algorithm name: x->calg = kmalloc_obj(*x->calg); if (!x->calg) { err = -ENOMEM; goto out; } strcpy(x->calg->alg_name, a->name); x->props.calgo = sa->sadb_sa_encrypt; Unlike the authentication (x->aalg) and encryption (x->ealg) branches of the same function, the compression branch never initializes calg->alg_key_len. IPComp carries no key and the allocation only reserves sizeof(struct xfrm_algo) (i.e. no room for a key), so the field is left containing uninitialized slab data. calg->alg_key_len is later used as a length by xfrm_algo_clone() when an IPComp state is cloned during XFRM_MSG_MIGRATE: xfrm_state_migrate() xfrm_state_clone_and_setup() x->calg = xfrm_algo_clone(orig->calg); kmemdup(orig, xfrm_alg_len(orig)); where xfrm_alg_len() returns sizeof(*alg) + (alg_key_len + 7) / 8. With a non-zero garbage alg_key_len, kmemdup() reads past the end of the 68-byte calg object. Adding an IPComp SA via PF_KEY and then migrating it triggers (net-next, KASAN, init_on_alloc=0): BUG: KASAN: slab-out-of-bounds in kmemdup_noprof+0x44/0x60 Read of size 4164 at addr ff11000025a74980 by task diag2/9287 CPU: 3 UID: 0 PID: 9287 Comm: diag2 7.1.0-rc6-g903db046d557 #1 Call Trace: <TASK> dump_stack_lvl+0x10e/0x1f0 print_report+0xf7/0x600 kasan_report+0xe4/0x120 kasan_check_range+0x105/0x1b0 __asan_memcpy+0x23/0x60 kmemdup_noprof+0x44/0x60 xfrm_state_migrate+0x70a/0x1da0 xfrm_migrate+0x753/0x18a0 xfrm_do_migrate+0xb47/0xf10 xfrm_user_rcv_msg+0x411/0xb50 netlink_rcv_skb+0x158/0x420 xfrm_netlink_rcv+0x71/0x90 netlink_unicast+0x584/0x850 netlink_sendmsg+0x8b0/0xdc0 ____sys_sendmsg+0x9f7/0xb90 ___sys_sendmsg+0x134/0x1d0 __sys_sendmsg+0x16d/0x220 do_syscall_64+0x116/0x7d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> Allocated by task 9287: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 pfkey_add+0x2652/0x2ea0 pfkey_process+0x6d0/0x830 pfkey_sendmsg+0x42c/0x850 __sys_sendto+0x461/0x4b0 __x64_sys_sendto+0xe0/0x1c0 do_syscall_64+0x116/0x7d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ff11000025a74980 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of allocated 68-byte region [ff11000025a74980, ff11000025a749c4) Depending on the uninitialized value the same field can instead request an oversized kmemdup() allocation and make the migration clone fail. The XFRM netlink path is not affected: verify_one_alg() rejects an XFRMA_ALG_COMP attribute shorter than xfrm_alg_len(), so a calg added via XFRM_MSG_NEWSA is always self-consistent. Initialize calg->alg_key_len to 0, matching the aalg/ealg branches.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|