{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50569","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-10-22T13:20:23.760Z","datePublished":"2025-10-22T13:23:25.810Z","dateUpdated":"2026-08-05T08:59:09.466Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T08:59:09.466Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: Update ipcomp_scratches with NULL when freed\n\nCurrently if ipcomp_alloc_scratches() fails to allocate memory\nipcomp_scratches holds obsolete address. So when we try to free the\npercpu scratches using ipcomp_free_scratches() it tries to vfree non\nexistent vm area. Described below:\n\nstatic void * __percpu *ipcomp_alloc_scratches(void)\n{\n        ...\n        scratches = alloc_percpu(void *);\n        if (!scratches)\n                return NULL;\nipcomp_scratches does not know about this allocation failure.\nTherefore holding the old obsolete address.\n        ...\n}\n\nSo when we free,\n\nstatic void ipcomp_free_scratches(void)\n{\n        ...\n        scratches = ipcomp_scratches;\nAssigning obsolete address from ipcomp_scratches\n\n        if (!scratches)\n                return;\n\n        for_each_possible_cpu(i)\n               vfree(*per_cpu_ptr(scratches, i));\nTrying to free non existent page, causing warning: trying to vfree\nexistent vm area.\n        ...\n}\n\nFix this breakage by updating ipcomp_scrtches with NULL when scratches\nis freed"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is triggered only when creating/destroying IPComp XFRM states via local NETLINK_XFRM (xfrm_user_rcv_msg → xfrm_add_sa → ipcomp_init_state → ipcomp_alloc/free_scratches), not by processing remote packets on the IPComp input/output path.\nAC:L - The attacker fully controls the IPComp SA create/destroy cycle and can induce the required alloc_percpu failure via memory pressure before the next create, matching prior CNA scoring that treats attacker-induced allocation failure as Low complexity.\nPR:L - xfrm_user_rcv_msg requires CAP_NET_ADMIN via netlink_net_capable(sock_net()->user_ns), which an unprivileged user obtains with unshare -Urn; per guidance this is Low, not High.\nUI:N - The attacker opens a NETLINK_XFRM socket and sends XFRM_MSG_NEWSA/DELSA messages themselves; no separate victim action is required.\nS:U - The double-free/UAF corrupts host-kernel vmalloc/percpu state within the same OS security authority and does not cross a VM, IOMMU, or other boundary.\nC:H - After free without NULLing, the error path reads the freed percpu array to obtain scratch pointers and re-vfrees them; reclaim/spray of that memory yields a UAF read and arbitrary-vfree primitive, scored High per UAF guidance.\nI:H - Double-free of the percpu scratch pointer table and its vmalloc regions is classic heap corruption that enables arbitrary free and control-flow hijacking once the stale objects are reclaimed.\nA:H - The path produces the syzbot WARN in vfree/__vunmap and can oops/panic under panic_on_warn or corrupted free_percpu state; any UAF/double-free is High availability impact."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/xfrm/xfrm_ipcomp.c"],"versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"debca61df6bc2f65e020656c9c5b878d6b38d30f","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"a39f456d62810c0efb43cead22f98d95b53e4b1a","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"1e8abde895b3ac6a368cbdb372e8800c49e73a28","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"18373ed500f7cd53e24d9b0bd0f1c09d78dba87e","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"be81c44242b20fc3bdcc73480ef8aaee56f5d0b6","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"03155680191ef0f004b1d6a5714c5b8cd271ab61","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"f3bdba4440d82e0da2b1bfc35d3836c8a8e00677","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"2c19945ce8095d065df550e7fe350cd5cc40c6e6","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"8a04d2fc700f717104bfb95b0f6694e448a4537f","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/xfrm/xfrm_ipcomp.c"],"versions":[{"version":"2.6.12","status":"affected"},{"version":"0","lessThan":"2.6.12","status":"unaffected","versionType":"semver"},{"version":"4.9.331","lessThanOrEqual":"4.9.*","status":"unaffected","versionType":"semver"},{"version":"4.14.296","lessThanOrEqual":"4.14.*","status":"unaffected","versionType":"semver"},{"version":"4.19.262","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.220","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.150","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.75","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"5.19.17","lessThanOrEqual":"5.19.*","status":"unaffected","versionType":"semver"},{"version":"6.0.3","lessThanOrEqual":"6.0.*","status":"unaffected","versionType":"semver"},{"version":"6.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.9.331"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.14.296"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.19.262"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.4.220"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.10.150"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.75"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.19.17"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.0.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/debca61df6bc2f65e020656c9c5b878d6b38d30f"},{"url":"https://git.kernel.org/stable/c/a39f456d62810c0efb43cead22f98d95b53e4b1a"},{"url":"https://git.kernel.org/stable/c/1e8abde895b3ac6a368cbdb372e8800c49e73a28"},{"url":"https://git.kernel.org/stable/c/18373ed500f7cd53e24d9b0bd0f1c09d78dba87e"},{"url":"https://git.kernel.org/stable/c/be81c44242b20fc3bdcc73480ef8aaee56f5d0b6"},{"url":"https://git.kernel.org/stable/c/03155680191ef0f004b1d6a5714c5b8cd271ab61"},{"url":"https://git.kernel.org/stable/c/f3bdba4440d82e0da2b1bfc35d3836c8a8e00677"},{"url":"https://git.kernel.org/stable/c/2c19945ce8095d065df550e7fe350cd5cc40c6e6"},{"url":"https://git.kernel.org/stable/c/8a04d2fc700f717104bfb95b0f6694e448a4537f"}],"title":"xfrm: Update ipcomp_scratches with NULL when freed","x_generator":{"engine":"bippy-1.2.0"}}}}