CVE-2023-53784: drm: bridge: dw_hdmi: fix connector access for scdc
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm: bridge: dw_hdmi: fix connector access for scdc
Commit 5d844091f237 ("drm/scdc-helper: Pimp SCDC debugs") changed the scdc interface to pick up an i2c adapter from a connector instead. However, in the case of dw-hdmi, the wrong connector was being used to pass i2c adapter information, since dw-hdmi's embedded connector structure is only populated when the bridge attachment callback explicitly asks for it.
drm-meson is handling connector creation, so this won't happen, leading to a NULL pointer dereference.
Fix it by having scdc functions access dw-hdmi's current connector pointer instead, which is assigned during the bridge enablement stage.
[narmstrong: moved Fixes tag before first S-o-b and added Reported-by tag]
The Linux kernel CVE team has assigned CVE-2023-53784 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit 5d844091f2370f01752c3129b147861b9dcd3d98 and fixed in 6.4.5 with commit 552f79aa9e801ed4f74d6b3221af78042ba4f235 Issue introduced in 6.4 with commit 5d844091f2370f01752c3129b147861b9dcd3d98 and fixed in 6.5 with commit 98703e4e061fb8715c7613cd227e32cdfd136b23
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-2023-53784
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/bridge/synopsys/dw-hdmi.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/552f79aa9e801ed4f74d6b3221af78042ba4f235 https://git.kernel.org/stable/c/98703e4e061fb8715c7613cd227e32cdfd136b23