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 E9DA02FE064 for ; Tue, 19 Aug 2025 17:21:19 +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=1755624080; cv=none; b=Bzioq8LZirv8LNnu8IshOSetH6sNNcVLuiFoY+cBrbTG+wRqGU6p3pqu6OjdtcjPHMYGoYP/OOFlfzqpZt1cxCCMktOp7fks3FtCRJQqvICaT+eBFDzIGPBSmPHdr8r0BvFuE5UTSMmsZ12ZE2u2JcBkcOewmRX4S7MqhaYocXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755624080; c=relaxed/simple; bh=WKGIogGvb++V2tivAIDacWnmcVu8cqQ6k4YzlFEO8jc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VcGY75C6zKMpYiZ6AyjvBC82FjAbaWFcHax271JCUU/Gk6tHtiPsJvJIOe2a2xRSv8XIP1yrPT8jKRGU8QWuPAhZaNVRdqYMql0B2D04CweFjCpQVlpM3rRHT7rNTNYdjsTYR2/zrSBm5IdUJLD+nBxr3WWwpCxRfM2/foL1n9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1U2s3T8r; 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="1U2s3T8r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D82DC4CEF1; Tue, 19 Aug 2025 17:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755624079; bh=WKGIogGvb++V2tivAIDacWnmcVu8cqQ6k4YzlFEO8jc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=1U2s3T8rCuDXJEw2DEy5pszS5frk+1Hd/qLhF+Cp2u+vL0wmM9hOgMdacYm3epsYo UP8S1ekuykB2tiFYj6nTUkmP3h8MIde0F6OLLzcVn9Rp2PKKApbpDq3gGvVPBJlazd VV/8IEENrE9eGIJIIcWDzxPWtaYtPe82cd2ScNfg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38597: drm/rockchip: vop2: fail cleanly if missing a primary plane for a video-port Date: Tue, 19 Aug 2025 19:18:43 +0200 Message-ID: <2025081919-CVE-2025-38597-82d6@gregkh> X-Mailer: git-send-email 2.50.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=2751; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AdCMGF8FhLmk8XASSE6/7bNhLm5ohWf2WRrjukFLCwM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlLNt72sX/jxL3ie+L9j981p3P/3PRwhchDfqW/2+5ce H7QxDKBvSOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmombPsGBLR+hfFzEG+UWT duznf7Q/rS3j/DGGORwC8qLba805t7U+P1BVZOM5c4fOUgA= 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/rockchip: vop2: fail cleanly if missing a primary plane for a video-port Each window of a vop2 is usable by a specific set of video ports, so while binding the vop2, we look through the list of available windows trying to find one designated as primary-plane and usable by that specific port. The code later wants to use drm_crtc_init_with_planes with that found primary plane, but nothing has checked so far if a primary plane was actually found. For whatever reason, the rk3576 vp2 does not have a usable primary window (if vp0 is also in use) which brought the issue to light and ended in a null-pointer dereference further down. As we expect a primary-plane to exist for a video-port, add a check at the end of the window-iteration and fail probing if none was found. The Linux kernel CVE team has assigned CVE-2025-38597 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit 604be85547ce4d61b89292d2f9a78c721b778c16 and fixed in 6.15.10 with commit e1eef239399927b368f70a716044fb10085627c8 Issue introduced in 5.19 with commit 604be85547ce4d61b89292d2f9a78c721b778c16 and fixed in 6.16.1 with commit 38682edbbad272b5f8c7bf55128b42cd10626f73 Issue introduced in 5.19 with commit 604be85547ce4d61b89292d2f9a78c721b778c16 and fixed in 6.17-rc1 with commit f9f68bf1d0efeadb6c427c9dbb30f307a7def19b 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-38597 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/rockchip/rockchip_drm_vop2.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/e1eef239399927b368f70a716044fb10085627c8 https://git.kernel.org/stable/c/38682edbbad272b5f8c7bf55128b42cd10626f73 https://git.kernel.org/stable/c/f9f68bf1d0efeadb6c427c9dbb30f307a7def19b