Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d8a2432 authored by Fabien Sanglard's avatar Fabien Sanglard
Browse files

Fix SF security vulnerability: 32660278

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
parent e6bbe69b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -517,6 +517,7 @@ status_t BufferQueueConsumer::setTransformHint(uint32_t hint) {
}

sp<NativeHandle> BufferQueueConsumer::getSidebandStream() const {
    Mutex::Autolock lock(mCore->mMutex);
    return mCore->mSidebandStream;
}