• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

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

frameworks/av


Commit MetaInfo

Révision7f0714951555cf92df2fa3c85a0250be048948cb (tree)
l'heure2020-02-07 08:18:05
AuteurEdwin Wong <edwinwong@goog...>
CommiterAnis Assi

Message de Log

[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: I9425baa21c82d5a5edf37c87989adbade0428b67
(cherry picked from commit dc4c427b2155a9928a7cdaac7c0a787dd9c8192d)

Change Summary

Modification

--- a/drm/mediadrm/plugins/clearkey/hidl/CryptoPlugin.cpp
+++ b/drm/mediadrm/plugins/clearkey/hidl/CryptoPlugin.cpp
@@ -106,6 +106,8 @@ Return<void> CryptoPlugin::decrypt(
106106 return Void();
107107 }
108108
109+ base = static_cast<uint8_t *>(static_cast<void *>(destBase->getPointer()));
110+
109111 if (destBuffer.offset + destBuffer.size > destBase->getSize()) {
110112 _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, 0, "invalid buffer size");
111113 return Void();