Commit Graph

149 Commits

Author SHA1 Message Date
Cong Lin
3122896ecb Re-generate Android V L3 after renewal policy fix
Merge of
https://widevine-internal-review.git.corp.google.com/c/cdm/+/199044

L3 builds created for this fix:
https://widevine-internal-review.git.corp.google.com/c/cdm/+/199050

Fix to L3 renewal policy bypass attack:
OEMCrypto_DeriveKeysFromSessionKey cannot be called after a license is
loaded.

System IDs:
build_arm_v() { build_arm_with_id 33097; }
build_arm64_v() { build_arm64_with_id 33098; }
build_x86_v() { build_x86_with_id 33099; }
build_x86_64_v() { build_x86_64_with_id 33100; }

Test: tested with
https: //widevine-internal-review.git.corp.google.com/c/cdm/+/196392
Test: run_level3_static_tests
Test: run wvts on Pixel7
Bug: 334154045
Change-Id: Ib188d0a37a2193f56dfd287e2f0274ba65bd7b3e
2024-05-31 17:42:58 +00:00
Rahul Frias
e24c8dcb86 Revert "Add SCP support for Android files"
This reverts commit 95b50d39ba.

Reason for revert: Rikers changes should go on main. We can decide that partner OEMs can pick up this feature for V once it has been well tested on main.

Change-Id: I129303cbc86e267aba013a7c314724e51477dc82
2024-04-17 01:41:01 +00:00
Jacob Trimble
95b50d39ba Add SCP support for Android files
SCP uses the JNI headers in generated code, so several targets need
the include path; this will have no effect on non-SCP builds.  Also,
in "protected" builds, there is a generated library that needs to be
linked in the final binary, but this doesn't exist in the "analysis"
step; we create an empty static library if it doesn't exist so it works
on all cases.

Merged from https://widevine-internal-review.googlesource.com/169850

Merged from https://widevine-internal-review.googlesource.com/176177

