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

Skip to content
Commit 3757af29 authored by Zhen Kong's avatar Zhen Kong
Browse files

crypto: msm: qcrypto: Fix _qcrypto_tfm_complete crash



Null pointer de-reference may occur when there are multiple AES-CCM
crypto users simultaneously. Specifically, _qcrypto_tfm_complete
calls a user completion function and if it is the user's last request,
cra_exit may be called to destroy the tfm context. The tfm context
is no longer valid, and referring to the deleted tfm context after
the callback is invoked may cause a crash. The solution is to look
ahead to ensure that there are more entries in the response queue
to process before calling the user completion callback. If there
are no more entries to process after the callback is invoked, it
won't proceed to look at tfm for additional completed responses to
process.

Change-Id: Ie9fb5212345676010bfa6f1e79ea7e4fab1d000b
Signed-off-by: default avatarZhen Kong <zkong@codeaurora.org>
parent 4cc17dd0
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