aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/common/kexec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index d2d5fde321..a49eeacc95 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -295,6 +295,10 @@ static int kexec_get_range_compat(XEN_GUEST_HANDLE(void) uarg)
ret = kexec_get_range_internal(&range);
+ /* Dont silently truncate physical addresses or sizes. */
+ if ( (range.start | range.size) & ~(unsigned long)(~0u) )
+ return -ERANGE;
+
if ( ret == 0 ) {
XLAT_kexec_range(&compat_range, &range);
if ( unlikely(copy_to_guest(uarg, &compat_range, 1)) )