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.
[
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c",
"function": "sched_cpu_deactivate"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65727331b60197b742089855ac09464c22b96f66",
"digest": {
"length": 661.0,
"function_hash": "192737492108969665355727218054688714014"
},
"id": "CVE-2024-44958-2b35104b"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c",
"function": "sched_cpu_deactivate"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a3548c7ef2e135aee40e7e5e44e7d11b893e7c4",
"digest": {
"length": 623.0,
"function_hash": "234575417317579252003458827314609025106"
},
"id": "CVE-2024-44958-629ee783"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a3548c7ef2e135aee40e7e5e44e7d11b893e7c4",
"digest": {
"line_hashes": [
"56856037535907605258660500729690118893",
"112863561845292999827960421915271051053",
"17491220761574353036156309556906127774",
"194199366225907048324966691567196386080"
],
"threshold": 0.9
},
"id": "CVE-2024-44958-667ee522"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65727331b60197b742089855ac09464c22b96f66",
"digest": {
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
],
"threshold": 0.9
},
"id": "CVE-2024-44958-69b26724"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c",
"function": "sched_cpu_deactivate"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0c87a3c6be10a57aa3463c32c3fc6b2a47c3dab",
"digest": {
"length": 661.0,
"function_hash": "192737492108969665355727218054688714014"
},
"id": "CVE-2024-44958-6e6cb026"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c",
"function": "sched_cpu_deactivate"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e22f910a26cc2a3ac9c66b8e935ef2a7dd881117",
"digest": {
"length": 661.0,
"function_hash": "192737492108969665355727218054688714014"
},
"id": "CVE-2024-44958-717ce823"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0c87a3c6be10a57aa3463c32c3fc6b2a47c3dab",
"digest": {
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
],
"threshold": 0.9
},
"id": "CVE-2024-44958-760b92c5"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2cf7665efe451e48d27953e6b5bc627d518c902b",
"digest": {
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
],
"threshold": 0.9
},
"id": "CVE-2024-44958-a3d0b8e7"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c",
"function": "sched_cpu_deactivate"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2cf7665efe451e48d27953e6b5bc627d518c902b",
"digest": {
"length": 680.0,
"function_hash": "22897645778815595321913647253174865312"
},
"id": "CVE-2024-44958-ed7c18a3"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "kernel/sched/core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e22f910a26cc2a3ac9c66b8e935ef2a7dd881117",
"digest": {
"line_hashes": [
"52759743874402900375510969729573582301",
"272199443911715739724553431535190811768",
"17491220761574353036156309556906127774",
"98602845729530856610807048973200746207"
],
"threshold": 0.9
},
"id": "CVE-2024-44958-ee10a674"
}
]