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

Commit c0c670b9 authored by Abir Ghosh's avatar Abir Ghosh
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>
parent d0c491f1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -362,6 +362,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(
@@ -375,7 +376,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;
		}