Closed Bug 1573976 Opened 2 years ago Closed 2 years ago

MediaKeys::GetStatusForPolicy ends up being too permissive

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: bryce, Assigned: bryce)

References

(Regression)

Details

Attachments

(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
string.

These strings are detailed at
https://github.com/WICG/hdcp-detection/blob/master/explainer.md, 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 bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9666df4faff7
Fix GetStatusForPolicy handling of unrecognized values. r=dminor,alwu
https://hg.mozilla.org/integration/autoland/rev/9d89249349d0
Update hdcp version strings used in GetStatusForPolicy. r=dminor,alwu
https://hg.mozilla.org/integration/autoland/rev/f65891d4a353
Undef Status in GMPMessageUtils to avoid bustages in Linux unified build. r=dminor
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.