In the Linux kernel, the following vulnerability has been resolved:
drivers/perf: hisi: use cpuhpstateremoveinstancenocalls() for hisihns3pmu uninit process
When tearing down a 'hisi_hns3' PMU, we mistakenly run the CPU hotplug callbacks after the device has been unregistered, leading to fireworks when we try to execute empty function callbacks within the driver:
| Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 | CPU: 0 PID: 15 Comm: cpuhp/0 Tainted: G W O 5.12.0-rc4+ #1 | Hardware name: , BIOS KpxxxFPGA 1P B600 V143 04/22/2021 | pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--) | pc : perfpmumigratecontext+0x98/0x38c | lr : perfpmumigratecontext+0x94/0x38c | | Call trace: | perfpmumigratecontext+0x98/0x38c | hisihns3pmuofflinecpu+0x104/0x12c [hisihns3_pmu]
Use cpuhpstateremoveinstancenocalls() instead of cpuhpstateremove_instance() so that the notifiers don't execute after the PMU device has been unregistered.
[will: Rewrote commit message]
[
{
"id": "CVE-2023-52860-30450fd1",
"target": {
"file": "drivers/perf/hisilicon/hns3_pmu.c"
},
"digest": {
"line_hashes": [
"250159383962223166804643377438946916688",
"29043604003633544374147497867894343354",
"34021550074264238597311295425492460260",
"38919251890859157339948681363859944089",
"119370015261351156859878624033291156145",
"88103532749370263300461730962405447434",
"159642600700231443801204651297062055482",
"11447821291753765073896739592993344694",
"133264210615232590793017681360569855764",
"241518216936247990287966743130086562490"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d04ff5437a45f275db5530efb49b68d0ec851f6f"
},
{
"id": "CVE-2023-52860-c68b2c20",
"target": {
"file": "drivers/perf/hisilicon/hns3_pmu.c"
},
"digest": {
"line_hashes": [
"250159383962223166804643377438946916688",
"29043604003633544374147497867894343354",
"34021550074264238597311295425492460260",
"38919251890859157339948681363859944089",
"119370015261351156859878624033291156145",
"88103532749370263300461730962405447434",
"159642600700231443801204651297062055482",
"11447821291753765073896739592993344694",
"133264210615232590793017681360569855764",
"241518216936247990287966743130086562490"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4589403a343bb0c72a6faf5898386ff964d4e01a"
},
{
"id": "CVE-2023-52860-d5a5f787",
"target": {
"file": "drivers/perf/hisilicon/hns3_pmu.c"
},
"digest": {
"line_hashes": [
"250159383962223166804643377438946916688",
"29043604003633544374147497867894343354",
"34021550074264238597311295425492460260",
"38919251890859157339948681363859944089",
"119370015261351156859878624033291156145",
"88103532749370263300461730962405447434",
"159642600700231443801204651297062055482",
"11447821291753765073896739592993344694",
"133264210615232590793017681360569855764",
"241518216936247990287966743130086562490"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@50b560783f7f71790bcf70e9e9855155fb0af8c1"
},
{
"id": "CVE-2023-52860-fa359054",
"target": {
"file": "drivers/perf/hisilicon/hns3_pmu.c"
},
"digest": {
"line_hashes": [
"250159383962223166804643377438946916688",
"29043604003633544374147497867894343354",
"34021550074264238597311295425492460260",
"38919251890859157339948681363859944089",
"119370015261351156859878624033291156145",
"88103532749370263300461730962405447434",
"159642600700231443801204651297062055482",
"11447821291753765073896739592993344694",
"133264210615232590793017681360569855764",
"241518216936247990287966743130086562490"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3f5827371763f2d9c70719c270055a81d030f3d0"
}
]