CVE-2026-90405: media: stm32: dcmi: fix some error handling bugs in probe()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
media: stm32: dcmi: fix some error handling bugs in probe()
There are a few issues here:
1) After we assign:
chan = dma_request_chan(&pdev->dev, "tx");
Then the error paths need to clean up before returning. The first error path does a direct return.
2) The error paths check "dcmi->mdma_chan" but that is not assigned until later so it results in memory leaks. Test "mdma_chan" instead.
3) The error handling calls dma_release_channel(dcmi->dma_chan) before "dcmi->dma_chan" has been assigned which leads to a NULL pointer dereference. Use the "chan" variable instead.
I also moved the call to dma_release_channel() after the call to dma_release_channel() so it mirrors the allocation code better.
The Linux kernel CVE team has assigned CVE-2026-90405 to this issue.
Affected and fixed versions
===========================
Issue introduced in 7.1 with commit bc901885fae0a0273288666609d143e960b6ad3a and fixed in 7.2.6 with commit 4d030d7d1af95d24d3eb6e536a4f09b7bf9a8659 Issue introduced in 7.1 with commit bc901885fae0a0273288666609d143e960b6ad3a and fixed in 7.3-rc1 with commit f1d1ed39ced825615aeac61f0b6a322178756632
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-90405
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/media/platform/st/stm32/stm32-dcmi.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/4d030d7d1af95d24d3eb6e536a4f09b7bf9a8659 https://git.kernel.org/stable/c/f1d1ed39ced825615aeac61f0b6a322178756632