In the Linux kernel, the following vulnerability has been resolved:
nvdimm: Fix firmware activation deadlock scenarios
Lockdep reports the following deadlock scenarios for CXL root device power-management, deviceprepare(), operations, and deviceshutdown() operations for 'nd_region' devices:
Chain exists of: &nvdimmregionkey --> &nvdimmbus->reconfigmutex --> systemtransitionmutex
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(systemtransitionmutex); lock(&nvdimmbus->reconfigmutex); lock(systemtransitionmutex); lock(&nvdimmregionkey);
Chain exists of: &cxlnvdimmbridgekey --> acpiscanlock --> &cxlroot_key
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&cxlrootkey); lock(acpiscanlock); lock(&cxlrootkey); lock(&cxlnvdimmbridge_key);
These stem from holding nvdimmbuslock() over hibernatequietexec() which walks the entire system device topology taking devicelock() along the way. The nvdimmbuslock() is protecting against unregistration, multiple simultaneous ops callers, and preventing activateshow() from racing activatestore(). For the first 2, the lock is redundant. Unregistration already flushes all ops users, and sysfs already prevents multiple threads to be active in an ops handler at the same time. For the last userspace should already be waiting for its last activatestore() to complete, and does not need activate_show() to flush the write side, so this lock usage can be deleted in these attributes.
[
{
"id": "CVE-2022-49446-04e70f90",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 706.0,
"function_hash": "102519121090960282975331489642403003488"
},
"target": {
"function": "activate_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ceb924ee16b2c8e48dcac3d9ad6be01c40b5a228",
"deprecated": false
},
{
"id": "CVE-2022-49446-05fcc2f1",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 395.0,
"function_hash": "75679152037094176795951673232004201208"
},
"target": {
"function": "nvdimm_bus_firmware_visible",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@641649f31e20df630310f5c22f26c071acc676d4",
"deprecated": false
},
{
"id": "CVE-2022-49446-0758c788",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 469.0,
"function_hash": "188585103772936025461297475723933037533"
},
"target": {
"function": "capability_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fd853fdb40afc052de338693df1372f2ead7be7",
"deprecated": false
},
{
"id": "CVE-2022-49446-0d5f47bc",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"175081025397680700429226083209370073368",
"151492744671013411256090609175752242351",
"274508447527350911910760891122762668623",
"50492879829598691770193083832153140848",
"265175993050596410327152980919866972966",
"107413924506333024647531224485126585103",
"277661495216661931808758100957013962648",
"151492744671013411256090609175752242351",
"210154618488577935441191170629679509337",
"308131025903027758984633546428413187674",
"245586304322275060360727724304594883833",
"135800380085836771692347913882600993287",
"328768858583111284860447068590690668285",
"147587558116242073794896182585097776695",
"296840767958075043251883106657231533689",
"311901785644800678334806566131406532665",
"181627247554300548081603329147632274311",
"103244026979479534729622846992626467632",
"183883346916102116415789751259296987453",
"259332768722127486781043753831054318450",
"88048035565855280987182371928793511712",
"230319990753674517714696446645913982705",
"219588027667507816626928239625032536643",
"218945120745603099854728450888624351481",
"18600110579261046533621410422721622276",
"122234577611420798958720347774711550865",
"218765495579433133616970552708613233583"
],
"threshold": 0.9
},
"target": {
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fd853fdb40afc052de338693df1372f2ead7be7",
"deprecated": false
},
{
"id": "CVE-2022-49446-1fd79faa",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 469.0,
"function_hash": "188585103772936025461297475723933037533"
},
"target": {
"function": "capability_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f97ebc58d5fc83ca1528cd553fa725472ab3ca8",
"deprecated": false
},
{
"id": "CVE-2022-49446-217f8548",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 706.0,
"function_hash": "102519121090960282975331489642403003488"
},
"target": {
"function": "activate_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fd853fdb40afc052de338693df1372f2ead7be7",
"deprecated": false
},
{
"id": "CVE-2022-49446-3b514e7c",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 395.0,
"function_hash": "75679152037094176795951673232004201208"
},
"target": {
"function": "nvdimm_bus_firmware_visible",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ceb924ee16b2c8e48dcac3d9ad6be01c40b5a228",
"deprecated": false
},
{
"id": "CVE-2022-49446-48d977fc",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 706.0,
"function_hash": "102519121090960282975331489642403003488"
},
"target": {
"function": "activate_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@641649f31e20df630310f5c22f26c071acc676d4",
"deprecated": false
},
{
"id": "CVE-2022-49446-48e85f9f",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 706.0,
"function_hash": "102519121090960282975331489642403003488"
},
"target": {
"function": "activate_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6829d1bd3c4b58296ee9e412f7ed4d6cb390192",
"deprecated": false
},
{
"id": "CVE-2022-49446-4cb7d69b",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 785.0,
"function_hash": "157610214064002880780737558206968574545"
},
"target": {
"function": "activate_store",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ceb924ee16b2c8e48dcac3d9ad6be01c40b5a228",
"deprecated": false
},
{
"id": "CVE-2022-49446-4f7ad9c3",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 785.0,
"function_hash": "157610214064002880780737558206968574545"
},
"target": {
"function": "activate_store",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f97ebc58d5fc83ca1528cd553fa725472ab3ca8",
"deprecated": false
},
{
"id": "CVE-2022-49446-5cbd3e5b",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"175081025397680700429226083209370073368",
"151492744671013411256090609175752242351",
"274508447527350911910760891122762668623",
"50492879829598691770193083832153140848",
"265175993050596410327152980919866972966",
"107413924506333024647531224485126585103",
"277661495216661931808758100957013962648",
"151492744671013411256090609175752242351",
"210154618488577935441191170629679509337",
"308131025903027758984633546428413187674",
"245586304322275060360727724304594883833",
"135800380085836771692347913882600993287",
"328768858583111284860447068590690668285",
"147587558116242073794896182585097776695",
"296840767958075043251883106657231533689",
"311901785644800678334806566131406532665",
"181627247554300548081603329147632274311",
"103244026979479534729622846992626467632",
"183883346916102116415789751259296987453",
"259332768722127486781043753831054318450",
"88048035565855280987182371928793511712",
"230319990753674517714696446645913982705",
"219588027667507816626928239625032536643",
"218945120745603099854728450888624351481",
"18600110579261046533621410422721622276",
"122234577611420798958720347774711550865",
"218765495579433133616970552708613233583"
],
"threshold": 0.9
},
"target": {
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@641649f31e20df630310f5c22f26c071acc676d4",
"deprecated": false
},
{
"id": "CVE-2022-49446-6784bfa1",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 785.0,
"function_hash": "157610214064002880780737558206968574545"
},
"target": {
"function": "activate_store",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fd853fdb40afc052de338693df1372f2ead7be7",
"deprecated": false
},
{
"id": "CVE-2022-49446-8afb461d",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 469.0,
"function_hash": "188585103772936025461297475723933037533"
},
"target": {
"function": "capability_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@641649f31e20df630310f5c22f26c071acc676d4",
"deprecated": false
},
{
"id": "CVE-2022-49446-916dcdee",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 395.0,
"function_hash": "75679152037094176795951673232004201208"
},
"target": {
"function": "nvdimm_bus_firmware_visible",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fd853fdb40afc052de338693df1372f2ead7be7",
"deprecated": false
},
{
"id": "CVE-2022-49446-9629ab06",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 395.0,
"function_hash": "75679152037094176795951673232004201208"
},
"target": {
"function": "nvdimm_bus_firmware_visible",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6829d1bd3c4b58296ee9e412f7ed4d6cb390192",
"deprecated": false
},
{
"id": "CVE-2022-49446-9b62175e",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 785.0,
"function_hash": "157610214064002880780737558206968574545"
},
"target": {
"function": "activate_store",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@641649f31e20df630310f5c22f26c071acc676d4",
"deprecated": false
},
{
"id": "CVE-2022-49446-acec3c4b",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 785.0,
"function_hash": "157610214064002880780737558206968574545"
},
"target": {
"function": "activate_store",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6829d1bd3c4b58296ee9e412f7ed4d6cb390192",
"deprecated": false
},
{
"id": "CVE-2022-49446-c5d8ae63",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 469.0,
"function_hash": "188585103772936025461297475723933037533"
},
"target": {
"function": "capability_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6829d1bd3c4b58296ee9e412f7ed4d6cb390192",
"deprecated": false
},
{
"id": "CVE-2022-49446-cdfe4ff4",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 395.0,
"function_hash": "75679152037094176795951673232004201208"
},
"target": {
"function": "nvdimm_bus_firmware_visible",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f97ebc58d5fc83ca1528cd553fa725472ab3ca8",
"deprecated": false
},
{
"id": "CVE-2022-49446-d2d453ae",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"175081025397680700429226083209370073368",
"151492744671013411256090609175752242351",
"274508447527350911910760891122762668623",
"50492879829598691770193083832153140848",
"265175993050596410327152980919866972966",
"107413924506333024647531224485126585103",
"277661495216661931808758100957013962648",
"151492744671013411256090609175752242351",
"210154618488577935441191170629679509337",
"308131025903027758984633546428413187674",
"245586304322275060360727724304594883833",
"135800380085836771692347913882600993287",
"328768858583111284860447068590690668285",
"147587558116242073794896182585097776695",
"296840767958075043251883106657231533689",
"311901785644800678334806566131406532665",
"181627247554300548081603329147632274311",
"103244026979479534729622846992626467632",
"183883346916102116415789751259296987453",
"259332768722127486781043753831054318450",
"88048035565855280987182371928793511712",
"230319990753674517714696446645913982705",
"219588027667507816626928239625032536643",
"218945120745603099854728450888624351481",
"18600110579261046533621410422721622276",
"122234577611420798958720347774711550865",
"218765495579433133616970552708613233583"
],
"threshold": 0.9
},
"target": {
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ceb924ee16b2c8e48dcac3d9ad6be01c40b5a228",
"deprecated": false
},
{
"id": "CVE-2022-49446-d72a46b4",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 469.0,
"function_hash": "188585103772936025461297475723933037533"
},
"target": {
"function": "capability_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ceb924ee16b2c8e48dcac3d9ad6be01c40b5a228",
"deprecated": false
},
{
"id": "CVE-2022-49446-d7acc7df",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"length": 706.0,
"function_hash": "102519121090960282975331489642403003488"
},
"target": {
"function": "activate_show",
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f97ebc58d5fc83ca1528cd553fa725472ab3ca8",
"deprecated": false
},
{
"id": "CVE-2022-49446-ea953858",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"175081025397680700429226083209370073368",
"151492744671013411256090609175752242351",
"274508447527350911910760891122762668623",
"50492879829598691770193083832153140848",
"265175993050596410327152980919866972966",
"107413924506333024647531224485126585103",
"277661495216661931808758100957013962648",
"151492744671013411256090609175752242351",
"210154618488577935441191170629679509337",
"308131025903027758984633546428413187674",
"245586304322275060360727724304594883833",
"135800380085836771692347913882600993287",
"328768858583111284860447068590690668285",
"147587558116242073794896182585097776695",
"296840767958075043251883106657231533689",
"311901785644800678334806566131406532665",
"181627247554300548081603329147632274311",
"103244026979479534729622846992626467632",
"183883346916102116415789751259296987453",
"259332768722127486781043753831054318450",
"88048035565855280987182371928793511712",
"230319990753674517714696446645913982705",
"219588027667507816626928239625032536643",
"218945120745603099854728450888624351481",
"18600110579261046533621410422721622276",
"122234577611420798958720347774711550865",
"218765495579433133616970552708613233583"
],
"threshold": 0.9
},
"target": {
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6829d1bd3c4b58296ee9e412f7ed4d6cb390192",
"deprecated": false
},
{
"id": "CVE-2022-49446-fe699bfd",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"175081025397680700429226083209370073368",
"151492744671013411256090609175752242351",
"274508447527350911910760891122762668623",
"50492879829598691770193083832153140848",
"265175993050596410327152980919866972966",
"107413924506333024647531224485126585103",
"277661495216661931808758100957013962648",
"151492744671013411256090609175752242351",
"210154618488577935441191170629679509337",
"308131025903027758984633546428413187674",
"245586304322275060360727724304594883833",
"135800380085836771692347913882600993287",
"328768858583111284860447068590690668285",
"147587558116242073794896182585097776695",
"296840767958075043251883106657231533689",
"311901785644800678334806566131406532665",
"181627247554300548081603329147632274311",
"103244026979479534729622846992626467632",
"183883346916102116415789751259296987453",
"259332768722127486781043753831054318450",
"88048035565855280987182371928793511712",
"230319990753674517714696446645913982705",
"219588027667507816626928239625032536643",
"218945120745603099854728450888624351481",
"18600110579261046533621410422721622276",
"122234577611420798958720347774711550865",
"218765495579433133616970552708613233583"
],
"threshold": 0.9
},
"target": {
"file": "drivers/nvdimm/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f97ebc58d5fc83ca1528cd553fa725472ab3ca8",
"deprecated": false
}
]