Closed Bug 1573976 Opened 3 years ago Closed 3 years ago

MediaKeys::GetStatusForPolicy ends up being too permissive


(Core :: Audio/Video: Playback, defect, P2)




Tracking Status
firefox70 --- fixed


(Reporter: bryce, Assigned: bryce)




(Keywords: regression)


(3 files)

Bug 1404230 implemented the HDCP policy check detailed here. This functionality is currently gated behind the media.eme.hdcp-policy-check.enabled pref. However, we're currently much too permissive with our policy checks and will okay pretty much everything.

This can be tested at google's test page for the feature.

This bug is the product of 2 factors:

  1. Since the initial proposal of that spec, the format of the minHdcpVersion member has changed. E.g. hdcp-1.0 became 1.0. Our conversions for these strings where not updated accordingly.
  2. Our original implementation of the conversion from string to Widevine CDM enum treats unrecognized values as none. We should not do this as it leads to issues where the CDM treats the check as having no HDCP requirement -- the most lenient requirement.

We need to update the strings we're matching on, as well as throwing an error if we encounter an unrecognized string.

Marked this as confidential on creation when it does not need to be.

Group: mozilla-employee-confidential
Priority: -- → P2
Assignee: nobody → bvandyk

GetStatusPolicy should not treat unrecognized values as if they were no hdcp
policy. A trivial example is that if we do not recognize a newer hdcp string,
say "2.3", then we should not query if the CDM supports this policy as if it
were no hdcp.

This patch means that we surface and error to JS if we do no recognize an hdcp

These strings are detailed at, and were
changed since the original implementation of this feature.

Depends on D42061

If Status is defined (X11 headers define it as int), it ends up busting the
Status enum used in the Widevine headers. Avoid this by undeffing it before
including headers.

Pushed by
Fix GetStatusForPolicy handling of unrecognized values. r=dminor,alwu
Update hdcp version strings used in GetStatusForPolicy. r=dminor,alwu
Undef Status in GMPMessageUtils to avoid bustages in Linux unified build. r=dminor
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.