drm/i915/hdcp: guard both capability checks
Status from this message: Queued the series for 6.6, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 1 replyApplied
- v11 patch 1 replySuperseded
Changes in v2 from the cover letter
- add the adapted HDCP2 guard identified during review;
- send the two guards as one series because both are required for the debugfs path.
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | drm/i915/hdcp: Add encoder check in intel_hdcp_get_capabilitydrivers/ | +6 | 0 replies | |
| 2/2 | drm/i915/hdcp: Add encoder check in hdcp2_get_capabilitydrivers/ | +6 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Dnyaneshwar Bhadane |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 6.6.y v2 0/2] drm/i915/hdcp: guard both capability checks
Hi Greg, Sasha, and i915 maintainers,
Thanks for catching the second dereference.
The code in patch 1 is unchanged from v1.
As Sasha pointed out, on 6.6.y, however, intel_hdcp_info() calls intel_hdcp_capable() and then intel_hdcp2_capable(). Guarding only the first helper therefore moves the debugfs NULL dereference to the next call.
Patch 2 adapts upstream commit d34f4f058edf ("drm/i915/hdcp: Add encoder check in hdcp2_get_capability") to the older layout. The 6.6.y tree predates commit 130849f8ec14 ("drm/i915/hdcp: Use intel_connector as argument for hdcp_2_2_capable"), so its dereference is still in the common intel_hdcp2_capable() helper rather than the DP and HDMI shims. The adaptation puts the encoder guard before that dereference and returns false through the older bool interface.
The CNA record for CVE-2024-53050 starts its affected range at 6.7, but that range follows the later shim layout. The same unsafe conversion is already present in the common helper in 6.6.y.
Together, the two patches make both debugfs capability checks return false before converting the missing encoder to a digital port. Both fixes entered mainline before v6.12, so every newer supported stable tree already contains them. The same common HDCP2 dereference is present in 6.1.y and needs separate handling; this series is only for 6.6.y.
Could you please queue both patches for 6.6.y?
An LLM helped adapt and validate both patches; I reviewed the resulting code and validation evidence.
Changes in v2:
- add the adapted HDCP2 guard identified during review;
- send the two guards as one series because both are required for the debugfs path.
v1: https://lore.kernel.org/r/[email protected]
Review: https://lore.kernel.org/r/2026-09-29-daily-reply-0012-re-i915-hdcp-encoder-check-v2-6-6@kernel.org
Thanks,
Artem Dinaburg
Suraj Kandpal (2):
drm/i915/hdcp: Add encoder check in intel_hdcp_get_capability drm/i915/hdcp: Add encoder check in hdcp2_get_capability
drivers/gpu/drm/i915/display/intel_hdcp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
base-commit: 79643295eba17affbd16ca97f3ef04c90266b28c
Signature · 1 line
2.39.5