| From bippy-5f407fcff5a0 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-2024-50190: ice: fix memleak in ice_init_tx_topology() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| ice: fix memleak in ice_init_tx_topology() |
| |
| Fix leak of the FW blob (DDP pkg). |
| |
| Make ice_cfg_tx_topo() const-correct, so ice_init_tx_topology() can avoid |
| copying whole FW blob. Copy just the topology section, and only when |
| needed. Reuse the buffer allocated for the read of the current topology. |
| |
| This was found by kmemleak, with the following trace for each PF: |
| [<ffffffff8761044d>] kmemdup_noprof+0x1d/0x50 |
| [<ffffffffc0a0a480>] ice_init_ddp_config+0x100/0x220 [ice] |
| [<ffffffffc0a0da7f>] ice_init_dev+0x6f/0x200 [ice] |
| [<ffffffffc0a0dc49>] ice_init+0x29/0x560 [ice] |
| [<ffffffffc0a10c1d>] ice_probe+0x21d/0x310 [ice] |
| |
| Constify ice_cfg_tx_topo() @buf parameter. |
| This cascades further down to few more functions. |
| |
| The Linux kernel CVE team has assigned CVE-2024-50190 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.10 with commit cc5776fe183208115e42c044497e193e4671a2b9 and fixed in 6.11.4 with commit 43544b4e30732c3d88f423252281915d5bc739b6 |
| Issue introduced in 6.10 with commit cc5776fe183208115e42c044497e193e4671a2b9 and fixed in 6.12 with commit c188afdc36113760873ec78cbc036f6b05f77621 |
| |
| 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-2024-50190 |
| 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/net/ethernet/intel/ice/ice_ddp.c |
| drivers/net/ethernet/intel/ice/ice_ddp.h |
| drivers/net/ethernet/intel/ice/ice_main.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/43544b4e30732c3d88f423252281915d5bc739b6 |
| https://git.kernel.org/stable/c/c188afdc36113760873ec78cbc036f6b05f77621 |