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

Commit 0d292d11 authored by Sumukh Hallymysore Ravindra's avatar Sumukh Hallymysore Ravindra Committed by Gerrit - the friendly Code Review server
Browse files

msm: synx: Prevent accessing valid but released handles



Release function removes the reference taken during
create, but same release function can be invoked
again to take away the valid reference held by
other threads, which got these references before
release was invoked the first time. This could lead
to successive release call/s taking away reference
held by other threads leading to UAF.

Change adds another member variable to fail release
function even though it is still valid, if the
rel_count member has reached zero. rel_count variable
is set to 1 during synx creation and decremented on
release. All functions after release will fail, as
per design and avoid taking away the reference of
pending functions on same handle.

Change-Id: Ie7ab279bc1e08e82c394b704e181716b726bcf4e
Signed-off-by: default avatarSumukh Hallymysore Ravindra <shallymy@codeaurora.org>
parent e69f8d02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment