Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 628D9219A74 for ; Wed, 26 Feb 2025 02:24:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536666; cv=none; b=EQE+jAm945S3Ep0ttOLSBPRuUeW2afd0kql3zlKwxWav5YKyP4oQp4jDMofVHMKrC2izk7589VdpXWpyumJ97vfURG2jwV3FrVisSBRGHO52vH+fWXbEgWfM7EVunmT7agDI/AobKxIrsffvJ4d68VGiQPsbY3KQovFxMZDclpA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536666; c=relaxed/simple; bh=66M10EXH6zWIuEyuwoHHmKTg0dWjB2i8/xV/unyUa5Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qMyG04p0O44/MmmnLHnRw3tiiyMOAeAcbYl27o60SSLqRdrYoyzVt6XAken4pNaMpMmOA+cI1zVujp8Q9NNPpcDhzmNplhRDUMFxhRtz8VeDozXhEfQY7Yhjn1ccx/sqsRwLUfDthL7epnF2/o1Op9yasjdOhF/1ihlCfrZZn8E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cKxSPBmy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="cKxSPBmy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36762C4CEDD; Wed, 26 Feb 2025 02:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536666; bh=66M10EXH6zWIuEyuwoHHmKTg0dWjB2i8/xV/unyUa5Y=; h=From:To:Cc:Subject:Date:Reply-to:From; b=cKxSPBmyPhG7Dpnk+1ehWfSJ97cIGav2VGU2p2pue/t/qx6qGx3/zTJfEKoc0uGcN wcv0/MDARQ1fEdph0MRentgB5RfCSHC9R7qLjzim8FpZ5tLLNr59sqHX1/PqJzrMjz I3oeqzucyLQHdBVhmic0HxjShadtY/m4f+uwg0Xw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49619: net: sfp: fix memory leak in sfp_probe() Date: Wed, 26 Feb 2025 03:23:02 +0100 Message-ID: <2025022615-CVE-2022-49619-bba8@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2536; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=66M10EXH6zWIuEyuwoHHmKTg0dWjB2i8/xV/unyUa5Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qq7XO8/8acxiutFEobrSmL1vXqqIcVjJgR8FE/4X3 g/1SmzpiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIk4HGSYZ5gtmvFC9mXmVruN XgbM+i0LTj+2ZJhndfLgt5vO9z7Ib5VzOLg/Yd0bScEEAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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 =========================== Fixed in 4.14.289 with commit 9ec5a97f327a89031fce6cfc3e95543c53936638 Fixed in 4.19.253 with commit 1545bc727625ea6e8decd717e5d1e8cc704ccf8f Fixed in 5.4.207 with commit ede990cfc42775bd0141e21f37ee365dcaeeb50f Fixed in 5.10.132 with commit 67dc32542a1fb7790d0853cf4a5cf859ac6a2002 Fixed in 5.15.56 with commit 204543581a2f26bb3b997a304c0bd06926ba7f15 Fixed in 5.18.13 with commit f22ddc8a5278d7fb6369a0aeb0d8775a0aefaaee 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