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.
[ { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e68432668ae75b4c814d160f6987ecb0681273", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-12b4777c", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-1706a8f0", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@139abd4c626a6f7ce02789ed5f73aa2256e0542b", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-1d4a1a1c", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@22511eefa61db26e12c97dd7ada3071dbdfcb004", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-3876b7f1", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02cd3032b154fa02fdf90e7467abaeed889330b2", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-3cd27a9d", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-3dc222f4", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-433e5a9b", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e68432668ae75b4c814d160f6987ecb0681273", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-4d0f44b8", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e5481428faf11c79b9c094dd24a1849bbf64ac", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-5518b55f", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e5481428faf11c79b9c094dd24a1849bbf64ac", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-69dbc39f", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@139abd4c626a6f7ce02789ed5f73aa2256e0542b", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-7171555d", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-73f9b5d1", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@22511eefa61db26e12c97dd7ada3071dbdfcb004", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-889a5952", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e68432668ae75b4c814d160f6987ecb0681273", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-89f23016", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02cd3032b154fa02fdf90e7467abaeed889330b2", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-9cdcb483", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@139abd4c626a6f7ce02789ed5f73aa2256e0542b", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-9ed64e6c", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4b2e35df919d99bbbed033c2fa0b607f9f463b5", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-a436aa88", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@22511eefa61db26e12c97dd7ada3071dbdfcb004", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-a822b7a8", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82e5481428faf11c79b9c094dd24a1849bbf64ac", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-b2b138e5", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-b939a864", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@361412dae1690d4b5df6f92fc943cdc773c95cbc", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-bddcfd06", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@361412dae1690d4b5df6f92fc943cdc773c95cbc", "target": { "function": "cxl_pci_init_adapter", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-c24e2fae", "digest": { "function_hash": "94766440435804439810858769571458484695", "length": 769.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02cd3032b154fa02fdf90e7467abaeed889330b2", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-ce14ca80", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4b2e35df919d99bbbed033c2fa0b607f9f463b5", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-e8b17220", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339", "target": { "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Line", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-ef07ef29", "digest": { "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" ], "threshold": 0.9 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4b2e35df919d99bbbed033c2fa0b607f9f463b5", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-f6914f45", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@361412dae1690d4b5df6f92fc943cdc773c95cbc", "target": { "function": "pci_init_afu", "file": "drivers/misc/cxl/pci.c" }, "signature_type": "Function", "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50244-f9012e0b", "digest": { "function_hash": "30111527590409131061655950175546595771", "length": 957.0 } } ]