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

Commit 4ea0eac2 authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

msm: ADSPRPC: validate user buffers after copying from user



validate user buffers before accessing in kernel driver.

Change-Id: I7997d069d0549de03f1467c63bdb81b20fcf3d6c
Acked-by: default avatarChenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 05e7d36b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2388,6 +2388,10 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num,
		if (!size)
			size = sizeof(struct fastrpc_ioctl_init_attrs);
		VERIFY(err, 0 == copy_from_user(&p.init, param, size));
		if (err)
			goto bail;
		VERIFY(err, p.init.init.filelen >= 0 &&
			p.init.init.memlen >= 0);
		if (err)
			goto bail;
		VERIFY(err, 0 == fastrpc_init_process(fl, &p.init));