CVE-2023-53658: spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
In the Linux kernel, the following vulnerability has been resolved:
spi: bcm-qspi: return error if neither hifmspi nor mspi is available
If neither a "hifmspi" nor "mspi" resource is present, the driver will just early exit in probe but still return success. Apart from not doing anything meaningful, this would then also lead to a null pointer access on removal, as platformgetdrvdata() would return NULL, which it would then try to dereference when trying to unregister the spi master.
Fix this by unconditionally calling devmioremapresource(), as it can handle a NULL res and will then return a viable ERRPTR() if we get one.
The "return 0;" was previously a "goto qspiresourceerr;" where then ret was returned, but since ret was still initialized to 0 at this place this was a valid conversion in 63c5395bb7a9 ("spi: bcm-qspi: Fix use-after-free on unbind"). The issue was not introduced by this commit, only made more obvious.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-53658?
CVE-2023-53658 is classified with moderate severity due to its impact on the Linux kernel functionality.
How do I fix CVE-2023-53658?
To fix CVE-2023-53658, update your Linux kernel to the latest stable version that includes the patch.
What systems are affected by CVE-2023-53658?
CVE-2023-53658 affects the Linux kernel, specifically the bcm-qspi driver.
What is the impact of CVE-2023-53658?
The impact of CVE-2023-53658 is potential improper resource handling in the bcm-qspi driver.
Is there a workaround for CVE-2023-53658?
There is no official workaround for CVE-2023-53658; upgrading the kernel is the recommended action.