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

Commit 72199ca1 authored by Sathish Ambley's avatar Sathish Ambley
Browse files

msm: ADSPRPC: Fix buffer overflow for session



Fix to check the session count before accessing the
session buffer.

Change-Id: Iff98b6504c331d65f46c7934e09720f4522ea225
Acked-by: default avatarBharath Kumar <bkumar@qti.qualcomm.com>
Signed-off-by: default avatarSathish Ambley <sathishambley@codeaurora.org>
parent d5809484
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2051,6 +2051,9 @@ static int fastrpc_cb_legacy_probe(struct device *dev)
			&disable_htw);
	VERIFY(err, !arm_iommu_attach_device(first_sess->dev,
					first_sess->smmu.mapping));
	if (err)
		goto bail;
	VERIFY(err, (sids_size/sizeof(unsigned int)) <= NUM_SESSIONS);
	if (err)
		goto bail;
	for (i = 0; i < sids_size/sizeof(unsigned int); i++) {