qbt1000: Validate FP app name before qseecom_start_app
Validate the name of the client app before passing it to qseecom_start_app. CRs-Fixed: 2006695 Change-Id: I9c6b16050d4f6fc94827021c7b0f2ab292452f60 Signed-off-by: Abir Ghosh <abirg@codeaurora.org>
This commit is contained in:
parent
5d78c03af8
commit
9f6e16f245
1 changed files with 8 additions and 3 deletions
|
@ -401,6 +401,13 @@ static long qbt1000_ioctl(struct file *file, unsigned cmd, unsigned long arg)
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmp(app.name, FP_APP_NAME)) {
|
||||||
|
dev_err(drvdata->dev, "%s: Invalid app name\n",
|
||||||
|
__func__);
|
||||||
|
rc = -EINVAL;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
if (drvdata->app_handle) {
|
if (drvdata->app_handle) {
|
||||||
dev_err(drvdata->dev, "%s: LOAD app already loaded, unloading first\n",
|
dev_err(drvdata->dev, "%s: LOAD app already loaded, unloading first\n",
|
||||||
__func__);
|
__func__);
|
||||||
|
@ -447,9 +454,7 @@ static long qbt1000_ioctl(struct file *file, unsigned cmd, unsigned long arg)
|
||||||
|
|
||||||
pr_debug("app %s load after\n", app.name);
|
pr_debug("app %s load after\n", app.name);
|
||||||
|
|
||||||
if (!strcmp(app.name, FP_APP_NAME))
|
drvdata->fp_app_handle = drvdata->app_handle;
|
||||||
drvdata->fp_app_handle = drvdata->app_handle;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QBT1000_UNLOAD_APP:
|
case QBT1000_UNLOAD_APP:
|
||||||
|
|
Loading…
Add table
Reference in a new issue