CVE-2025-71186: dmaengine: stm32: dmamux: fix device leak on route allocation
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: stm32: dmamux: fix device leak on route allocation
Make sure to drop the reference taken when looking up the DMA mux platform device during route allocation.
Note that holding a reference to a device does not prevent its driver data from going away so there is no point in keeping the reference.
The Linux kernel CVE team has assigned CVE-2025-71186 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.15 with commit df7e762db5f6c8dbd9e480f1c9ef9851de346657 and fixed in 6.6.122 with commit 1a179ac01ff3993ab97e33cc77c316ed7415cda1 Issue introduced in 4.15 with commit df7e762db5f6c8dbd9e480f1c9ef9851de346657 and fixed in 6.12.67 with commit 2fb10259d4efb4367787b5ae9c94192e8a91c648 Issue introduced in 4.15 with commit df7e762db5f6c8dbd9e480f1c9ef9851de346657 and fixed in 6.18.7 with commit 3ef52d31cce8ba816739085a61efe07b63c6cf27 Issue introduced in 4.15 with commit df7e762db5f6c8dbd9e480f1c9ef9851de346657 and fixed in 6.19-rc6 with commit dd6e4943889fb354efa3f700e42739da9bddb6ef
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-2025-71186
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/dma/stm32/stm32-dmamux.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/1a179ac01ff3993ab97e33cc77c316ed7415cda1 https://git.kernel.org/stable/c/2fb10259d4efb4367787b5ae9c94192e8a91c648 https://git.kernel.org/stable/c/3ef52d31cce8ba816739085a61efe07b63c6cf27 https://git.kernel.org/stable/c/dd6e4943889fb354efa3f700e42739da9bddb6ef