In the Linux kernel, the following vulnerability has been resolved:
sched/smt: Fix unbalance schedsmtpresent dec/inc
I got the following warn report while doing stress test:
jump label: negative count! WARNING: CPU: 3 PID: 38 at kernel/jumplabel.c:263 statickeyslowtrydec+0x9d/0xb0 Call Trace: <TASK> _statickeyslowdeccpuslocked+0x16/0x70 schedcpudeactivate+0x26e/0x2a0 cpuhpinvokecallback+0x3ad/0x10d0 cpuhpthreadfun+0x3f5/0x680 smpbootthreadfn+0x56d/0x8d0 kthread+0x309/0x400 retfromfork+0x41/0x70 retfromfork_asm+0x1b/0x30 </TASK>
Because when cpusetcpuinactive() fails in schedcpudeactivate(), the cpu offline failed, but schedsmtpresent is decremented before calling schedcpudeactivate(), it leads to unbalanced dec/inc, so fix it by incrementing schedsmtpresent in the error path.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/44xxx/CVE-2024-44958.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-44958.json"
[
{
"id": "CVE-2024-44958-2b35104b",
"target": {
"function": "sched_cpu_deactivate",
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65727331b60197b742089855ac09464c22b96f66",
"digest": {
"function_hash": "192737492108969665355727218054688714014",
"length": 661.0
},
"signature_type": "Function"
},
{
"id": "CVE-2024-44958-629ee783",
"target": {
"function": "sched_cpu_deactivate",
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a3548c7ef2e135aee40e7e5e44e7d11b893e7c4",
"digest": {
"function_hash": "234575417317579252003458827314609025106",
"length": 623.0
},
"signature_type": "Function"
},
{
"id": "CVE-2024-44958-667ee522",
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a3548c7ef2e135aee40e7e5e44e7d11b893e7c4",
"digest": {
"threshold": 0.9,
"line_hashes": [
"56856037535907605258660500729690118893",
"112863561845292999827960421915271051053",
"17491220761574353036156309556906127774",
"194199366225907048324966691567196386080"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-44958-69b26724",
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65727331b60197b742089855ac09464c22b96f66",
"digest": {
"threshold": 0.9,
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-44958-6e6cb026",
"target": {
"function": "sched_cpu_deactivate",
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0c87a3c6be10a57aa3463c32c3fc6b2a47c3dab",
"digest": {
"function_hash": "192737492108969665355727218054688714014",
"length": 661.0
},
"signature_type": "Function"
},
{
"id": "CVE-2024-44958-717ce823",
"target": {
"function": "sched_cpu_deactivate",
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e22f910a26cc2a3ac9c66b8e935ef2a7dd881117",
"digest": {
"function_hash": "192737492108969665355727218054688714014",
"length": 661.0
},
"signature_type": "Function"
},
{
"id": "CVE-2024-44958-760b92c5",
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0c87a3c6be10a57aa3463c32c3fc6b2a47c3dab",
"digest": {
"threshold": 0.9,
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-44958-a3d0b8e7",
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2cf7665efe451e48d27953e6b5bc627d518c902b",
"digest": {
"threshold": 0.9,
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-44958-ed7c18a3",
"target": {
"function": "sched_cpu_deactivate",
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2cf7665efe451e48d27953e6b5bc627d518c902b",
"digest": {
"function_hash": "22897645778815595321913647253174865312",
"length": 680.0
},
"signature_type": "Function"
},
{
"id": "CVE-2024-44958-ee10a674",
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e22f910a26cc2a3ac9c66b8e935ef2a7dd881117",
"digest": {
"threshold": 0.9,
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
]
},
"signature_type": "Line"
}
]