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

Verified Commit 88622bb1 authored by android-t1's avatar android-t1 Committed by Ahmed Harhash
Browse files

Integrate security patch 2023-02-05-CVE-2022-33243

Change-Id: Ifa2b66fc9f66a0ac9d001403ee9a1f00059390a3
parent 5e3fea4f
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -2541,6 +2541,13 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
		remote_arg_t ra[1];
		int tgid = fl->tgid;

		if (fl->dev_minor == MINOR_NUM_DEV) {
			err = -ECONNREFUSED;
			pr_err("adsprpc: %s: untrusted app trying to attach to privileged DSP PD\n",
				__func__);
			return err;
		}

		ra[0].buf.pv = (void *)&tgid;
		ra[0].buf.len = sizeof(tgid);
		ioctl.inv.handle = FASTRPC_STATIC_HANDLE_PROCESS_GROUP;
@@ -2681,6 +2688,13 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
			unsigned int pageslen;
		} inbuf;

		if (fl->dev_minor == MINOR_NUM_DEV) {
			err = -ECONNREFUSED;
			pr_err("adsprpc: %s: untrusted app trying to attach to audio PD\n",
				__func__);
			return err;
		}

		if (!init->filelen)
			goto bail;