Bug: 262635528
Change-Id: Ib676d55efbcbec81de9c3123bc70afb570d6caa5
(cherry picked from commit b9482eb23c261788a4432de7566f1b1de1cf9379)
2024-04-16 20:48:35 +00:00
Rahul Frias
af2ffca5fa Add DRM reprovisioning request generation
[ Merge of http://go/wvgerrit/192010 ]

Updates the CDM to add support for DRM reprovisioning request creation.
- Load the baked-in certificate for use as the client token.
- Add functions to build and sign a drm reprovisioning request.
- Update the Rikers L3 OEMCrypto implementation to support signing
  provisioning requests and getting embedded certificate.
- Update client id token to handle DRM reprovisioning.
- Add OEMCrypto function to load the baked-in device certificate in
  Rikers CDMs and stubs for non-Rikers CDMs.
- Add dynamic adapter support for getting embedded device certificate
  only on L3.

Bug: 305093063
Test: WVTS
Change-Id: I9a0ecf95e27213b046f03baa0781fb164179323b
2024-03-15 10:22:35 -07:00
Rahul Frias
72077acec6 Re-generate Android L3 after merging oemcrypto-v19 to master
[ Merge of http://go/wvgerrit/192271 ]

Test: L3 unit tests and GTS on pixel 7
Bug: 324147162
Test: WVTS
Change-Id: I5d94b0c9b3f681774e32623463b0d689f5bacc8c
2024-03-11 22:48:46 +00:00
Cong Lin
02fbb0adcd Re-generate Android L3 after L3 fixes
Build L3 after
https://widevine-internal-review.git.corp.google.com/c/cdm/+/186593

Test: run_dynamic_level3
Bug: 323957284
Change-Id: Ica4974d4ed941174e43d4898771ffe004f9cf8db
2024-02-23 08:47:28 -08:00
Cong Lin
55ff31629f Add -DHAS_HAYSTACK flag to Android L3 build
Using Haystack L3 for now.

Test: build widevine apex
Bug: 324147162
Change-Id: I6421b2cd6f48efc32b7067c7dfd31203181c1e84
2024-02-23 08:47:28 -08:00
Cong Lin
2ba9667dee Update L3 with new SystemIDs for Android V
ID     Description
33097  Android Arm L3 Provisioning 3.0 2024
33098  Android Aarch64 L3 Provisioning 3.0 2024
33099  Android X86 L3 Provisioning 3.0 2024
33100  Android X86 64 L3 Provisioning 3.0 2024

Test: L3 playback tests on pixel
Change-Id: I74a377fa52e1cb8f4c3ae1c7c1edf70086b3fd14
2024-02-23 08:47:27 -08:00
Cong Lin
d81b8f97b2 Add OEMCrypto_GetBCCType() in L3
It is used by prov4 only. So L3 will just return
OEMCrypto_ERROR_NOT_IMPLEMENTED.

Test: build L3
Bug: 307969500
Change-Id: Iff6c79a3fb0220a6c995186f5923ce5ad6bc256f
2024-02-23 08:47:26 -08:00
Cong Lin
0e165f6d54 L3 v19: Rebuild Android L3 and update .bp files
Regenerate L3 after fixes and add new source to .bp files.

Test: Build Widevine apex in Android main
Change-Id: I93fd5cf22437a2c8e6d2b60d9994dbf97f4ba213
2024-02-23 08:47:13 -08:00
Cong Lin
47ef97c747 L3 v19: Add missing v19 function declarations
OEMCrypto_PrepAndSignReleaseRequest() and OEMCrypto_LoadRelease()
declarations are needed for L3 static adapter to build.

Test: run_level3_static_tests
Bug: 323957284
Change-Id: I9ccb4e51fd404b6a49e865545e9a5b4f22169cf7
2024-02-23 08:41:07 -08:00
Cong Lin
3ab4591953 L3 v19: Fix OEMCrypto_SetDecryptHash signature
OEMCrypto_SetDecryptHash() is refactored in v19 to take less parameters.
The implemention of this function has been done here:
https://widevine-internal-review.git.corp.google.com/c/cdm/+/180670

Function signature in the leve3_adapter needs to be updated.

Test: run_dynamic_level3
Bug: 320525541
Change-Id: Ieb3f3868f1753c246d1d5c36d069f8ef59fafdea
2024-02-23 08:40:08 -08:00
Cong Lin
5f7bbf0013 Update L3 LoadLicense() and LoadProvisioning() to work with new KDF
functions

In CL https://widevine-internal-review.git.corp.google.com/c/cdm/+/183531
KDF was merged into new OEMCrypto_LoadLicense() and
OEMCrypto_LoadProvisioning().

This change renames L3 existing old functions with suffix _V18, and adds
the two new functions.

Note: jenkins/run_dynamic_level3 and jenkis/run_level3_static_tests
can't be enabled util https://b.corp.google.com/issues/320525541 is
resolved.

Test: the generated L3 from this CL can pass static and dynamic adapter
tests with commit ID 567069f2fb800c4ec4e844e03273d1924ae6673b. More
updates may be need to L3 source for it to work with the latest
oemcrypto-v19 branch.
Bug: 299333403

Change-Id: If6dec630c00b65468d4194196f3ff6f308c6dbe8
2024-02-23 08:39:49 -08:00
Jacob Trimble
c5d06cb7c7 Remove namespace from Level3 aliases
Since the L3 functions are meant to alias the OEMCrypto functions,
they shouldn't appear in a namespace.

Change-Id: I8d11279ff86c5b5c9eab0598d134f6904f0021ad
2024-02-23 08:39:35 -08:00
Jacob Trimble
955c89315e Add basic Level3 adapter
As part of the new L3, we need to select between the new Zimperium-based
CDM and Haystack.  This will happen with an adapter; this adds a
basic adapter that only calls to haystack directly.

Bug: 315358872
Change-Id: I970646d687dadbe4ae04bdf0da00730fd882cd65
2024-02-23 08:35:26 -08:00
Ronish Kalia
d0f454d91c [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I204c137da43a021bcebe316759d1aadaec99fe2a
2024-02-14 14:19:08 +00:00
Cong Lin
dff87f04a9 Use LOGW when membarrier_function is not present in L3
membarrier_function() for clearing cache in L3 is optional and good to
have. Currently we log it as error if it is not available, which caused
some confusion for CE CDM L3 partners building their own L3.

Also corrected a typo in the function name.

Test: build L3 and run dynamic level3 tests
Change-Id: If20bcb1fe2bace33c43aa178af699f3b190a1fd2
2024-02-01 13:40:52 -08:00
Robert Shih
d2ae81db2a Update Widevine apex min_sdk_version to 34 am: d81cdbae42 am: 0734bab945
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24326594

Change-Id: Ia18fc314eaa00fa7a4bdc8e58d624b667680e896
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 21:03:01 +00:00
Robert Shih
d81cdbae42 Update Widevine apex min_sdk_version to 34
Bug: 287567070
Bug: 294568360
Test: v2/widevine-eng/drm_compliance_apex
Change-Id: Iad45bf7a66ff0217724376aa8648ecd613af32c1
2023-08-28 12:30:36 -07:00
Cong Lin
09ffb9919a Fix session id in dynamic adapter and re-generate L3 am: 9651c61e25 am: cdf5ef3879
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22953666

Change-Id: Iff89968f42419270510ef39a4e1d946f9dc21e4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 01:50:08 +00:00
Cong Lin
9651c61e25 Fix session id in dynamic adapter and re-generate L3
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/173330

Skipping files that are not in android from the CL above.

Original commit message:

Pass the real oemcrypto session id from `pair.session` instead of
`session`, since `session` can be changed when L1 and L3 are running in parallel and `session` in that case may not be the correct oemcrypto session id any more.

Also adding a few missing v18 L3 functions pointers to the dynamic
adapter.

Need to re-generate L3 since the L3 sources changed.

Test: L3 unit tests
Test: GTS dash policy tests and Dexter tests
Bug: 271290471
Bug: 279967915
Change-Id: Idc44d57ca38eb1de24c0038917800e37c25b9afc
2023-05-01 19:25:27 +00:00
Prashanth Swaminathan
6f16f52e29 Provide placeholder OEMCrypto file for RISCV
In order to build RISCV targets in internal master, a value must be
supplied to libwvdrmengine to satisfy the build for riscv64. For now,
point the build to the x86_64 file as a workaround.

Change-Id: I632198279586f2ab974aed9daadd72f378e13094
2023-04-26 07:09:44 -07:00
Cong Lin
efd05207c8 Re-generate Android L3 after zero-initializer fix
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/170631

Original fix:

Array intializer "= {0}" may involve compiler specific behaviors which
can cause haystack hang on arm32 target. Fix is to use memset() instead.

Test: debug build verified on arm32 device
Test: Ran GTS media tests on Pixel 7
Bug: 274637461
Change-Id: I02f5df232934e0c78e259c85e4faf313c01c0b6b
2023-04-14 12:38:49 -07:00
Cong Lin
c0f1a22890 Update Android L3 after CloseSession() fix
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/169301/

Orignial commit message:

Fix session open flag when closing entitled key session

When a session is closed, it also closes all its entitled key sessions.
A bug in L3 accidentally resets session_open flags in other active
sessions.

Re-generated Android L3.

Test: L3 key rotation tests in Pixel 7
Test: Run GTS media test on Pixel 7
Bug: 264688931
Change-Id: Ia02aeb2b0914a1634874871f1b82ed82f8069dbb
2023-03-29 21:50:19 -07:00
Jooyung Han
a4de7eb9b5 Set min_sdk_version for the Widevine APEX
also remove `use_vndk_as_stable: true` to remove dependency to VNDK
libs.

Bug: 251299786
Test: build WV APEX with V and install it on U device
Change-Id: Ie7f7f9b699119478d4b33f95ab9e6ba7f459346c
2023-03-28 06:57:46 +00:00
Cong Lin
3dd24639b3 Update Android L3 after entitled key session fix
This is a merge of
https://widevine-internal-review.googlesource.com/c/cdm/+/168143

Original commit message:
Level3_RemoveEntitledKeySession(key_session) can be called when the
entitled key_session is already released by its entitlement session.
Do not return an error if the key_session to be removed is no longer
valid.

Test: run_dynamic_level3, oemcrypto unit tests on Pixel
Test: GTS media tests
Bug: 264688931
Change-Id: If0e0d0db2137c29e1dab4df321cf11ebcad2451f
2023-03-15 09:52:05 -07:00
Cong Lin
eed03c1bd1 Re-generate Android L3 after memset fix
This is a merge of
167280: Re-generate Android L3 after memset fix | https://widevine-internal-review.googlesource.com/c/cdm/+/167280

Original fix and commit message:
167279: Fix a few memset calls in L3 haystack | https://widevine-internal-review.googlesource.com/c/cdm/+/167279

Test: GtsMediaTest on Pixel 7
Bug: 264978856
Change-Id: Id7a801389edec23f020297b762ccf5e0e3d77c6a
2023-03-02 12:55:07 -08:00
Cong Lin
e8add8eed8 Sync oemcrypto files from cdm udc-dev to Android
Changes included in this CL:

166806: Update OEMCrypto_GetDeviceInformation() | https://widevine-internal-review.googlesource.com/c/cdm/+/166806
166808: Update Android L3 after OEMCrypto_GetDeviceInformation() signature changes | https://widevine-internal-review.googlesource.com/c/cdm/+/166808
166809: Decode device info and write it to CSR payload | https://widevine-internal-review.googlesource.com/c/cdm/+/166809
167158: Fix Android include path and copy_files | https://widevine-internal-review.googlesource.com/c/cdm/+/167158
167159: Fix common typos and use inclusive language suggested by Android linter | https://widevine-internal-review.googlesource.com/c/cdm/+/167159

165618: Explicitly state python3 where needed. | https://widevine-internal-review.googlesource.com/c/cdm/+/165618

166757: Update Android.bp for Android | https://widevine-internal-review.googlesource.com/c/cdm/+/166757
164993: Refactor basic oemcrypto unit tests | https://widevine-internal-review.googlesource.com/c/cdm/+/164993
164978: Update OEMCrypto Unit Test Docs | https://widevine-internal-review.googlesource.com/c/cdm/+/164978
166941: Update make files for OEMCrypto | https://widevine-internal-review.googlesource.com/c/cdm/+/166941

165279: Refactor license unit tests | https://widevine-internal-review.googlesource.com/c/cdm/+/165279
165318: Refactor provisioning unit tests | https://widevine-internal-review.googlesource.com/c/cdm/+/165318
164800: Add extra check for renew on license load unit test | https://widevine-internal-review.googlesource.com/c/cdm/+/164800
165860: Remove duplicate definition of MaybeHex() | https://widevine-internal-review.googlesource.com/c/cdm/+/165860

164889: Updated CoreCommonRequestFromMessage and fix test | https://widevine-internal-review.googlesource.com/c/cdm/+/164889
164967: Add OPK pre-hook and post-hook error codes | https://widevine-internal-review.googlesource.com/c/cdm/+/164967
165140: Add hidden device_id_length to v18 provisioning message | https://widevine-internal-review.googlesource.com/c/cdm/+/165140
165204: Fix memory leak in oemcrypto test | https://widevine-internal-review.googlesource.com/c/cdm/+/165204

165958: Fix oemcrypto_generic_verify_fuzz mutator signature offset | https://widevine-internal-review.googlesource.com/c/cdm/+/165958

166037: Support SHA-256 in OEMCrypto Session Util | https://widevine-internal-review.googlesource.com/c/cdm/+/166037

Test: Run GtsMediaTests on Pixel 7
Bug: 270612144

Change-Id: Iff0820a2de7d043a820470a130af65b0dcadb759
2023-02-28 11:21:05 -08:00
Bob Badour
080bfc7414 Merge "Cleanup vendor projects are proprietary." into tm-qpr-dev-plus-aosp am: cbb6177df2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21276850

Change-Id: I7ba871f7714ba4eb5dcb5b0571b6024533a25217
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-05 03:54:39 +00:00
Bob Badour
6f047790e0 Cleanup vendor projects are proprietary.
Test: m droid dist
Change-Id: I0bdec38c4d12710fa97b91665d211ba6c0d4b24d
2023-02-03 14:37:11 -08:00
Cong Lin
7aceca7310 Update L3 after key double free fix master
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/165018

Orignal commit message:
Update L3 in master branch after key double free fix

The fix is here:
https://widevine-internal-review.googlesource.com/c/cdm/+/164909/

Re-generated L3 libraries.

Test: ran L3 unit tests
Test: verified GTS tests on arm32 device
Bug: 252434586
Change-Id: Iea022b3d1087b79edf6649c038e1f701375989c6
2023-01-17 16:52:36 -08:00
Kyle Zhang
11255b7426 Pick widevine oemcrypto-v18 change
No-Typo-Check: From a third party header file
Bug: 260918793
Test: unit tests
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I36effd6a10a99bdb2399ab1f4a0fad026d607c70
2022-12-21 00:03:50 +00:00
Kyle Zhang
af0168dbed Merge cdm changes to android repo
Bug: 251924225
Test: GtsMediaTestCases
Change-Id: I1b4e64c0abf701fe1f5017f14dc72b72c3ea6770
2022-10-11 00:40:42 +00:00
Kyle Zhang
249404a8df Add widevine vendor apex
Bug: 243699259
Change-Id: Ie1ff0aa9c82f19e0c5412508ac6b67d9083c0cab
2022-09-14 05:31:29 +00:00
Kyle Zhang
eee0d4b88e Revert "Add widevine vendor apex"
Revert submission 19794159-wv-vapex

Reason for revert: Breaking build in branch ndk_translation_all
Reverted Changes:
I48004b8cb:Add widevine apex
Ifa5c1b621:Add widevine vendor apex

Change-Id: I056369265fb341d723b8ff31a0efd7ae3eeec0bb
2022-09-13 18:05:51 +00:00
Kyle Zhang
b9c4bfdaf7 Add widevine vendor apex
Bug: 243699259
Change-Id: Ifa5c1b621a9fc0b6d370124fad7de1334c537c65
2022-09-13 01:29:10 +00:00
Cong Lin
9935fae50d Loosen KCB encryption checks in L3
This is a merge from:
https://widevine-internal-review.googlesource.com/c/cdm/+/152372

The L3 source change which produced these libraries is:
https://widevine-internal-review.googlesource.com/c/cdm/+/152371/

Original commit message:
To address the bug with certain 16.4.x SDK versions returning a
clear key control block (KCB) for clients newer than 16.5, the
exact version check to determine whether key control blocks are
clear or not has been loosened.

Original behavior:
- ODK version >= 16.5.x --> Assume clear
- ODK version <= 16.4.x --> Assume encrypted
New behavior:
- No KCB IV --> Assume clear
- Otherwise --> Assume encrypted

This CL also includes a change to oemcrypto/include/OEMCryptoCENC.h
The changes to OEMCryptoCENC.h in the CL are comments or variable name
change. So it should be safe.
This change was merged to wv tm-dev here:
https://widevine-internal-review.googlesource.com/c/cdm/+/148411
So, adding it to Android tm-dev.

Test: run_level3_static_tests, CdmDecryptTest/CdmTestWithDecryptParam.* against LS SDK 16.4.2 & 17.0
Bug: 232557453
Change-Id: I2bbb5ab3ea33a16bd6c198077e5aefe960737ea0
2022-05-22 06:35:22 +00:00
Edwin
3c3da01d58 Use aidl interface for Widevine service.
The interface is defined in
hardware/interfaces/drm/aidl(http://go/ag/15329852).

Test: build
  m android.hardware.drm-service.widevine -j128

Test: build_and_run_all_unit_tests.sh
  for hidl tests

Test: atest VtsAidlHalDrmTargetTest

Test:   atest vts_treble_vintf_vendor_test:vts_treble_vintf_vendor_test.DeviceManifest/SingleManifestTest#ManifestAidlHalsServed/0 -- --abi x86_64

Bug: 200055138
Bug: 170964303
Change-Id: I5654d90d8a4b0bae4b4a78e79b27c1cafec36be7
2022-02-01 22:20:04 -08:00
Cong Lin
efbe13ea36 Update Android L3 after cipher mode fix
This is a merge of
https://widevine-internal-review.googlesource.com/c/cdm/+/144790

Updated cipher mode to allow playback in v17;
Added check for key selection before decrypting.

Merge from Widevine repo of http://go/wvgerrit/144779
Fix allow_null for key control iv in L3 v17

Merge from Widevine repo of http://go/wvgerrit/144792
Fix api version check in L3 v17

Test: L3 unit tests
Bug: 217145027
Change-Id: I584bd57e26407cbf4d4b94eb1bc5cf80839377be
2022-02-01 10:00:40 -08:00
Yohei Yukawa
a4d835af3a Revert "Use aidl interface for Widevine service."
This reverts commit 96a8ccd4a1.

Reason for revert:
Could break DeviceManifest/SingleManifestTest#ManifestAidlHalsServed

Bug: 200055138
Bug: 170964303
Bug: 217241995
Change-Id: I9c42df15defec428c9ef8c62439c63d4a603fee6
2022-01-31 22:01:25 +00:00
Edwin
96a8ccd4a1 Use aidl interface for Widevine service.
The interface is defined in
hardware/interfaces/drm/aidl(http://go/ag/15329852).

Test: build
  m android.hardware.drm-service.widevine -j128

Test: build_and_run_all_unit_tests.sh
  for hidl tests

Test: atest VtsAidlHalDrmTargetTest

Bug: 200055138
Bug: 170964303
Change-Id: If2f2a129914436ba5cef1c46f6cb9415e12c3d1c
2022-01-28 20:29:14 -08:00
Kyle Zhang
642965c678 Merge latest oemcrypto-v17 change
No-Typo-Check: Not related to this change.

Bug: 161477208
Change-Id: I99e4780f6855b7045aa0cd5a49c13d2d0d51ed64
2022-01-27 20:07:15 -08:00
John W. Bruce
0c7db1a836 Fix -Wshorten-64-to-32 errors in Haystack
(This is a merge of http://go/wvgerrit/134424.)

This patch fixes code that would trigger -Wshorten-64-to-32 by
implicitly narrowing a variable from 64 to 32 bits. The membarrier
functions have their return type expanded so they can report the full
return value of the syscall.

Bug: 194971260
Test: x86-64
Change-Id: I5d948162b1f3f1540288df9494cabda39ecf8905
2021-11-10 16:10:54 -08:00
[2~
39a44cce72 Re-generate L3 builds after security patch protecting RSA key
Merge from http://go/wvgerrit/133446

Commit message from Widevine repo:

"This change is to protect L3 RSA key from leaking in memory. After
this change, the RSA key, when loaded in memory, is XOR masked with
a key_mask."

The source CL that generates the new L3 libraries is here:
http://go/wvgerrit/130949

Test: L3 unit tests
Test: GTS test result https://android-build.googleplex.com/builds/abtd/run/L24400000950905884
Test: RSA performance test OEMCryptoLoadsCertificate.RSAPerformance
Test: Manual reboot tests on Pixel4
Bug: 183417993

Change-Id: I190e585ad03b8749e3487f9d3f0109be61a3c815
2021-09-13 09:32:07 -07:00
Cong Lin
61218ec6cf Fix L3 clock loading issue
This is a merge of http://go/wvgerrit/126703
Only obfuscated libraries for Android are included in this CL.

L3 loads clock info from an encrypted file during initialization. There
is a bug which calls the clock loading function before the decryption
key gets intialized in InitializeEngine(). Clock will be loaded with bad
decrypted data, which caused playback failure after system reboot.

The fix is to move clock loading after InitializeEngine() to ensure
decryption key is ready.

Bug: 188873354
Bug: 188892717
Test: L3 unit tests;
Test: Manual playback tests on Netflix
      Download, play, reboot device, play again
Test: GTS tests https://android-build.googleplex.com/builds/tests/view?invocationId=I02800009363823424&testResultId=TR23225132004211909&redirect=http://sponge2/73efa8e8-951a-48bb-b2a9-0b09d5038ed3

Change-Id: Icf34aa3135fdcb77dea8104a90ce90f14e79e61c
2021-06-21 22:15:18 +00:00
TreeHugger Robot
1f1f35f56a Merge "[RESTRICT AUTOMERGE] L3 Load RSA key from two parts and re-generate build" into sc-dev 2021-06-09 21:33:04 +00:00
Cong Lin
d542cb91b5 Sync L3 headers in sc-dev
Merge of these CLs from Widevine sc-dev:

modified:   libwvdrmengine/level3/include/clear_cache_function.h
  Add cache flush assembly for arm64 L3 to Android header | http://go/wvgerrit/124828
  Address compilation errors | http://go/wvgerrit/113083

modified:   libwvdrmengine/level3/include/level3_file_system_android.h
  Update Widevine Copyright header for android | http://go/wvgerrit/108084

Bug: 184866351
Test: Header changes for clearing cache is verified by one of the partners on their arm64 target;
https: //b.corp.google.com/issues/175432203#comment13

Change-Id: I0ac8f339f65d02abb3080020fbc715b9c0db85b2
2021-05-20 14:56:20 -07:00
Cong Lin
563a79bd8b [RESTRICT AUTOMERGE] L3 Load RSA key from two parts and re-generate
build

This is a merge of CL from widevine repo (obfuscated code only):
https://widevine-internal-review.googlesource.com/c/cdm/+/124965

The source code change that produced the obfucated code is here:
https://widevine-internal-review.googlesource.com/c/cdm/+/121763

Original commit message from the fix above:
"This is a security improvement against an L3 exploit b/182584472.
The change is to store RSA private key in two parts instead of one,
and load it separately when the key is needed. This will make it
more difficult to find the entire RSA key.

This CL does the key loading part only. Key splitting is done
in Haystack in CL: cl/367515385"

New L3 system IDs included in the obfuscated code:
ID     Description
22593  Android S ARM L3 Field Provisioning 3.0
22594  Android S ARM 64 L3 Field Provisioning 3.0
22595  Android S x86 L3 Field Provisioning 3.0
22596  Android S x86 64 L3 Field Provisioning 3.0

Bug: 182584472
Test: L3 unit tests
Test: GTS tests
https://android-build.googleplex.com/builds/forrest/run/L16300000887061939
The only failed case is a test issue due to the new IDs not being added
to the allow list of the test yet. This test passed on local run with
the updated allow list.

Change-Id: If8b8b2cb9291ede0cb2dcc892f5557c3a68c4b96
2021-05-19 10:20:02 -07:00
Cong Lin
22f8ee9498 [RESTRICT AUTOMERGE] Refresh L3 libraries after buffer overflow fix sc-dev
Merge of [http://go/wvgerrit/118363]. Fixes included:

http://go/wvgerrit/111603
Fix L3 block offset test and re-enable buffer overflow tests

http://go/wvgerrit/111784
Fix heap overflow test in L3 and OEMCrypto ref

http://go/wvgerrit/113644
Check for buffer overflow when computing subsample size

http://go/wvgerrit/113946
Fix test failures caused by huge key length in L3

Test: Ran L3 unit tests
Test:
https://android-build.googleplex.com/builds/forrest/run/L81800000863169076
Bug: 182584472

Change-Id: Iae051ac2c06eb263b3b3be76d56b42917340af1d
2021-04-27 09:35:03 -07:00
Bob Badour
376f47047c [LSC] Add LOCAL_LICENSE_KINDS to vendor/widevine
Added SPDX-license-identifier-Apache-2.0 legacy_by_exception_only to:
  Android.bp
  libwvdrmengine/Android.bp
  libwvdrmengine/vts/vendor_module/Android.bp

Added legacy_by_exception_only to:
  libwvdrmengine/cdm/Android.bp
  libwvdrmengine/cdm/core/src/Android.bp
  libwvdrmengine/cdm/core/test/Android.bp
  libwvdrmengine/cdm/metrics/src/Android.bp
  libwvdrmengine/cdm/test/integration-test.mk
  libwvdrmengine/cdm/test/unit-test.mk
  libwvdrmengine/level3/Android.bp
  libwvdrmengine/mediacrypto/Android.bp
  libwvdrmengine/mediacrypto/test/Android.mk
  libwvdrmengine/mediadrm/Android.bp
  libwvdrmengine/mediadrm/test/Android.mk
  libwvdrmengine/oemcrypto/odk/Android.bp
  libwvdrmengine/oemcrypto/odk/test/fuzzing/Android.bp
  libwvdrmengine/oemcrypto/odk/test/fuzzing/corpus_generator/Android.bp
  libwvdrmengine/oemcrypto/test/Android.mk
  libwvdrmengine/test/unit/Android.mk
  libwvdrmengine/tools/metrics_dump/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I41ef520b6e394a7708f453a706e6ef1a5f46c36a
2021-03-25 09:52:52 -07:00