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 11A3D2F0661 for ; Tue, 30 Dec 2025 12:37:20 +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=1767098240; cv=none; b=C0whbczeYptG3Nn20qW2cyxPZTXcVhYIYp/qsXR3+D34eKmqq6fICGPcG7iQ3+QeJwrwArSdnbXili1c0n/soP2HRcyzepBx+KUF/iBgCJt6fM63uBw0B6qQGMAvOZyhy4WQDjBifUyEifY+22EC1bsmbcy64tn4IvO7i8A11/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767098240; c=relaxed/simple; bh=bE4L9BbKqJ1kcCtiW5ewS95TmucaODxk7zFb8NeNflE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RZGXJBcCV8b14N2LQEYfVLCAeDflShGfjkwQA6ULWLKac9kb9YLqNYlPKGfaNLRPiyTpPSXhathoxr/hymy6lWzROUiS3EmrE85e0ID/553KKG8e20BA88PhtPT7YpgWemwJpSqkjKhmsNLckW+eq70OvnImtE0LhUETxHjdq3A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=piN8ngUZ; 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="piN8ngUZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88622C4CEFB; Tue, 30 Dec 2025 12:37:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767098239; bh=bE4L9BbKqJ1kcCtiW5ewS95TmucaODxk7zFb8NeNflE=; h=From:To:Cc:Subject:Date:Reply-To:From; b=piN8ngUZ+onvhyiy589wHPdMD6V1uojd99gZJLhd/eWbCIMcDiroLMpFqg4xvlmmB omQVKETfnYUf8oIaKvz3Hj1JKkEMA9QFgQRGSfZWmiCYExACmjhQ1UIGQc8sblhqH7 VQS1Ai2lgh/TBPSbkfOslRjfNyenUc1B1i0RuCkw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50887: regulator: core: fix unbalanced of node refcount in regulator_dev_lookup() Date: Tue, 30 Dec 2025 13:37:15 +0100 Message-ID: <2025123014-CVE-2022-50887-6f16@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3732; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=eo+8S8sWW0yogel0UNFlRePKyXDwpAtmRPhWPgnqAIA=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBx6vMRXqTv8VEVStdD6o2c2vem36OMV5Bp2iz6gbHs EcPOTI6YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCIbKxgWnP10PqjM6uWjyfEX /A9IzhX1S4z6wjBPNewI16ZjiYc+Xvw8RTt4P985i10rAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: regulator: core: fix unbalanced of node refcount in regulator_dev_lookup() I got the the following report: OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /i2c/pmic@62/regulators/exten In of_get_regulator(), the node is returned from of_parse_phandle() with refcount incremented, after using it, of_node_put() need be called. The Linux kernel CVE team has assigned CVE-2022-50887 to this issue. Affected and fixed versions =========================== Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 4.9.337 with commit 0e88505ac0a6ae97746bcdbd4b042ee9f20455ae Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 4.14.303 with commit 4dfcf5087db9a34a300d6b99009232d4537c3e6a Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 4.19.270 with commit 3ac888db0f67813d91373a9a61c840f815cd4ec9 Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 5.4.229 with commit d39937f8de641c44a337cec4a2e5d3e8add20a7d Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 5.10.163 with commit f48c474efe05cf9ce5e535b5e0ddd710e963936c Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 5.15.86 with commit cda1895f3b7f324ece1614308a815a3994983b97 Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 6.0.16 with commit 2b93c58adddd98812ad928bbc2063038f3df1ffd Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 6.1.2 with commit 2f98469c3141f8e42ba11075a273fb795bbad57f Issue introduced in 3.3 with commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 and fixed in 6.2 with commit f2b41b748c19962b82709d9f23c6b2b0ce9d2f91 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-50887 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/regulator/core.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/0e88505ac0a6ae97746bcdbd4b042ee9f20455ae https://git.kernel.org/stable/c/4dfcf5087db9a34a300d6b99009232d4537c3e6a https://git.kernel.org/stable/c/3ac888db0f67813d91373a9a61c840f815cd4ec9 https://git.kernel.org/stable/c/d39937f8de641c44a337cec4a2e5d3e8add20a7d https://git.kernel.org/stable/c/f48c474efe05cf9ce5e535b5e0ddd710e963936c https://git.kernel.org/stable/c/cda1895f3b7f324ece1614308a815a3994983b97 https://git.kernel.org/stable/c/2b93c58adddd98812ad928bbc2063038f3df1ffd https://git.kernel.org/stable/c/2f98469c3141f8e42ba11075a273fb795bbad57f https://git.kernel.org/stable/c/f2b41b748c19962b82709d9f23c6b2b0ce9d2f91