| From bippy-7c5fe7eed585 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-21934: rapidio: fix an API misues when rio_add_net() fails |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| rapidio: fix an API misues when rio_add_net() fails |
| |
| rio_add_net() calls device_register() and fails when device_register() |
| fails. Thus, put_device() should be used rather than kfree(). Add |
| "mport->net = NULL;" to avoid a use after free issue. |
| |
| The Linux kernel CVE team has assigned CVE-2025-21934 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 5.4.291 with commit d4ec862ce80f64db923a1d942b5d11cf6fc87d36 |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 5.10.235 with commit 88ddad53e4cfb6de861c6d4fb7b25427f46baed5 |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 5.15.179 with commit cdd9f58f7fe41a55fae4305ea51fc234769fd466 |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.1.131 with commit a5f5e520e8fbc6294020ff8afa36f684d92c6e6a |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.6.83 with commit 2537f01d57f08c527e40bbb5862aa6ff43344898 |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.12.19 with commit 22e4977141dfc6d109bf29b495bf2187b4250990 |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.13.7 with commit f0aa4ee1cbbf7789907e5a3f6810de01c146c211 |
| Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.14 with commit b2ef51c74b0171fde7eb69b6152d3d2f743ef269 |
| |
| 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-21934 |
| 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/rapidio/devices/rio_mport_cdev.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/d4ec862ce80f64db923a1d942b5d11cf6fc87d36 |
| https://git.kernel.org/stable/c/88ddad53e4cfb6de861c6d4fb7b25427f46baed5 |
| https://git.kernel.org/stable/c/cdd9f58f7fe41a55fae4305ea51fc234769fd466 |
| https://git.kernel.org/stable/c/a5f5e520e8fbc6294020ff8afa36f684d92c6e6a |
| https://git.kernel.org/stable/c/2537f01d57f08c527e40bbb5862aa6ff43344898 |
| https://git.kernel.org/stable/c/22e4977141dfc6d109bf29b495bf2187b4250990 |
| https://git.kernel.org/stable/c/f0aa4ee1cbbf7789907e5a3f6810de01c146c211 |
| https://git.kernel.org/stable/c/b2ef51c74b0171fde7eb69b6152d3d2f743ef269 |