CVE-2026-45900: crypto: caam - fix netdev memory leak in dpaa2_caam_probe
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
crypto: caam - fix netdev memory leak in dpaa2_caam_probe
When commit 0e1a4d427f58 ("crypto: caam: Unembed net_dev structure in dpaa2") converted embedded net_device to dynamically allocated pointers, it added cleanup in dpaa2_dpseci_disable() but missed adding cleanup in dpaa2_dpseci_free() for error paths.
This causes memory leaks when dpaa2_dpseci_dpio_setup() fails during probe due to DPIO devices not being ready yet. The kernel's deferred probe mechanism handles the retry successfully, but the netdevs allocated during the failed probe attempt are never freed, resulting in kmemleak reports showing multiple leaked netdev-related allocations all traced back to dpaa2_caam_probe().
Fix this by preserving the CPU mask of allocated netdevs during setup and using it for cleanup in dpaa2_dpseci_free(). This approach ensures that only the CPUs that actually had netdevs allocated will be cleaned up, avoiding potential issues with CPU hotplug scenarios.
The Linux kernel CVE team has assigned CVE-2026-45900 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.11 with commit 0e1a4d427f58b843864d835ccb79c32a118c6a77 and fixed in 6.12.75 with commit d5c6f254528caf78d5de7d9646dc21c81d351827 Issue introduced in 6.11 with commit 0e1a4d427f58b843864d835ccb79c32a118c6a77 and fixed in 6.18.14 with commit d7decb572b55d2af33e59e9858fcee5d9ae69175 Issue introduced in 6.11 with commit 0e1a4d427f58b843864d835ccb79c32a118c6a77 and fixed in 6.19.4 with commit e144cce29851610ce9c6eda405ce21118779aa51 Issue introduced in 6.11 with commit 0e1a4d427f58b843864d835ccb79c32a118c6a77 and fixed in 7.0 with commit 7d43252b3060b0ba4a192dce5dba85a3f39ffe39
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-45900
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/crypto/caam/caamalg_qi2.c
drivers/crypto/caam/caamalg_qi2.h
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/d5c6f254528caf78d5de7d9646dc21c81d351827 https://git.kernel.org/stable/c/d7decb572b55d2af33e59e9858fcee5d9ae69175 https://git.kernel.org/stable/c/e144cce29851610ce9c6eda405ce21118779aa51 https://git.kernel.org/stable/c/7d43252b3060b0ba4a192dce5dba85a3f39ffe39