| 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-2022-49619: net: sfp: fix memory leak in sfp_probe() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| net: sfp: fix memory leak in sfp_probe() |
| |
| sfp_probe() allocates a memory chunk from sfp with sfp_alloc(). When |
| devm_add_action() fails, sfp is not freed, which leads to a memory leak. |
| |
| We should use devm_add_action_or_reset() instead of devm_add_action(). |
| |
| The Linux kernel CVE team has assigned CVE-2022-49619 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 4.14 with commit 73970055450eebc6fc36fd170e56cc45889d0093 and fixed in 4.14.289 with commit 9ec5a97f327a89031fce6cfc3e95543c53936638 |
| Issue introduced in 4.14 with commit 73970055450eebc6fc36fd170e56cc45889d0093 and fixed in 4.19.253 with commit 1545bc727625ea6e8decd717e5d1e8cc704ccf8f |
| Issue introduced in 4.14 with commit 73970055450eebc6fc36fd170e56cc45889d0093 and fixed in 5.4.207 with commit ede990cfc42775bd0141e21f37ee365dcaeeb50f |
| Issue introduced in 4.14 with commit 73970055450eebc6fc36fd170e56cc45889d0093 and fixed in 5.10.132 with commit 67dc32542a1fb7790d0853cf4a5cf859ac6a2002 |
| Issue introduced in 4.14 with commit 73970055450eebc6fc36fd170e56cc45889d0093 and fixed in 5.15.56 with commit 204543581a2f26bb3b997a304c0bd06926ba7f15 |
| Issue introduced in 4.14 with commit 73970055450eebc6fc36fd170e56cc45889d0093 and fixed in 5.18.13 with commit f22ddc8a5278d7fb6369a0aeb0d8775a0aefaaee |
| Issue introduced in 4.14 with commit 73970055450eebc6fc36fd170e56cc45889d0093 and fixed in 5.19 with commit 0a18d802d65cf662644fd1d369c86d84a5630652 |
| |
| 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-2022-49619 |
| 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/phy/sfp.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/9ec5a97f327a89031fce6cfc3e95543c53936638 |
| https://git.kernel.org/stable/c/1545bc727625ea6e8decd717e5d1e8cc704ccf8f |
| https://git.kernel.org/stable/c/ede990cfc42775bd0141e21f37ee365dcaeeb50f |
| https://git.kernel.org/stable/c/67dc32542a1fb7790d0853cf4a5cf859ac6a2002 |
| https://git.kernel.org/stable/c/204543581a2f26bb3b997a304c0bd06926ba7f15 |
| https://git.kernel.org/stable/c/f22ddc8a5278d7fb6369a0aeb0d8775a0aefaaee |
| https://git.kernel.org/stable/c/0a18d802d65cf662644fd1d369c86d84a5630652 |