mcctrl: abort on invalid addr in mcexec_transfer_image()
Change-Id: Ic064b6ffc30368ff1d3dfb14403e524cbb837ce5
This commit is contained in:
committed by
Masamichi Takagi
parent
bf926f234a
commit
2460228052
@ -281,7 +281,12 @@ int mcexec_transfer_image(ihk_os_t os, struct remote_transfer *__user upt)
|
||||
#else
|
||||
rpm = ihk_device_map_virtual(ihk_os_to_dev(os), phys, PAGE_SIZE, NULL, 0);
|
||||
#endif
|
||||
|
||||
|
||||
if (!rpm) {
|
||||
pr_err("%s(): error: invalid remote address\n", __func__);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (pt.direction == MCEXEC_UP_TRANSFER_TO_REMOTE) {
|
||||
if (copy_from_user(rpm, pt.userp, pt.size)) {
|
||||
ret = -EFAULT;
|
||||
|
||||
Reference in New Issue
Block a user