In the Linux kernel, the following vulnerability has been resolved:
ACPI: CPPC: Make rmwlock a rawspin_lock
The following BUG was triggered:
============================= [ BUG: Invalid wait context ]
kworker/1:1/62 is trying to lock: ffffff8801593030 (&cpcptr->rmwlock){+.+.}-{3:3}, at: cpcwrite+0xcc/0x370 other info that might help us debug this: context-{5:5} 2 locks held by kworker/1:1/62: #0: ffffff897ef5ec98 (&rq->lock){-.-.}-{2:2}, at: rawspinrqlocknested+0x2c/0x50 #1: ffffff880154e238 (&sgpolicy->updatelock){....}-{2:2}, at: sugovupdateshared+0x3c/0x280 stack backtrace: CPU: 1 UID: 0 PID: 62 Comm: kworker/1:1 Not tainted 6.12.0-rc2-g9654bd3e8806 #406 Workqueue: 0x0 (events) Call trace: dumpbacktrace+0xa4/0x130 showstack+0x20/0x38 dumpstacklvl+0x90/0xd0 dumpstack+0x18/0x28 _lockacquire+0x480/0x1ad8 lockacquire+0x114/0x310 _rawspinlock+0x50/0x70 cpcwrite+0xcc/0x370 cppcsetperf+0xa0/0x3a8 cppccpufreqfastswitch+0x40/0xc0 cpufreqdriverfastswitch+0x4c/0x218 sugovupdateshared+0x234/0x280 updateloadavg+0x6ec/0x7b8 dequeueentities+0x108/0x830 dequeuetaskfair+0x58/0x408 _schedule+0x4f0/0x1070 schedule+0x54/0x130 workerthread+0xc0/0x2e8 kthread+0x130/0x148 retfrom_fork+0x10/0x20
sugovupdateshared() locks a rawspinlock while cpcwrite() locks a spinlock.
To have a correct wait-type order, update rmw_lock to a raw spinlock and ensure that interrupts will be disabled on the CPU holding it.
[ rjw: Changelog edits ]
{ "vanir_signatures": [ { "id": "CVE-2024-50249-2b561e0d", "signature_type": "Function", "target": { "file": "drivers/acpi/cppc_acpi.c", "function": "cpc_write" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c46d6b02588000c27b7b869388c2c0278bd0d173", "digest": { "function_hash": "160277889209462704634596759934316142229", "length": 1839.0 }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-41b94481", "signature_type": "Line", "target": { "file": "drivers/acpi/cppc_acpi.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c10941e34c5fdc0357e46a25bd130d9cf40b925", "digest": { "threshold": 0.9, "line_hashes": [ "67772318585770765775459015099389638042", "128059567875959561954726425785600128953", "258365743379392808511300245695375103697", "155172128700528723153669517731802551609", "69067091778999248258289239338708394763", "185705423869342950738786775976936088387", "12283104925168743794551268254646193945", "179450355496873445242819795169629647813", "156584268376526568366960961897585632756", "250036217436904009602946631870193306112", "186391133520811924552508955928602376045", "51501575018966754473671554164728584752", "37060493145877660209234734130092840085", "77496648812374814932418470568322279236", "242265257088700126789475536462522190935", "78000685952351979201186663531158029927", "219012374159153492806294370726662608281", "179724113517324671101647109475525526866", "74320994030817226522955678462341007516", "259175798751385778165317076630098360745" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-42696ce5", "signature_type": "Line", "target": { "file": "include/acpi/cppc_acpi.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c10941e34c5fdc0357e46a25bd130d9cf40b925", "digest": { "threshold": 0.9, "line_hashes": [ "89554937551134320922653253744105926256", "296944986390418028100634839622248730497", "204414013631409821183037452399935822665", "13164149424280181522006813179217372574" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-4682dbce", "signature_type": "Function", "target": { "file": "drivers/acpi/cppc_acpi.c", "function": "cpc_write" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c10941e34c5fdc0357e46a25bd130d9cf40b925", "digest": { "function_hash": "25455059975100935044939168385789999146", "length": 2116.0 }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-519e08fb", "signature_type": "Line", "target": { "file": "include/acpi/cppc_acpi.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@23039b4aaf1e82e0feea1060834d4ec34262e453", "digest": { "threshold": 0.9, "line_hashes": [ "89554937551134320922653253744105926256", "296944986390418028100634839622248730497", "204414013631409821183037452399935822665", "13164149424280181522006813179217372574" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-5957eff2", "signature_type": "Line", "target": { "file": "drivers/acpi/cppc_acpi.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0eb2b767c42fac61ab23c4063eb456baa4c2c262", "digest": { "threshold": 0.9, "line_hashes": [ "67772318585770765775459015099389638042", "128059567875959561954726425785600128953", "258365743379392808511300245695375103697", "155172128700528723153669517731802551609", "69067091778999248258289239338708394763", "185705423869342950738786775976936088387", "12283104925168743794551268254646193945", "179450355496873445242819795169629647813", "156584268376526568366960961897585632756", "250036217436904009602946631870193306112", "186391133520811924552508955928602376045", "51501575018966754473671554164728584752", "37060493145877660209234734130092840085", "77496648812374814932418470568322279236", "242265257088700126789475536462522190935", "78000685952351979201186663531158029927", "219012374159153492806294370726662608281", "179724113517324671101647109475525526866", "74320994030817226522955678462341007516", "259175798751385778165317076630098360745" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-6bc107e5", "signature_type": "Function", "target": { "file": "drivers/acpi/cppc_acpi.c", "function": "cpc_write" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43b1df48d1e7000a214acd1a81b8012ca8a929c8", "digest": { "function_hash": "25455059975100935044939168385789999146", "length": 2116.0 }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-713f3ea7", "signature_type": "Line", "target": { "file": "drivers/acpi/cppc_acpi.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c46d6b02588000c27b7b869388c2c0278bd0d173", "digest": { "threshold": 0.9, "line_hashes": [ "67772318585770765775459015099389638042", "128059567875959561954726425785600128953", "258365743379392808511300245695375103697", "155172128700528723153669517731802551609", "69067091778999248258289239338708394763", "185705423869342950738786775976936088387", "207819481903155760812222079325403367455", "332325454168676830136209321775714293070", "156584268376526568366960961897585632756", "250036217436904009602946631870193306112", "186391133520811924552508955928602376045", "51501575018966754473671554164728584752", "37060493145877660209234734130092840085", "77496648812374814932418470568322279236", "242265257088700126789475536462522190935", "78000685952351979201186663531158029927", "219012374159153492806294370726662608281", "179724113517324671101647109475525526866", "74320994030817226522955678462341007516", "259175798751385778165317076630098360745" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-89bbd8cd", "signature_type": "Function", "target": { "file": "drivers/acpi/cppc_acpi.c", "function": "cpc_write" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@23039b4aaf1e82e0feea1060834d4ec34262e453", "digest": { "function_hash": "25455059975100935044939168385789999146", "length": 2116.0 }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-8c7868c6", "signature_type": "Line", "target": { "file": "drivers/acpi/cppc_acpi.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43b1df48d1e7000a214acd1a81b8012ca8a929c8", "digest": { "threshold": 0.9, "line_hashes": [ "67772318585770765775459015099389638042", "128059567875959561954726425785600128953", "258365743379392808511300245695375103697", "155172128700528723153669517731802551609", "69067091778999248258289239338708394763", "185705423869342950738786775976936088387", "12283104925168743794551268254646193945", "179450355496873445242819795169629647813", "156584268376526568366960961897585632756", "250036217436904009602946631870193306112", "186391133520811924552508955928602376045", "51501575018966754473671554164728584752", "37060493145877660209234734130092840085", "77496648812374814932418470568322279236", "242265257088700126789475536462522190935", "78000685952351979201186663531158029927", "219012374159153492806294370726662608281", "179724113517324671101647109475525526866", "74320994030817226522955678462341007516", "259175798751385778165317076630098360745" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-a4a3dc3a", "signature_type": "Line", "target": { "file": "include/acpi/cppc_acpi.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43b1df48d1e7000a214acd1a81b8012ca8a929c8", "digest": { "threshold": 0.9, "line_hashes": [ "89554937551134320922653253744105926256", "296944986390418028100634839622248730497", "204414013631409821183037452399935822665", "13164149424280181522006813179217372574" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-ba0c2565", "signature_type": "Line", "target": { "file": "drivers/acpi/cppc_acpi.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@23039b4aaf1e82e0feea1060834d4ec34262e453", "digest": { "threshold": 0.9, "line_hashes": [ "67772318585770765775459015099389638042", "128059567875959561954726425785600128953", "258365743379392808511300245695375103697", "155172128700528723153669517731802551609", "69067091778999248258289239338708394763", "185705423869342950738786775976936088387", "12283104925168743794551268254646193945", "179450355496873445242819795169629647813", "156584268376526568366960961897585632756", "250036217436904009602946631870193306112", "186391133520811924552508955928602376045", "51501575018966754473671554164728584752", "37060493145877660209234734130092840085", "77496648812374814932418470568322279236", "242265257088700126789475536462522190935", "78000685952351979201186663531158029927", "219012374159153492806294370726662608281", "179724113517324671101647109475525526866", "74320994030817226522955678462341007516", "259175798751385778165317076630098360745" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-cdfdd721", "signature_type": "Line", "target": { "file": "include/acpi/cppc_acpi.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0eb2b767c42fac61ab23c4063eb456baa4c2c262", "digest": { "threshold": 0.9, "line_hashes": [ "89554937551134320922653253744105926256", "296944986390418028100634839622248730497", "204414013631409821183037452399935822665", "13164149424280181522006813179217372574" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-db41abd2", "signature_type": "Function", "target": { "file": "drivers/acpi/cppc_acpi.c", "function": "cpc_write" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0eb2b767c42fac61ab23c4063eb456baa4c2c262", "digest": { "function_hash": "25455059975100935044939168385789999146", "length": 2116.0 }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-50249-f3981c80", "signature_type": "Line", "target": { "file": "include/acpi/cppc_acpi.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c46d6b02588000c27b7b869388c2c0278bd0d173", "digest": { "threshold": 0.9, "line_hashes": [ "89554937551134320922653253744105926256", "296944986390418028100634839622248730497", "204414013631409821183037452399935822665", "13164149424280181522006813179217372574" ] }, "deprecated": false, "signature_version": "v1" } ] }