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 10EE6285C9C for ; Wed, 18 Jun 2025 11:13: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=1750245200; cv=none; b=Z9rYDcvyrh2UtU7/rLzJEyqca2374TyLjdJCAD/YNJZe84s5dnGLiK48YlXj4ZeVXd3Ym4w2wb6IpwjfGlVc+o/+QpqusKtq35M6i3BgTb+Lv6AwQzxLBUNfcNlGoK8FLfgY852O9q2YUMM/B4LVfwS0snTRN/a24BB2EjYx9Kg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245200; c=relaxed/simple; bh=FcZwkgqnWp1xfF7i/8YV8O7lRugw3cqevIrJHGJvukI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Vc6Cj4/aunl01Ib+dcG8dPH6yBoDRZM51B0gTPxoAY3/HpXtpOn1a/b/HkB2xaGarGhDo6vuZnuohcEItqqtQgoLF0teTdrX9xE7xqDEqTeAO9UHo+GqdZcyu8NdnhqsCnAaI67kTp3SDG+NSY8PQLfDOMe4tUcxs76RRpM0p50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pHD5lBKX; 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="pHD5lBKX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 757A3C4CEE7; Wed, 18 Jun 2025 11:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245199; bh=FcZwkgqnWp1xfF7i/8YV8O7lRugw3cqevIrJHGJvukI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pHD5lBKX2Kqr53BJDkyAcYyeLXzvr085CdQZvhdSMN689iDGPxNBFPr92iqq9xWKA inpaBtp6nuxvU8PNZjE6gaaEhGiPCeJPBljI9hzK18pXOvZecy8xcWkqcyeG1LQJS+ iQ1QRs7SxnkHxJzzusHRBQZCT65K5g+uqdCrVNHc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50158: mtd: partitions: Fix refcount leak in parse_redboot_of Date: Wed, 18 Jun 2025 13:03:43 +0200 Message-ID: <2025061824-CVE-2022-50158-4eeb@gregkh> X-Mailer: git-send-email 2.49.0 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=3035; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=KZ6PfGtBt/75zPQhZPNZVlcHg/MIOHflourQofOzNUs=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc1quW/sYan5gPZda5rQ3td44bMICh2sNH97Osdc5e 2XDNnmvjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI88kMC5rXree78TyoufTz 10vFK3Zki7xe58uw4FCySyznhzaBS3bNuvUvthufrp3UAAA= 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: mtd: partitions: Fix refcount leak in parse_redboot_of of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. The Linux kernel CVE team has assigned CVE-2022-50158 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4.132 with commit 6490ed7c4684caf9851a0b98e0ab17a8d693dada and fixed in 5.4.211 with commit f3cc27198c5d78cdda60a55ae749f815cd1fe5eb Issue introduced in 5.10.50 with commit 2f8824f556a3ebea9840c53326e55cc183316611 and fixed in 5.10.137 with commit 55d0f7da66dec93c4d53d0886a1555618079a900 Issue introduced in 5.14 with commit 237960880960863fb41888763d635b384cffb104 and fixed in 5.15.61 with commit 8ea607579d300b2f7fc997f3dd20949114565fcd Issue introduced in 5.14 with commit 237960880960863fb41888763d635b384cffb104 and fixed in 5.18.18 with commit 7ec48ac18d8f9e002ce9bfbad32741086739e499 Issue introduced in 5.14 with commit 237960880960863fb41888763d635b384cffb104 and fixed in 5.19.2 with commit e24af43d0cbe9f6aaa413c15ccce50bbbfd61e0e Issue introduced in 5.14 with commit 237960880960863fb41888763d635b384cffb104 and fixed in 6.0 with commit 9f7e62815cf3cbbcb1b8cb21649fb4dfdb3aa016 Issue introduced in 5.12.17 with commit fa132c7ea108eacc67357ffe3172d3e68fcd71a2 Issue introduced in 5.13.2 with commit d5023eb76f0dc651558b0c7ba04565891ff18435 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-50158 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/mtd/parsers/redboot.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/f3cc27198c5d78cdda60a55ae749f815cd1fe5eb https://git.kernel.org/stable/c/55d0f7da66dec93c4d53d0886a1555618079a900 https://git.kernel.org/stable/c/8ea607579d300b2f7fc997f3dd20949114565fcd https://git.kernel.org/stable/c/7ec48ac18d8f9e002ce9bfbad32741086739e499 https://git.kernel.org/stable/c/e24af43d0cbe9f6aaa413c15ccce50bbbfd61e0e https://git.kernel.org/stable/c/9f7e62815cf3cbbcb1b8cb21649fb4dfdb3aa016