In the Linux kernel, the following vulnerability has been resolved:
cgroup/cpuset: Fix wrong check in updateparentsubparts_cpumask()
It was found that the check to see if a partition could use up all the cpus from the parent cpuset in updateparentsubparts_cpumask() was incorrect. As a result, it is possible to leave parent with no effective cpu left even if there are tasks in the parent cpuset. This can lead to system panic as reported in [1].
Fix this probem by updating the check to fail the enabling the partition if parent's effectivecpus is a subset of the child's cpusallowed.
Also record the error code when an error happens in update_prstate() and add a test case where parent partition and child have the same cpu list and parent has task. Enabling partition in the child will fail in this case.
[1] https://www.spinics.net/lists/cgroups/msg36254.html
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2ab7f2cf5ef8f0c6212a246e681d1fe358cec1f",
"id": "CVE-2023-52942-129e8b1e",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "update_parent_subparts_cpumask",
"file": "kernel/cgroup/cpuset.c"
},
"signature_type": "Function",
"digest": {
"length": 3668.0,
"function_hash": "220934940524380146311611885798616738441"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5ae8803847b80fe9d744a3174abe2b7bfed222a",
"id": "CVE-2023-52942-56dbd949",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "update_prstate",
"file": "kernel/cgroup/cpuset.c"
},
"signature_type": "Function",
"digest": {
"length": 1742.0,
"function_hash": "320182865802910136823574401269873870778"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2ab7f2cf5ef8f0c6212a246e681d1fe358cec1f",
"id": "CVE-2023-52942-60e75a79",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "kernel/cgroup/cpuset.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"104583713207094846154222370717857880246",
"248713050108802691039960750338948857446",
"294687124816757997705729974870319798032",
"330439391348821166163923890554261410262",
"155783158267571015306112509673114832457",
"32546609468358978000579437651990335540",
"117823275184060319878914431275586544537",
"124960774531218488558673946448516041170"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5ae8803847b80fe9d744a3174abe2b7bfed222a",
"id": "CVE-2023-52942-6db872ca",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "update_parent_subparts_cpumask",
"file": "kernel/cgroup/cpuset.c"
},
"signature_type": "Function",
"digest": {
"length": 3668.0,
"function_hash": "220934940524380146311611885798616738441"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5ae8803847b80fe9d744a3174abe2b7bfed222a",
"id": "CVE-2023-52942-7920836e",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "kernel/cgroup/cpuset.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"104583713207094846154222370717857880246",
"248713050108802691039960750338948857446",
"294687124816757997705729974870319798032",
"330439391348821166163923890554261410262",
"155783158267571015306112509673114832457",
"32546609468358978000579437651990335540",
"117823275184060319878914431275586544537",
"124960774531218488558673946448516041170"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2ab7f2cf5ef8f0c6212a246e681d1fe358cec1f",
"id": "CVE-2023-52942-ecd782bc",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "update_prstate",
"file": "kernel/cgroup/cpuset.c"
},
"signature_type": "Function",
"digest": {
"length": 1742.0,
"function_hash": "320182865802910136823574401269873870778"
}
}
]