msm: ADSPRPC: Validate the SMMU session count
Make sure that the session count does not exceed the maximum sessions to avoid buffer overflow. Change-Id: I1a9830a6f859d7d525247d27d0a143997998d997 Acked-by: Bharath Kumar <bkumar@qti.qualcomm.com> Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
This commit is contained in:
parent
857cb953f0
commit
7099c2a6d2
1 changed files with 3 additions and 0 deletions
|
@ -2305,6 +2305,9 @@ static int fastrpc_cb_legacy_probe(struct device *dev)
|
|||
if (err)
|
||||
goto bail;
|
||||
for (i = 0; i < sids_size/sizeof(unsigned int); i++) {
|
||||
VERIFY(err, chan->sesscount < NUM_SESSIONS);
|
||||
if (err)
|
||||
goto bail;
|
||||
sess = &chan->session[chan->sesscount];
|
||||
sess->smmu.cb = sids[i];
|
||||
sess->dev = first_sess->dev;
|
||||
|
|
Loading…
Add table
Reference in a new issue