projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acdedf4
)
x86/mm: Add missing copy_from_user error checks in p2m_set_access_multi
author
Razvan Cojocaru
<rcojocaru@bitdefender.com>
Wed, 21 Sep 2016 12:41:04 +0000
(15:41 +0300)
committer
George Dunlap
<george.dunlap@citrix.com>
Wed, 21 Sep 2016 12:59:52 +0000
(13:59 +0100)
Added missing error checks in p2m_set_mem_access_multi().
CID
1373105
and
1373106
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm/p2m.c
patch
|
blob
|
history
diff --git
a/xen/arch/x86/mm/p2m.c
b/xen/arch/x86/mm/p2m.c
index b16e56327a7d343122051ad706e122d6b085ae67..9526fffd6aae57dadcfcf9c8a246956dd3e5710c 100644
(file)
--- a/
xen/arch/x86/mm/p2m.c
+++ b/
xen/arch/x86/mm/p2m.c
@@
-1936,8
+1936,12
@@
long p2m_set_mem_access_multi(struct domain *d,
uint8_t access;
uint64_t gfn_l;
- copy_from_guest_offset(&gfn_l, pfn_list, start, 1);
- copy_from_guest_offset(&access, access_list, start, 1);
+ if ( copy_from_guest_offset(&gfn_l, pfn_list, start, 1) ||
+ copy_from_guest_offset(&access, access_list, start, 1) )
+ {
+ rc = -EFAULT;
+ break;
+ }
if ( !xenmem_access_to_p2m_access(p2m, access, &a) )
{