diff options
author | Fabien Sanglard <sanglardf@google.com> | 2016-11-08 15:31:32 -0800 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-12-06 16:31:22 -0800 |
commit | b5c8da661e8c6cd32d038d4fd9b5bc2f6f4046c4 (patch) | |
tree | 3aa2515eb5a6c307379048ad8cdad1e34aaf71d2 | |
parent | 23e7c1d038bae581cf896f72706221c2ef610c61 (diff) | |
download | native-b5c8da661e8c6cd32d038d4fd9b5bc2f6f4046c4.tar.gz |
Fix SF security vulnerability: 32660278android-6.0.1_r78
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 7504ed49b9..7aea4bb742 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -572,6 +572,7 @@ status_t BufferQueueConsumer::setTransformHint(uint32_t hint) { } sp<NativeHandle> BufferQueueConsumer::getSidebandStream() const { + Mutex::Autolock lock(mCore->mMutex); return mCore->mSidebandStream; } |