• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/av


Commit MetaInfo

Revisionbcd4eaae518a8185726fd440fca9e3b6eee6a1ff (tree)
Time2020-02-12 04:06:52
AuthorEdwin Wong <edwinwong@goog...>
Commiterandroid-build-team Robot

Log Message

[DO NOT MERGE] Fix heap buffer overflow in clearkey CryptoPlugin::decrypt

Fix destPtr was not pointing to destination raw pointer.

bug: 144506242

Test: sts

ANDROID_BUILD_TOP= ./android-sts/tools/sts-tradefed run sts-engbuild-no-spl-lock -m StsHostTestCases --test android.security.sts.Poc19_12#testPocBug_144506242

Change-Id: Ia1b8f755daaada2f1411abeb3cb5b832a72b3c82
(cherry picked from commit 8464bfa975afe360bb8e3dd59c036ce4a4995fa8)

Change Summary

Incremental Difference

--- a/drm/mediadrm/plugins/clearkey/hidl/CryptoPlugin.cpp
+++ b/drm/mediadrm/plugins/clearkey/hidl/CryptoPlugin.cpp
@@ -136,6 +136,8 @@ Return<void> CryptoPlugin::decrypt_1_2(
136136 return Void();
137137 }
138138
139+ base = static_cast<uint8_t *>(static_cast<void *>(destBase->getPointer()));
140+
139141 if (destBuffer.offset + destBuffer.size > destBase->getSize()) {
140142 _hidl_cb(Status_V1_2::ERROR_DRM_FRAME_TOO_LARGE, 0, "invalid buffer size");
141143 return Void();