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 ACA8F25F976 for ; Fri, 18 Apr 2025 07:03:28 +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=1744959808; cv=none; b=NNuzkX6meELVDbSFeZ3nSO+MB5/P9GhaVEmZh5XbaDcR5aR1ndw0rrMfus+4pgwh649LhGaOQ699OgQCWIohpFQy1JtuGLxyjqhfmke09AWhffFfdrlhAgeBqt9o77Zqr5epMpCPt0EzEPAyqGkvKxLvIAqerRwRzuV4b0fxeEU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744959808; c=relaxed/simple; bh=PAhwh8A13FS170IKfbVhr1P0IIg79o47srekTQWv9So=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hmwoeCNTzM0d1RBPFWy37d3d104FRihnuU7obYM5lTaB7B/A8pNmMjI3J2EfBuzjgEwwOYqv87kDP2EvP1Sm4zr5oaMZphHVdPZpSBSa1s+XxOuzD1Ec4RqQfg/jN9dQ+6j5fyoPEtHy0g4ECPN2ARveyA0Iq/AaTrRSn7oAQI4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SyrHBGb5; 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="SyrHBGb5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D15F4C4CEE2; Fri, 18 Apr 2025 07:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744959808; bh=PAhwh8A13FS170IKfbVhr1P0IIg79o47srekTQWv9So=; h=From:To:Cc:Subject:Date:Reply-to:From; b=SyrHBGb5xSPjcsW2oGWJhfDgQCuDqIAUUVvcDM25yM5nPyj6kKTcLFXT2CP4pE5KS r8eyPQsMjOGciIsjyR8OUh7hqHfYX2fIydm/arNTSLrFnoHBjnQdxE58K1Q+KUY/F8 fW1871LAkDIDFmLlYMBfVJYAZPjh46o7AjjnNhyo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38240: drm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr Date: Fri, 18 Apr 2025 09:02:21 +0200 Message-ID: <2025041818-CVE-2025-38240-4787@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=3109; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=O44Jx3zc+EVRJ+4Wb5tKRCJDX40RYDIuhkgnJyO1P1o=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmMP36Flr8puvCo4M6XZaHei4IVbbbdN/90MuQO946Ew 7UWgvtzO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiR04wzDNhdp3KezJH/mqy zewFMjwc0qd3qDAs2H+0bp7f6kOPNyrt/y0hc/RsdybTcgA= 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: dp: drm_err => dev_err in HPD path to avoid NULL ptr The function mtk_dp_wait_hpd_asserted() may be called before the `mtk_dp->drm_dev` pointer is assigned in mtk_dp_bridge_attach(). Specifically it can be called via this callpath: - mtk_edp_wait_hpd_asserted - [panel probe] - dp_aux_ep_probe Using "drm" level prints anywhere in this callpath causes a NULL pointer dereference. Change the error message directly in mtk_dp_wait_hpd_asserted() to dev_err() to avoid this. Also change the error messages in mtk_dp_parse_capabilities(), which is called by mtk_dp_wait_hpd_asserted(). While touching these prints, also add the error code to them to make future debugging easier. The Linux kernel CVE team has assigned CVE-2025-38240 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit 7eacba9a083be65c0f251c19380ec01147c01ebc and fixed in 6.6.87 with commit 13ec849fd2eab808ee8eba2625df7ebea3b85edf Issue introduced in 6.6 with commit 7eacba9a083be65c0f251c19380ec01147c01ebc and fixed in 6.12.23 with commit 57a9fb47551b33cde7b76d17c0072c3b394f4620 Issue introduced in 6.6 with commit 7eacba9a083be65c0f251c19380ec01147c01ebc and fixed in 6.13.11 with commit 2fda391ef7a701748abd7fa32232981b522c1e07 Issue introduced in 6.6 with commit 7eacba9a083be65c0f251c19380ec01147c01ebc and fixed in 6.14.2 with commit 149a5c38436c229950cf1020992ce65c9549bc19 Issue introduced in 6.6 with commit 7eacba9a083be65c0f251c19380ec01147c01ebc and fixed in 6.15-rc1 with commit 106a6de46cf4887d535018185ec528ce822d6d84 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-38240 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_dp.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/13ec849fd2eab808ee8eba2625df7ebea3b85edf https://git.kernel.org/stable/c/57a9fb47551b33cde7b76d17c0072c3b394f4620 https://git.kernel.org/stable/c/2fda391ef7a701748abd7fa32232981b522c1e07 https://git.kernel.org/stable/c/149a5c38436c229950cf1020992ce65c9549bc19 https://git.kernel.org/stable/c/106a6de46cf4887d535018185ec528ce822d6d84