In the Linux kernel, the following vulnerability has been resolved:
xfrm: Update ipcomp_scratches with NULL when freed
Currently if ipcompallocscratches() fails to allocate memory ipcompscratches holds obsolete address. So when we try to free the percpu scratches using ipcompfree_scratches() it tries to vfree non existent vm area. Described below:
static void * _percpu *ipcompallocscratches(void) { ... scratches = allocpercpu(void *); if (!scratches) return NULL; ipcomp_scratches does not know about this allocation failure. Therefore holding the old obsolete address. ... }
So when we free,
static void ipcompfreescratches(void) { ... scratches = ipcompscratches; Assigning obsolete address from ipcompscratches
if (!scratches)
return;
for_each_possible_cpu(i)
vfree(*per_cpu_ptr(scratches, i));
Trying to free non existent page, causing warning: trying to vfree existent vm area. ... }
Fix this breakage by updating ipcomp_scrtches with NULL when scratches is freed
[
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3bdba4440d82e0da2b1bfc35d3836c8a8e00677",
"id": "CVE-2022-50569-0153ed82",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a04d2fc700f717104bfb95b0f6694e448a4537f",
"id": "CVE-2022-50569-0b980d08",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@debca61df6bc2f65e020656c9c5b878d6b38d30f",
"id": "CVE-2022-50569-12750632",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@18373ed500f7cd53e24d9b0bd0f1c09d78dba87e",
"id": "CVE-2022-50569-137f5ce2",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2c19945ce8095d065df550e7fe350cd5cc40c6e6",
"id": "CVE-2022-50569-244904cd",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a39f456d62810c0efb43cead22f98d95b53e4b1a",
"id": "CVE-2022-50569-3e916a36",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03155680191ef0f004b1d6a5714c5b8cd271ab61",
"id": "CVE-2022-50569-46f72622",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a04d2fc700f717104bfb95b0f6694e448a4537f",
"id": "CVE-2022-50569-6b78c23c",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03155680191ef0f004b1d6a5714c5b8cd271ab61",
"id": "CVE-2022-50569-86c7bb41",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2c19945ce8095d065df550e7fe350cd5cc40c6e6",
"id": "CVE-2022-50569-8dc3f8d9",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@debca61df6bc2f65e020656c9c5b878d6b38d30f",
"id": "CVE-2022-50569-8f108bbf",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be81c44242b20fc3bdcc73480ef8aaee56f5d0b6",
"id": "CVE-2022-50569-a34c5e77",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a39f456d62810c0efb43cead22f98d95b53e4b1a",
"id": "CVE-2022-50569-c31abb73",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1e8abde895b3ac6a368cbdb372e8800c49e73a28",
"id": "CVE-2022-50569-ca5162df",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be81c44242b20fc3bdcc73480ef8aaee56f5d0b6",
"id": "CVE-2022-50569-e39bd267",
"digest": {
"threshold": 0.9,
"line_hashes": [
"114472162418825815891715063086339768144",
"269759220048520470662816535381169154067",
"214382060421884639750331993967325910768",
"258623988816036945439604803116941787719"
]
},
"target": {
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3bdba4440d82e0da2b1bfc35d3836c8a8e00677",
"id": "CVE-2022-50569-e4689d12",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@18373ed500f7cd53e24d9b0bd0f1c09d78dba87e",
"id": "CVE-2022-50569-ef511116",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1e8abde895b3ac6a368cbdb372e8800c49e73a28",
"id": "CVE-2022-50569-fe2c963f",
"digest": {
"function_hash": "21179703832197346184748366740401348616",
"length": 284.0
},
"target": {
"function": "ipcomp_free_scratches",
"file": "net/xfrm/xfrm_ipcomp.c"
}
}
]