diff options
author | Fabien Sanglard <sanglardf@google.com> | 2016-11-08 15:31:32 -0800 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-12-01 14:47:04 -0800 |
commit | 675e212c8c6653825cc3352c603caf2e40b00f9f (patch) | |
tree | 8674c79c320ce5ef342b9e4b165724de394e887c | |
parent | e5753ba087fa59ee02f6026cc13b1ceb42a1f266 (diff) | |
download | native-675e212c8c6653825cc3352c603caf2e40b00f9f.tar.gz |
Fix SF security vulnerability: 32660278android-cts-7.1_r2android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7
Because of lack of mutex lock when get mSidebandStream, if one thread
getSidebandStream, another thread setSidebandStream frequently, an UAF
will be triggered.
Bug: 32660278
Test: Marlin device with poc
Change-Id: Idbcf0976ce2db682d0f13455105c45a5c7481a45
(cherry picked from commit 2d8a2432e04234d9edbb3b099f9bbbaa36ad4843)
-rw-r--r-- | libs/gui/BufferQueueConsumer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index ca2a374e16..73d2042983 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -715,6 +715,7 @@ status_t BufferQueueConsumer::setTransformHint(uint32_t hint) { } sp<NativeHandle> BufferQueueConsumer::getSidebandStream() const { + Mutex::Autolock lock(mCore->mMutex); return mCore->mSidebandStream; } |