qseecom: Fix accessing userspace memory in kernel space
Use put_user API to write the data from kernel space to userspace to avoid accessing userspace memory directly in kernel space. Bug: 65468973 Change-Id: I649fe2597e80ccad50cf16b355e220734810e94c Signed-off-by: Brahmaji K <bkomma@codeaurora.org>
This commit is contained in:
parent
1287f1a46f
commit
2d37893dce
|
@ -2658,7 +2658,11 @@ static int qseecom_send_service_cmd(struct qseecom_dev_handle *data,
|
|||
}
|
||||
if (req.cmd_id == QSEOS_RPMB_CHECK_PROV_STATUS_COMMAND) {
|
||||
pr_warn("RPMB key status is 0x%x\n", resp.result);
|
||||
*(uint32_t *)req.resp_buf = resp.result;
|
||||
if (put_user(resp.result,
|
||||
(uint32_t __user *)req.resp_buf)) {
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue