FAILED: patch "[PATCH] drm/i915/hdcp: require monotonically increasing seq_num_v" failed to apply to 5.15-stable tree
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x db9e64c983dcb07ff256bd455f258c44aa530ff8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072905-drainable-smolder-6384@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From db9e64c983dcb07ff256bd455f258c44aa530ff8 Mon Sep 17 00:00:00 2001
From: Jani Nikula <[email protected]>
Date: Thu, 25 Jun 2026 13:44:07 +0300
Subject: [PATCH] drm/i915/hdcp: require monotonically increasing seq_num_v
The HDCP 2.2 specification requires the seq_num_v to be monotonically increasing, and repeated seq_num_v needs to be treated as an integrity failure. Make it so.
For the first message, seq_num_v must be zero, and is already checked. We can only check for less-than-or-equal for the subsequent messages, where hdcp2_encrypted is true.
Discovered using AI-assisted static analysis confirmed by Intel Product Security.
drivers/gpu/drm/i915/display/intel_hdcp.c +4 -3
@@ -1801,9 +1801,10 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)return -EINVAL ; } -if (seq_num_v < hdcp->seq_num_v) { -/* Roll over of the seq_num_v from repeater. Reauthenticate. */ -drm_dbg_kms (display->drm,"Seq_num_v roll over.\n" ); +if (hdcp->hdcp2_encrypted && seq_num_v <= hdcp->seq_num_v) { +/* Reauthenticate on Seq_num_v repeat or rollover */ +drm_dbg_kms (display->drm,"Seq_num_v %s\n" , + seq_num_v == hdcp->seq_num_v ?"repeat" :"rollover" );return -EINVAL ; }
Sasha Levin
maintainerPATCH 1/1 drm/i915/hdcp: require monotonically increasing seq_num_v
From: Jani Nikula <[email protected]>
[ Upstream commit db9e64c983dcb07ff256bd455f258c44aa530ff8 ]
The HDCP 2.2 specification requires the seq_num_v to be monotonically increasing, and repeated seq_num_v needs to be treated as an integrity failure. Make it so.
For the first message, seq_num_v must be zero, and is already checked. We can only check for less-than-or-equal for the subsequent messages, where hdcp2_encrypted is true.
Discovered using AI-assisted static analysis confirmed by Intel Product Security.
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +4 -3
@@ -1642,9 +1642,10 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)return -EINVAL ; } -if (seq_num_v < hdcp->seq_num_v) { -/* Roll over of the seq_num_v from repeater. Reauthenticate. */ -drm_dbg_kms (&dev_priv->drm,"Seq_num_v roll over.\n" ); +if (hdcp->hdcp2_encrypted && seq_num_v <= hdcp->seq_num_v) { +/* Reauthenticate on Seq_num_v repeat or rollover */ +drm_dbg_kms (&dev_priv->drm,"Seq_num_v %s\n" , + seq_num_v == hdcp->seq_num_v ?"repeat" :"rollover" );return -EINVAL ; }
Signature · 1 line
2.53.0