[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.1] x86: PHYSDEVOP_{prepare, release}_msix are privileged



commit fa1bde94493ee9fc66ce6f33ed434a9d7133c896
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Jan 24 13:48:07 2014 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Jan 24 13:48:07 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
    master date: 2014-01-24 13:41:36 +0100
---
 xen/arch/x86/physdev.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 92d3a80..679e270 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -554,7 +554,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
     case PHYSDEVOP_release_msix: {
         struct physdev_pci_device dev;
 
-        if ( copy_from_guest(&dev, arg, 1) )
+        if ( !IS_PRIV(v->domain) )
+            ret = -EPERM;
+        else if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else if ( dev.seg )
             ret = -EOPNOTSUPP;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.1

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.