net: af_key: initialize alg_key_len for IPComp states
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: dump_stack_lvl+0x10e/0x1f0 print_report+0xf7/0x600 kasan_report+0xe4/0x120 kasan_che
CVE-2026-64436
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-64436
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "58e82fc3dedb57b1432292504415b224fd2d6acb",
"versionType": "git"
},
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "01b9115b55018123ef2449ac4951f89147a8428e",
"versionType": "git"
},
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "3f63d1752d90c0e28be931a48ab5d89bc97d637d",
"versionType": "git"
},
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "273c06b81d2e902b21acc801ae18c8276c8a9b69",
"versionType": "git"
},
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "6de2a650917bedaaefd65b17cede83c5e2c1dedd",
"versionType": "git"
},
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "e8417353cbd078d10531ba3928e609c84ab09e6b",
"versionType": "git"
},
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "cea34abc94b0a81e3a8b5cfb41cf45af37c2c67e",
"versionType": "git"
},
{
"status": "affected",
"version": "80c9abaabf4283f7cf4a0b3597cd302506635b7f",
"lessThan": "d129c3177d7b1138fd5066fcc63a698b3ba415b0",
"versionType": "git"
}
],
"programFiles": [
"net/key/af_key.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "2.6.21"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "2.6.21",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "5.10.261",
"versionType": "semver",
"lessThanOrEqual": "5.10.*"
},
{
"status": "unaffected",
"version": "5.15.212",
"versionType": "semver",
"lessThanOrEqual": "5.15.*"
},
{
"status": "unaffected",
"version": "6.1.178",
"versionType": "semver",
"lessThanOrEqual": "6.1.*"
},
{
"status": "unaffected",
"version": "6.6.145",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.96",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.39",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.1.4",
"versionType": "semver",
"lessThanOrEqual": "7.1.*"
},
{
"status": "unaffected",
"version": "7.2",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"net/key/af_key.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-64436
Source reference:
/cveMetadata/cveId
Publisher severity
high
Source reference: /containers/cna/metrics
- Event
- #41043 · Revision 1
- Added to Heist Feed
- Publisher date