In the Linux kernel, the following vulnerability has been resolved:
mmc: rtsxpci: fix return value check of mmcadd_host()
mmcaddhost() may return error, if we ignore its return value, the memory that allocated in mmcallochost() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path.
So fix this by checking the return value and calling mmcfreehost() in the error path, beside, runtime PM also needs be disabled.
[
{
"id": "CVE-2022-50267-126c4f3d",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ffa9b2a79e3e959683efbad3f6db937eca9d38f5",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"104422429401639341700825092814851032151",
"170487421948829196091675411822541043668",
"283487936978522428768051645487947118977",
"1687234650409813324850880717070771903",
"270665981861069688576424728135397070537",
"315055919571282685009321752146270489454",
"107856454199401032529143866120963385910",
"135832521888617068551190199855307131916"
]
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c"
}
},
{
"id": "CVE-2022-50267-3a96ce26",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5cd4e04eccaec140da6fa04db056a76282ee6852",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"104422429401639341700825092814851032151",
"170487421948829196091675411822541043668",
"283487936978522428768051645487947118977",
"1687234650409813324850880717070771903",
"270665981861069688576424728135397070537",
"315055919571282685009321752146270489454",
"107856454199401032529143866120963385910",
"135832521888617068551190199855307131916"
]
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c"
}
},
{
"id": "CVE-2022-50267-64c49e7a",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ffa9b2a79e3e959683efbad3f6db937eca9d38f5",
"signature_type": "Function",
"digest": {
"function_hash": "294855177829174986321947562316904748447",
"length": 1018.0
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c",
"function": "rtsx_pci_sdmmc_drv_probe"
}
},
{
"id": "CVE-2022-50267-7c66dd71",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@30dc645461dfc63e52b3af8ee4a98e17bf14bacf",
"signature_type": "Function",
"digest": {
"function_hash": "294855177829174986321947562316904748447",
"length": 1018.0
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c",
"function": "rtsx_pci_sdmmc_drv_probe"
}
},
{
"id": "CVE-2022-50267-81d2458e",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5cd4e04eccaec140da6fa04db056a76282ee6852",
"signature_type": "Function",
"digest": {
"function_hash": "294855177829174986321947562316904748447",
"length": 1018.0
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c",
"function": "rtsx_pci_sdmmc_drv_probe"
}
},
{
"id": "CVE-2022-50267-b8b4cc1b",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c87db77423a282b3b38b8a6daf057b822680516",
"signature_type": "Function",
"digest": {
"function_hash": "294855177829174986321947562316904748447",
"length": 1018.0
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c",
"function": "rtsx_pci_sdmmc_drv_probe"
}
},
{
"id": "CVE-2022-50267-c805d086",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@30dc645461dfc63e52b3af8ee4a98e17bf14bacf",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"104422429401639341700825092814851032151",
"170487421948829196091675411822541043668",
"283487936978522428768051645487947118977",
"1687234650409813324850880717070771903",
"270665981861069688576424728135397070537",
"315055919571282685009321752146270489454",
"107856454199401032529143866120963385910",
"135832521888617068551190199855307131916"
]
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c"
}
},
{
"id": "CVE-2022-50267-dff52ae3",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c87db77423a282b3b38b8a6daf057b822680516",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"104422429401639341700825092814851032151",
"170487421948829196091675411822541043668",
"283487936978522428768051645487947118977",
"1687234650409813324850880717070771903",
"270665981861069688576424728135397070537",
"315055919571282685009321752146270489454",
"107856454199401032529143866120963385910",
"135832521888617068551190199855307131916"
]
},
"deprecated": false,
"target": {
"file": "drivers/mmc/host/rtsx_pci_sdmmc.c"
}
}
]