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 5EC5E2C2369 for ; Mon, 15 Sep 2025 14:47:32 +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=1757947653; cv=none; b=KHO8H6fEB7ZQLC+2+2Qoy6iGlEIerebEehxAf2hTFt208nuhw1owJfiIHZN8mCgOZV1gf76TDw3Ic+NM3eUs36EpweUb4Xh0t6GZvHp4UbVSfc6RbLzJbRcwhEgzmZsMFGq9F2yQfWplZjIpdqUzARrX+2fmDFiiFuIvDVlhx0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757947653; c=relaxed/simple; bh=rm8BeuwHyGmoFQZWXbnt0JojC/IXj5YRb5XE+YGQBXI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OrE4SXtOf1V2YRq6Epx5Hh7l8v27bqc0DcpwT8AnWeQIAmPLL+LSrGlm90QOmHXzQwH1urETkgAyOBy4x4dlJGCL6fBK6kwsj/0eD2zL9BXFIVLbPfsMAAw2kNpiPyKJYHpitiOmujDavimpNxGOg+7m+LAGgE/K243Sy6fjZ00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FndWxxYX; 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="FndWxxYX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53DD9C4CEF5; Mon, 15 Sep 2025 14:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757947652; bh=rm8BeuwHyGmoFQZWXbnt0JojC/IXj5YRb5XE+YGQBXI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FndWxxYXlYbeW+GyBq5Kk+5rpVTK59G7UEJr3Arc+8ZggayEvTcXkjRkhy5CpFpKs CZN/3SHVglVbMzlD7Y+qPAXBtE0fAndsCIVqt/dmZtP2AJ3GzL7EKRLq3gep7/NaHP 8DIHhDnxBt9Vw7jAFLv6tJcezGd43X1C/lW3IXUU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50311: cxl: Fix refcount leak in cxl_calc_capp_routing Date: Mon, 15 Sep 2025 16:46:13 +0200 Message-ID: <2025091500-CVE-2022-50311-0c21@gregkh> X-Mailer: git-send-email 2.51.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=3393; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=i8/nYsLkD17e/Jkqsqu1+6Z1qCLOdnGVqCiBhiisoLQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkn1FaweolKlojWCN7cwrCWrfZuWeKu2duFiwyfPPjv+ 3e6e69/RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEuJphQUv55PYfrU7heiEP /B67//Z50FdpyjC//opgwpWXE55wFHYeTU5aciBRwXgSAA== 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: cxl: Fix refcount leak in cxl_calc_capp_routing of_get_next_parent() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. This function only calls of_node_put() in normal path, missing it in the error path. Add missing of_node_put() to avoid refcount leak. The Linux kernel CVE team has assigned CVE-2022-50311 to this issue. Affected and fixed versions =========================== Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 4.14.303 with commit c9bebc503881c1391f6c4f820134884adecf1519 Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 4.19.270 with commit ee870f72465015327ad96204b0e92450d04870cd Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 5.4.229 with commit f2d60f6ba173cded65081cee690b67802395a479 Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 5.10.163 with commit 81c8bbf5b2b5f0c8030fff1716c00849cda8571a Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 5.15.86 with commit 6a310e8db5409676b4b3e6c1f54dff174e4fd04d Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 6.0.16 with commit 651e8bc9d0418c20a1989b7c078c64c2a6346fa3 Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 6.1.2 with commit 2d7b6580384e6d65419933ddc525bd176095da54 Issue introduced in 4.12 with commit f24be42aab37c6d07c05126673138e06223a6399 and fixed in 6.2 with commit 1d09697ff22908ae487fc8c4fbde1811732be523 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-50311 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/misc/cxl/pci.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/c9bebc503881c1391f6c4f820134884adecf1519 https://git.kernel.org/stable/c/ee870f72465015327ad96204b0e92450d04870cd https://git.kernel.org/stable/c/f2d60f6ba173cded65081cee690b67802395a479 https://git.kernel.org/stable/c/81c8bbf5b2b5f0c8030fff1716c00849cda8571a https://git.kernel.org/stable/c/6a310e8db5409676b4b3e6c1f54dff174e4fd04d https://git.kernel.org/stable/c/651e8bc9d0418c20a1989b7c078c64c2a6346fa3 https://git.kernel.org/stable/c/2d7b6580384e6d65419933ddc525bd176095da54 https://git.kernel.org/stable/c/1d09697ff22908ae487fc8c4fbde1811732be523