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 1E8781B040B for ; Tue, 23 Sep 2025 06:01: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=1758607287; cv=none; b=bWh30Ws3xUo25jFyJ+a79Hf6v6u9ynj4XHPRkSSCGziDJ2pcX3R6HZ6X7eebajRY4vGWhGXt9+gZbPcOdDwLZTdYcmwPsWiLoqhmSjy6pewi4ZzwoYS+ATzOdJqfwRO4kQL+9xCUOEgxTO5CCrds3gKFypLuFKNvQ0V36DDbHqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758607287; c=relaxed/simple; bh=Tq92p0WQPqPY9odhz62CEUJCNXjkqi1fAU7mFfyfGqs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Y78KSyQ/+EVmSO71hko3XrfxgXck3AvGTUIVOVfmaSwyMiRIzE461YxulQvw2X5CsaQCZZLwk1PB0B88RaNgsvDP+xmKG7RW4MbiHhnuq0Wnzr4huQQt+nhkDVCmOlkEANCvDfo6974oAzNvL4CTCrqblz+ngzl8Vk7GMbDAbjk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pXz5MnST; 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="pXz5MnST" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63C22C4CEF5; Tue, 23 Sep 2025 06:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758607286; bh=Tq92p0WQPqPY9odhz62CEUJCNXjkqi1fAU7mFfyfGqs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pXz5MnSTOyhPLg2Cl8sCzWarOttNO2EJ3oAiAlcQKaQhTaaAm9zKkDJYVPG2fEvag 4X1Yg21cETauPj+aj0AwnLHMjCMEbgIkuDBmf8+4G8oGMgIrzQO9Rxr/yjHw1Ah2+W R4W2WCnFngNWg6o2LyIGABYTvDnzEOUKHlZtHGu0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39882: drm/mediatek: fix potential OF node use-after-free Date: Tue, 23 Sep 2025 08:01:13 +0200 Message-ID: <2025092301-CVE-2025-39882-1d0a@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=2571; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Tl8BLeaXg6aAEtYxTb+yIBBzhek17nNGT5WJfWFdMJc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmXzOc9ENG+fEPzTUqjbBvr10WhV3sPh33tz7OW6p/tt PhyJdfSjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhI5ieGBY3CwReittwO1Duw gXu73brb2zQNDBkWHN3IEvJoanpGlvZdHqu4sBDuxFknAQ== 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: drm/mediatek: fix potential OF node use-after-free The for_each_child_of_node() helper drops the reference it takes to each node as it iterates over children and an explicit of_node_put() is only needed when exiting the loop early. Drop the recently introduced bogus additional reference count decrement at each iteration that could potentially lead to a use-after-free. The Linux kernel CVE team has assigned CVE-2025-39882 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.105 with commit 7d98166183d627c0b9daca7672b2191fae0f8a03 and fixed in 6.6.107 with commit b2fbe0f9f80b9cfa1e06ddcf8b863d918394ef1d Issue introduced in 6.12.45 with commit 31ce7c089b50c3d3056c37e0e25e7535e4428ae1 and fixed in 6.12.48 with commit b58a26cdd4795c1ce6a80e38e9348885555dacd6 Issue introduced in 6.16.5 with commit fae58d0155a979a8c414bbc12db09dd4b2f910d0 and fixed in 6.16.8 with commit c4901802ed1ce859242e10af06e6a7752cba0497 Issue introduced in 6.17-rc4 with commit 1f403699c40f0806a707a9a6eed3b8904224021a and fixed in 6.17-rc6 with commit 4de37a48b6b58faaded9eb765047cf0d8785ea18 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-2025-39882 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/gpu/drm/mediatek/mtk_drm_drv.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/b2fbe0f9f80b9cfa1e06ddcf8b863d918394ef1d https://git.kernel.org/stable/c/b58a26cdd4795c1ce6a80e38e9348885555dacd6 https://git.kernel.org/stable/c/c4901802ed1ce859242e10af06e6a7752cba0497 https://git.kernel.org/stable/c/4de37a48b6b58faaded9eb765047cf0d8785ea18