In the Linux kernel, the following vulnerability has been resolved:
cxl: fix possible null-ptr-deref in cxlpciinit_afu|adapter()
If deviceregister() fails in cxlpciafu|adapter(), the device is not added, deviceunregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device.
As comment of deviceregister() says, it should use putdevice() to give up the reference in the error path. So split deviceunregister() into devicedel() and put_device(), then goes to put dev when register fails.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50244.json",
"cna_assigner": "Linux"
}[
{
"id": "CVE-2022-50244-12b4777c",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e68432668ae75b4c814d160f6987ecb0681273",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-1706a8f0",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-1d4a1a1c",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@139abd4c626a6f7ce02789ed5f73aa2256e0542b",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-3876b7f1",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@22511eefa61db26e12c97dd7ada3071dbdfcb004",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-3cd27a9d",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02cd3032b154fa02fdf90e7467abaeed889330b2",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-3dc222f4",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-433e5a9b",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-4d0f44b8",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e68432668ae75b4c814d160f6987ecb0681273",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-5518b55f",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e5481428faf11c79b9c094dd24a1849bbf64ac",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-69dbc39f",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e5481428faf11c79b9c094dd24a1849bbf64ac",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-7171555d",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@139abd4c626a6f7ce02789ed5f73aa2256e0542b",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-73f9b5d1",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-889a5952",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@22511eefa61db26e12c97dd7ada3071dbdfcb004",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-89f23016",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e68432668ae75b4c814d160f6987ecb0681273",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-9cdcb483",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02cd3032b154fa02fdf90e7467abaeed889330b2",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-9ed64e6c",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@139abd4c626a6f7ce02789ed5f73aa2256e0542b",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-a436aa88",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4b2e35df919d99bbbed033c2fa0b607f9f463b5",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-a822b7a8",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@22511eefa61db26e12c97dd7ada3071dbdfcb004",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-b2b138e5",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e5481428faf11c79b9c094dd24a1849bbf64ac",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-b939a864",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-bddcfd06",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@361412dae1690d4b5df6f92fc943cdc773c95cbc",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-c24e2fae",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "cxl_pci_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@361412dae1690d4b5df6f92fc943cdc773c95cbc",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "94766440435804439810858769571458484695",
"length": 769.0
}
},
{
"id": "CVE-2022-50244-ce14ca80",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02cd3032b154fa02fdf90e7467abaeed889330b2",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-e8b17220",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4b2e35df919d99bbbed033c2fa0b607f9f463b5",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-ef07ef29",
"signature_type": "Line",
"target": {
"file": "drivers/misc/cxl/pci.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94552565761496023429951975411026249289",
"16947070943664433920134413887580484445",
"35488252244553393986071545535901233209",
"182002936740509337796033830232284955480",
"167851373618804359592720467215081940915",
"221358995385610331886107128330726337784",
"281043368704899123960685532588797467767",
"55283240049596677871521183631477324949",
"206606815015966182819964119712927082227",
"227472320240801619078107409570934145937",
"176101779140061248465356052536043074479",
"292673144948046949312599804039723364061",
"277847844561008061890108287826766638375",
"224250849885173094567874690121371159040",
"174518774193209892069613929032585740758",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"62356469762744737766607924292954194231",
"46762907666182329853111138400697691326",
"30578070670202186185319310352683568422",
"136955979868959129532821054554584131519",
"103241100297862291702684749833342801565",
"250137840787617207655319261894090476731"
]
}
},
{
"id": "CVE-2022-50244-f6914f45",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4b2e35df919d99bbbed033c2fa0b607f9f463b5",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
},
{
"id": "CVE-2022-50244-f9012e0b",
"signature_type": "Function",
"target": {
"file": "drivers/misc/cxl/pci.c",
"function": "pci_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@361412dae1690d4b5df6f92fc943cdc773c95cbc",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "30111527590409131061655950175546595771",
"length": 957.0
}
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50244.json"