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

Commit f05c1221 authored by Abir Ghosh's avatar Abir Ghosh Committed by Gerrit - the friendly Code Review server
Browse files

qbt1000: Terminate fingerprint TA name with null



Terminate the string, coming from userspace and containing the name
of fingerprint trusted app, with null character, to make sure kernel
memory does not leak into logs

Change-Id: I1668a64fcb6747ce3ef3b1ee6321fa5fa4a1798a
CRs-Fixed: 2029409
Signed-off-by: default avatarAbir Ghosh <abirg@codeaurora.org>
Signed-off-by: default avatarKota Priyanka <kotap@codeaurora.org>
parent 3c75efaf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -368,6 +368,7 @@ static long qbt1000_ioctl(
		}

		pr_debug("app %s load before\n", app.name);
		app.name[MAX_NAME_SIZE - 1] = '\0';

		/* start the TZ app */
		rc = qseecom_start_app(
@@ -381,7 +382,8 @@ static long qbt1000_ioctl(
				pr_err("App %s failed to set bw\n", app.name);
			}
		} else {
			pr_err("app %s failed to load\n", app.name);
			dev_err(drvdata->dev, "%s: Fingerprint Trusted App failed to load\n",
				__func__);
			goto end;
		}