From mboxrd@z Thu Jan 1 00:00:00 1970 From: AL-KERNEL To: kernel-cve@kernelcve.org Subject: [CVE-2026-64436][MODERATE 7.0] net: af_key: initialize alg_key_len for IPComp states Date: Sat, 25 Jul 2026 10:33:20 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AL-KERNEL-CVE: CVE-2026-64436 X-AL-KERNEL-Priority: MODERATE 7.0 X-AL-KERNEL-Severity: MODERATE 7.0 X-AL-KERNEL-Base-Severity: MODERATE X-AL-KERNEL-KPANIC: NO X-AL-KERNEL-ActionableScore: 5 X-AL-KERNEL-ActionableScore-Lower: 3 X-AL-KERNEL-Commit: 58e82fc3dedb57b1432292504415b224fd2d6acb List-Id: CVE: CVE-2026-64436 Priority: MODERATE 7.0 AL-KERNEL base severity: MODERATE KPANIC flag: NO Patch: net: af_key: initialize alg_key_len for IPComp states Commit: 58e82fc3dedb57b1432292504415b224fd2d6acb Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=58e82fc3dedb57b1432292504415b224fd2d6acb Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-64436 Analysis date: Sat, 25 Jul 2026 10:33:20 -0400 ActionableScore: 5 ActionableScore lower bound: 3 Actionable bucket: Actionable Moderate at minimum Manual review required: YES Summary: An uninitialized `alg_key_len` in the AF_KEY IPComp path can make XFRM migration clone an oversized algorithm object, causing a local slab out-of-bounds read with DoS and possible limited kernel heap disclosure impact. ====================================================================== ABOUT THIS REPORT ====================================================================== The original Linux kernel CVE announcement for CVE-2026-64436 is available here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-64436 The original announcement does not normally provide a security severity estimate, CVSS assessment, or enough information to determine whether the reported kernel bug represents a practically relevant security issue. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. It combines an autonomous classifier with LLM-assisted technical analysis and a separate ActionableScore mechanism. The purpose of this report is to prioritize Linux kernel CVEs before manual review, identify cases that require prompt investigation, and support automatic closure of issues that are unlikely to have meaningful security impact. Published priority for this report: MODERATE 7.0 Manual review required: YES A detailed explanation of the methodology and priority rules is included at the end of this message. ====================================================================== AL-KERNEL CLASSIFICATION RESULT ====================================================================== CVE-2026-64436 MODERATE CHECK WITH IMPACT FROM ORIG NN LOW Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H';*CWE-457;CWE-125;*CWE-200;Other CVSS 'AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:H';BEST CVSS score: '5.8';DESCR 'An uninitialized alg_key_len field in the AF_KEY IPComp path can make xfrm_algo_clone compute an oversized algorithm object length during XFRM state migration. This causes kmemdup to read past the end of the allocated calg object and can trigger a slab out of bounds read from kernel heap memory. For the CVSS the PR:L is used in the paranoid score because CAP_NET_ADMIN may be delegated to a container, network namespace, or constrained service account rather than requiring full host root. The issue is local and not network reachable because it requires creating an IPComp SA through PF_KEY and then triggering XFRM_MSG_MIGRATE. Impact is at least local denial of service via kernel crash or failed migration, with plausible limited confidentiality impact if overread heap bytes are copied into state that can later be observed.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Actionable Moderate at minimum (with actual score 4) YES READ KASAN OOB HARDWARE LINUS DECREASED_TO_MODERATEREG_BASED_ON_ACTIONABLESCORELESSTHAN5 NO NO checked ====================================================================== ACTIONABLESCORE ANALYSIS ====================================================================== ActionableScore=5 ActionableScoreLower=3 ## 1. ActionableScore * Conservative score: 3 * Paranoid score: 5 * Final recommended bucket: **Actionable Moderate at minimum**:: ## 2. Signal breakdown Conservative signals: * Weak/indirect corruption candidate: +1. `alg_key_len` is uninitialized and later used to compute the `kmemdup()` size, causing a concrete slab out-of-bounds read. * Reliable kernel crash / strong DoS: +1. KASAN shows a reproducible slab-out-of-bounds read in `kmemdup_noprof()`, and large garbage lengths can also make migration cloning fail. * Confidentiality impact plausible: +1. The overread copies adjacent kernel heap bytes into a cloned algorithm object, so limited kernel heap disclosure is plausible if that state later becomes observable. * Broad/default/common subsystem exposure: +1. XFRM/IPsec and PF_KEY are commonly built kernel networking components, even if the exact migration trigger is not a default workload. * Requires CAP_NET_ADMIN in typical deployments: -1. Creating PF_KEY IPComp state and triggering XFRM migration normally requires CAP_NET_ADMIN, but namespace or service delegation can reduce this below full host-root in practical deployments. Paranoid signals: * Local unprivileged trigger: +1. On systems with unprivileged user namespaces and network namespaces enabled, an unprivileged user may obtain CAP_NET_ADMIN in a private netns and exercise XFRM/PF_KEY paths. * Weak/indirect corruption candidate: +1. The primitive is a real kernel heap out-of-bounds read caused by an uninitialized length field, but not an OOB write or UAF. * Reliable kernel crash / strong DoS: +1. The reported KASAN trace confirms an invalid slab read, and oversized copies or allocations can disrupt migration. * Confidentiality impact plausible: +1. Adjacent heap data may be copied into the cloned XFRM algorithm object. * Broad/default/common subsystem exposure: +1. XFRM/IPsec is not treated as rare-only for triage because it is a standard kernel networking security subsystem. No privilege escalation bonus is awarded. There is no demonstrated write primitive, UAF reclaim, object replacement, callback control, refcount takeover, or arbitrary memory corruption. ## 3. Reachability analysis The bug is local and control-plane reachable. The attacker needs to create an IPComp SA via PF_KEY and then trigger XFRM state migration through the netlink XFRM path. In typical host deployments this requires CAP_NET_ADMIN, so the conservative score treats it as privileged. In containerized or namespace-enabled deployments, CAP_NET_ADMIN may be delegated to a less trusted netns or service account, which supports the paranoid score. The issue is not remotely packet-triggerable. It is not caused by inbound IPsec traffic alone. The affected path is reachable through local PF_KEY and XFRM management operations. Call-site confidence: high. The commit gives the concrete chain `pfkey_msg2xfrm_state()` -> `xfrm_state_migrate()` -> `xfrm_state_clone_and_setup()` -> `xfrm_algo_clone()` -> `kmemdup()` and includes a KASAN trace. ## 4. Severity interpretation This is stronger than an ordinary Moderate because it has a concrete kernel heap out-of-bounds read, not merely a validation or bookkeeping issue. Realistic impact is local DoS or failed XFRM migration, with plausible limited confidentiality exposure from copied heap bytes. It does not currently justify Important-class treatment by itself because there is no shown write primitive, UAF reclaim, type confusion, or credible LPE chain. Overall this is an actionable Moderate and should not be auto-closed without review. ## 5. One-sentence report phrase An uninitialized `alg_key_len` in the AF_KEY IPComp path can make XFRM migration clone an oversized algorithm object, causing a local slab out-of-bounds read with DoS and possible limited kernel heap disclosure impact. ## 6. Manual review recommendation MANUAL CHECK REQUIRED Manual review is required because the patch fixes a concrete uninitialized length field that reaches `kmemdup()` as a copy size and produces a slab out-of-bounds read. The main question for human triage is whether copied heap bytes can be exposed through later XFRM state dumping or related user-visible paths. ====================================================================== UPSTREAM PATCH SUMMARY ====================================================================== Patch: net: af_key: initialize alg_key_len for IPComp states Commit: 58e82fc3dedb57b1432292504415b224fd2d6acb Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=58e82fc3dedb57b1432292504415b224fd2d6acb Commit description: 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: 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 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. [Commit description truncated; see the upstream URL below] Changed files: net/key/af_key.c Diff excerpt: Not included in this email. See the upstream URL for the full patch. Full patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=58e82fc3dedb57b1432292504415b224fd2d6acb ====================================================================== DETAILED REPORT METHODOLOGY ====================================================================== The original Linux kernel CVE announcement for CVE-2026-64436 can be found here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-64436 The original CVE announcement normally does not include a security-level estimate. In particular, it may not contain a CVSS assessment, an impact level, or enough information to determine whether the reported bug is a practically relevant security issue. One purpose of this parallel CVE list is to provide that missing technical and prioritization information. The original goal of the AL-KERNEL project was to prioritize Linux kernel CVE analysis automatically before manual review. The system can also help identify non-security issues that may be suitable for automatic closure. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. The first analysis stage combines an autonomous classifier with additional LLM-based analysis. The autonomous classifier runs locally on a CPU and is based on a backpropagation neural network. Together, these mechanisms produce a technical vulnerability description, identify likely weakness types, estimate CVSS severity, and provide input for ActionableScore. Two CVSS estimates are retained because incomplete kernel vulnerability information often permits more than one defensible interpretation: Conservative CVSS vector: AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:H The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H The Best / paranoid CVSS score: 5.8 The conservative vector represents a lower-impact interpretation. The Best/paranoid vector intentionally represents a plausible upper-bound interpretation and should not automatically be treated as demonstrated real-world impact. CVSS may also need to be adjusted for a particular Linux deployment, because actual reachability, privileges, enabled kernel configuration, hardware, namespaces, exposed device nodes, and other environmental conditions can differ significantly between systems. A separate ActionableScore mechanism evaluates practical remediation urgency. Its analysis may include reachability, attack prerequisites, subsystem exposure, memory-corruption characteristics, denial-of-service reliability, and possible confidentiality, integrity, or privilege-escalation impact. Conservative ActionableScore: 3 Paranoid ActionableScore: 5 The final base severity is taken directly from the second tab-separated field of the AL-KERNEL classification result. ActionableScore does not replace or independently override that final AL-KERNEL decision, and if ActionableScore adjusted impact level of ALKERNEL, then you would see self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7. For an AL-KERNEL result of MODERATE, this report uses the following additional presentation split: ActionableScore below 5 -> MODERATE REGULAR ActionableScore 5 or more -> MODERATE 7.0 The distinction between MODERATE REGULAR and MODERATE 7.0 makes it possible to identify Moderate issues that should receive manual analysis and fixes before lower-priority MODERATE REGULAR issues. In many cases, MODERATE REGULAR fixes may wait for a later rebase or routine update. There is one override in which MODERATE REGULAR becomes MODERATE 7.0 even when the ActionableScore is below 5. When the AL-KERNEL result contains the KPANIC flag, a MODERATE result is always presented as MODERATE 7.0. The KPANIC flag selected with few regexps without usage of AI at all, so it helps to detect cases when Kernel Crash happens and similar (to filter False-Negative results from the LLM usage). KPANIC indicates that a reliable kernel crash, kernel panic, or similarly serious kernel availability impact was identified by the classification workflow. AL-KERNEL base severity for this report: MODERATE KPANIC detected for this report: NO Published priority for this report (same as in Subject): MODERATE 7.0 These results are intended to support engineering triage. They are machine-generated estimates, and cases marked for manual review should be validated by a human security engineer before final disposition. For more info read docs linked from here: https://kernelcve.org/ (and you can submit you own patch there to generate such a report for non-existant CVE-id yet). Note that in many cases this AI tool selects higher severity, than real is (means you can expect Importants instead of Moderate 7.0 or Moderates 7.0 instead of regular Moderates). If you see such cases, please use reply email interface to add additional manual analyses info to this particular CVE. And please, please, let me know when you see Lows instead of Importants or Important instead of Low (because particular for such cases I need to tune this AI tool to make it better for this one and next similar). My contact email for such notifications is alexanjelausa@gmail.com (and both send reply to CVE record itself too and see "reply" button below for howto reply).