Commit Graph

6975 Commits

Author SHA1 Message Date
TreeHugger Robot
0397428512 [automerger skipped] Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: e19017df16 am: 65afc697d1 am: d43eb608de -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I864d77cac1efc319d8c2d417efcc1154d44c94a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:31:33 +00:00
Vicky Min
28d0edf092 [automerger skipped] [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16 am: 6ededbee26 am: a132079383 am: e75c40590f -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I3c3b3762915786b20be747051d22989bf2c86bfb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:31:31 +00:00
TreeHugger Robot
d43eb608de Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: e19017df16 am: 65afc697d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I344a64df7bccd4518dc3dccf4e0f418f86041e53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:00:56 +00:00
Vicky Min
e75c40590f [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16 am: 6ededbee26 am: a132079383
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: Ib3eb2449d0388c0717c7d05cf23e55271bbaafe5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:00:55 +00:00
TreeHugger Robot
5b4eed29c7 [automerger skipped] Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: b0fe007cc6 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I0a1bbcaf4f51db4b18dadfe6f633a98f576d7ba3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:27:20 +00:00
Vicky Min
f3e98f7fd1 [automerger skipped] [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16 am: 38c5136b8c -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I42a643644307fca2f1ffc0c829038ef1b788c197
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:27:19 +00:00
TreeHugger Robot
65afc697d1 Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: e19017df16
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: Iac9f6d50283755f09824171b53ca63496e7fb4c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:26:27 +00:00
Vicky Min
a132079383 [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16 am: 6ededbee26
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I75d4644ea89dc7b041e3cdff07c0c4e1550ac0c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:26:25 +00:00
TreeHugger Robot
e19017df16 Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I05fd119e8cd15008ed1d0632168348ecab6d986c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 19:26:25 +00:00
Vicky Min
6ededbee26 [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I1e8539f39b2b60562f0bb688ae91380ac2bc1e69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 19:26:23 +00:00
TreeHugger Robot
b0fe007cc6 Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I0c3dc9b0c0fc93660d1c8cb65182c3e6682b275b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 19:26:02 +00:00
Vicky Min
38c5136b8c [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I4c1761263198df7392d75097f31810d47242628e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 19:26:00 +00:00
TreeHugger Robot
29aa1f3732 Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev 2022-11-30 18:44:57 +00:00
Vicky Min
0890df5b16 [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()
In CreateCoreLicenseResponse(), there seems to be an out of bounds
potential error due to a missing check that the index used for
license_response.parsed_license->key_array is valid. Adding a check
for this here.

Bug: 217677571
Test: fuzz tests
Change-Id: I37f7228f87992ba5284c553d7b07ef97d6a66ab3
(cherry picked from commit eb711ea0ec)
2022-11-30 17:27:23 +00:00
Alex Dale
5ebe8eddeb Revert "Core CDM: Do not store/retrieve USAGE_INFO entries."
This reverts commit 982ddb042d.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I06fd9a79c2013a7dc523ffd06180c3ff36ab7d34
2022-11-30 01:47:13 +00:00
Alex Dale
ba42d5edf5 Merge "Revert "Core CDM: Remove usage info as a run-time type."" 2022-11-30 01:46:17 +00:00
Alex Dale
1ea92c34c8 Revert "Core CDM: Remove usage info as a run-time type."
This reverts commit 5dd2b07286.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I8dc95139d113ad1d44acd2e8dd6cbda604b6c073
2022-11-30 00:29:14 +00:00
Vicky Min
7aaf59060f [automerger skipped] [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 8c71d5acd0 am: e46efc580c -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/20524788

Change-Id: Ia8bd1f3146d74e90cf2d7dfd09cdf1b1e1c283fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 23:34:32 +00:00
Vicky Min
e46efc580c [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 8c71d5acd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/20524788

Change-Id: Id69c9d8bfcec50978e067679cc5738261570acc1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 22:32:56 +00:00
Edwin Wong
927053d6e8 Dump error_detail in dumpsys
Merged from http://go/wvgerrit/162420

Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine

Bug: 260241061
Change-Id: I28b06b201c3408d85f6ca944534ad9602bc60a85
2022-11-27 18:17:50 +00:00
Edwin Wong
6d3457b9d9 Remove hidl support.
Merged from http://go/wvgerrit/161857

Test: streaming(Netflix, Play Movies & TV)
Test: ./build_and_run_all_unit_tests.sh
Test: adb shell ps | grep drm
Test: metrics_dump
Test: hardware/interfaces/drm/aidl/vts$ atest VtsAidlHalDrmTargetTest

Bug: 259299992
Change-Id: I76bcc82bbfb3fc60987b66265a580946a16c341d
2022-11-22 19:03:30 +00:00
Vicky Min
8c71d5acd0 [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()
In CreateCoreLicenseResponse(), there seems to be an out of bounds
potential error due to a missing check that the index used for
license_response.parsed_license->key_array is valid. Adding a check
for this here.

Bug: 217677571
Test: fuzz tests
Change-Id: I37f7228f87992ba5284c553d7b07ef97d6a66ab3
(cherry picked from commit eb711ea0ec)
2022-11-21 22:58:29 +00:00
Edwin Wong
c13a1981c4 Fix FormatAttributes
Merged from http://go/wvgerrit/161639

This CL addresses the review comment in http://go/ag/20205433
so that attributes.error_code should be using
CdmResponseTypeToString().

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: Iaa96423044d53a83406807b3db90e394fdda2803
2022-11-17 17:51:27 +00:00
TreeHugger Robot
0c64ed0e0b Merge "Log bad provisioning response" 2022-11-15 21:05:29 +00:00
John "Juce" Bruce
ff73463d0b Add String Formatting Util
(Merged from http://go/wvgerrit/160042.)

Since we don't have access to std::format yet, this patch adds a
function to wvutil to format text into a std::string.

Bug: 255466913
Test: x86-64
Test: raven
Change-Id: I28043da76af5b4772a29fa7e7241343caf9b54a1
2022-11-15 05:24:19 +00:00
Edwin Wong
a3e67a9104 Merge "Update CdmResponseTypeToString" 2022-11-13 01:21:12 +00:00
Edwin Wong
959c16a0fe Update CdmResponseTypeToString
Merged from http://go/wvgerrit/160797

Changed CdmResponseTypeToString param from int to CdmResponseType as per sigquit@ review comment in http://go/wvgerrit/160638.

Reorder the switch statements in CdmResponseTypeToString to follow the order in the enum declarations instead of sorting alphabetically. This should make future changes to the enum fields easier.

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 258438956
Change-Id: I3f316cff5448e8e8078da7868e3c083e6766bfa1
2022-11-10 23:29:57 +00:00
Alex Dale
86aea4f49f Merge "Remove usage info clean up test tear down." 2022-11-10 19:25:44 +00:00
Alex Dale
789b9b675c Merge changes I939e4797,Iefbfe2dd,I002202b4,I09262da0
* changes:
  Core CDM: Remove usage info as a run-time type.
  Core CDM: Do not store/retrieve USAGE_INFO entries.
  Core CDM: Remove usage info API from DeviceFiles.
  Core CDM: Removed ability to add secure stop entry.
2022-11-10 03:03:27 +00:00
Alex Dale
b0bb45876d Remove usage info clean up test tear down.
[ Merge of http://go/wvgerrit/160857 ]

Reboot tests were attempting to clean up usage info records when the
tests were done.  However, usage info are no longer supported.
Unfortunately, the clean up code would trigger a test failure if the
usage info records could not be deleted.

Bug: 258469123
Test: OfflineLicenseTest.VariousTests
Change-Id: I17cebd82da1e45ef53853d35dbe314365a1909be
2022-11-09 14:42:31 -08:00
TreeHugger Robot
a84c7b8ac4 Merge "Address review comment in go/wvgerrit/160480" 2022-11-08 23:58:23 +00:00
Alex Dale
724576eaf4 Merge changes Ib3f71f19,I2d1fc0d6
* changes:
  Core CDM: Remove secure stop from LRU algorithm.
  Core CDM: Retrieving USAGE_INFO triggers clean-up.
2022-11-08 22:19:38 +00:00
Seth Moore
6501675bad Merge "Revert^2 "Add dependency on split out RKP HAL"" 2022-11-08 22:17:10 +00:00
Alex Dale
244e6301bd Core CDM: Remove usage info API from DeviceFiles.
[ Merge of http://go/wvgerrit/159219 ]

Most API functions of DeviceFiles related to usage info files have
been removed.  Storing and retrieving usage info files are no longer
required by the CDM.  The only function remaining are the ones that
enabled detecting and deleting the remaining usage info files on the
device.

Bug: 242289743
Test: run_x86_64_tests and device_files_unittest
Change-Id: I002202b47141121a0e5adac569e47d8b8bb69b1a
2022-11-08 12:16:15 -08:00
Alex Dale
982ddb042d Core CDM: Do not store/retrieve USAGE_INFO entries.
[ Merge of http://go/wvgerrit/159220 ]

Usage entry info elements of type USAGE_INFO are no longer stored by
DeviceFiles.  An earlier CL removed the ability to store USAGE_INFO
entries; but now tests have been updated to exclude USAGE_INFO from
their test data.

A new DeviceFiles tests verifies that USAGE_INFO entries are not
retrieved and that the |has_usage_info_entries| flag is set when
they are encountered when loading pre-usage-info-deprecation
usage table info.

Bug: 242289743
Test: run_x86_64_tests and device_files_unittest
Change-Id: Iefbfe2dd2b0304b4075bfc7c1aeffe3b6ba52624
2022-11-08 12:16:15 -08:00
Alex Dale
5dd2b07286 Core CDM: Remove usage info as a run-time type.
[ Merge of http://go/wvgerrit/159221 ]

This CL modifies how usage entry info is tracked internally by the
CDM at run time.  It removes the different "storage types" that
entries represent (license or usage info), and instead it contains
only the information associated with license types.  The presences
of a key-set-id allows the UsageTableHeader to determine if the
entry slot is currently being used, or if it can be treated as
unoccupied.

By removing this different type, it completely prevents the CDM and
its tests from using "usage-info" type entries.  This required
significant updates to the UsageTableHeader tests.

Additionally, several of the variable names within the usage table
have been simplified and shortened to reflect their new meanings.

Bug: 242289743
Test: run_x86_64_tests and usage_table_header_unittest
Change-Id: I939e479779425550a17a3c9e6c6d1bc6885e493e
2022-11-08 12:16:15 -08:00
Alex Dale
b039f31b27 Core CDM: Removed secure stop support.
[ Merge of http://go/wvgerrit/158721 ]

This CL removes support for secure stop / usage info sessions from the
CDM engine and CDM session.  APIs for related to secure stop
operations will return NOT_IMPLEMENTED_ERROR.

New secure stop licenses will be rejected by the CDM when added.

Bug: 242289743
Test: run_x86_64_tests request_license_test
Change-Id: I30cd47e580d63014e001c903382a28238746f6d4
2022-11-08 12:16:14 -08:00
Alex Dale
da9ba6c3ba Core CDM: Retrieving USAGE_INFO triggers clean-up.
[ Merge of http://go/wvgerrit/158722 ]

The CDM will delete all usage info / secure stop files on the device
when usage table entries labeled as USAGE_INFO are detected when
restoring the usage table.  DeviceFiles no longer transfers the
stored USAGE_INFO entry info into the run-time entry info vector for
the table.

This CL makes only minor changes to test data.  Significant updates
to both device file and usage table header unittests are required to
remove usage info / secure stop run-time resources.

Bug: 242289743
Test: run_x86_64_tests
Change-Id: I2d1fc0d6a4c994bc10bfce47818f101f95883979
2022-11-08 12:16:14 -08:00
Alex Dale
7a34c1748c Core CDM: Remove secure stop from LRU algorithm.
[ Merge of http://go/wvgerrit/158877 ]

The UsageTableHeader's LRU algorithm for determining which entry to
evict when full uses special considerations based on the type of
entry (offline or secure stop).

This CL removes all secure-stop-specific considerations, and instead
treats secure stop's the same as an unused entry.  Secure stop entries
will always be selected for removal before offline licenses (expired
or not).

Additionally, LRU table upgrading will ignore secure-stop entries.
This has no effect in practice as DeviceFiles will not load secure
stop usage entries when UsageTableHeader is initialized on a real
file system.

Bug: 242289743
Test: run_x86_64_tests and request_license_test
Change-Id: Ib3f71f191aed94aad62951667426911e4e202068
2022-11-08 12:16:14 -08:00
Alex Dale
afcadcc793 Core CDM: Removed ability to add secure stop entry.
[ Merge of http://go/wvgerrit/158872 ]

This CL updates the UsageTableHeader API such that it is no longer
possible to add a "usage info" entry.  All new entries that are added
are assumed to be offline licenses.

Bug: 242289743
Test: run_x86_64_tests and request_license_test
Change-Id: I09262da0e4301356156d1715b0301c616be2251b
2022-11-08 12:16:14 -08:00
Edwin Wong
98439a439a Address review comment in go/wvgerrit/160480
Merged in http://go/wvgerrit/160638

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: Ib63abfaf70edec01e2ef5f81678d6bae1462fd65
2022-11-08 03:01:36 +00:00
Seth Moore
4d5f758063 Revert^2 "Add dependency on split out RKP HAL"
d986e6568c

Change-Id: I1a5c440f59701e294304e868edd2fbbe8dbf873f
2022-11-07 07:55:47 -08:00
Alex Dale
f5fbfa6176 Merge changes I9f51e07c,I3f65a6ec
* changes:
  CDM core: Removed support for v15 provisioning responses.
  CDM Core: Removed support for v15 licenses.
2022-11-05 02:11:55 +00:00
TreeHugger Robot
b2d0ab968b Merge "Output metrics in YAML format" 2022-11-04 22:01:14 +00:00
Alex Dale
6b9aa2c12d CDM core: Removed support for v15 provisioning responses.
[ Merge of http://go/wvgerrit/160277 ]

OEMCrypto v15 did not require core messages during DRM certificate
provisioning.  The CDM's certificate provisioning flow was allowing
for either case (with or without core messages) when provisioning.

Now, devices can safely assume that all provsisioning responses will
be v16 or newer; all requests/response must contain a core message.

Bug: 252670759
Test: run_x86_64_tests and request_license_test
Change-Id: I9f51e07caf642eaf646ef40bdd640b3ccfe2533c
2022-11-04 14:50:24 -07:00
Alex Dale
b26126d3aa CDM Core: Removed support for v15 licenses.
[ Merge of http://go/wvgerrit/160000 ]

OEMCrypto v15 licenses made use of several now-obsolete API functions
of OEMCrypto (mainly LoadKeys and RefreshKeys).  All license handled
by the CDM must be v16 or newer.  The CDM can now rely on all license
requests/responses containing a core message, using v16 policy timers,
and requires loading using LoadLicense() / LoadRenewal().

Bug: 252670759
Test: run_x86_64_tests and policy_engine_unittest
Change-Id: I3f65a6ec0326b4c89d1919b8911e065079cb90d2
2022-11-04 14:47:11 -07:00
Rahul Frias
4a4ee80cad Merge "Add "version" to device info in prov4 upload tool" 2022-11-04 20:38:18 +00:00
Rahul Frias
8764c60fd4 Add "version" to device info in prov4 upload tool
[ Merge of http://go/wvgerrit/160457 ]

Bug: 255921326
Test: WV android unit tests
Merged from https://widevine-internal-review.googlesource.com/160427

Change-Id: I3e2b7158c72fb4321b67053995f62483da934a18
2022-11-04 11:34:02 -07:00
Seth Moore
d986e6568c Revert "Add dependency on split out RKP HAL"
Revert "Split rkp from keymint."

Revert "Add dependency on newly-split RKP HAL"

Revert "Add dependencies on newly-split RKP HAL"

Revert "Add dependency on split out RKP HAL"

Revert submission 20364235-split-rkp-aidl

Reason for revert: Build break in android.hardware.identity-api
Reverted Changes:
Ib86454bbb:Update dependencies on HAL types moved from keymin...
I501c967e2:Add dependencies on newly-split RKP HAL
I08560f9af:Add dependency on split out RKP HAL
I87133e385:Add dependency on split out RKP HAL
Ia13374cbc:Add dependency on split out RKP HAL
I72bc1774c:Add dependency on newly-split RKP HAL
I71ac265e3:Add dependency on newly-split RKP HAL
Ie0e17bb2c:Update the RKP aidl dependency
I5d24f47ce:Update README and CHANGELOG for RKP
I4b2498dd1:Split rkp from keymint.
I266009d75:Add dependency on newly-split rkp HAL

Change-Id: I4192940d5013a079f3d15f6ffaf44bc1634d7538
2022-11-04 16:41:10 +00:00
Edwin Wong
c70e3deb8b Output metrics in YAML format
Merge from http://go/wvgerrit/158917

Use go/yamllint as reference and obfuscate portion of output to
run on an online yaml validator.

Sample output: http://go/cl/481370906

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: I1abf1aa50aa25b97b1f6c10995c324d6de04d056
2022-11-03 19:50:27 +00:00