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

[xen master] x86/domctl: Fix unitialized copyback in XEN_DOMCTL_PSR_GET_*



commit 015aa2e11ffb3c4ebc78cbdb8ab0ce383d0f2a31
Author:     Johann Höpfner <hoepf@xxxxxxxxxx>
AuthorDate: Wed Aug 12 10:48:01 2026 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Aug 12 10:48:01 2026 +0200

    x86/domctl: Fix unitialized copyback in XEN_DOMCTL_PSR_GET_*
    
    domctl_psr_get_val() copies unitialized stack space back if psr_get_val
    fails. Fix by zero-initializing v_.
    
    Fixes: 03f30dc193c8 ("x86: refactor psr: L3 CAT: implement get value flow.")
    Signed-off-by: Johann Höpfner <hoepf@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/domctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index f26990208d..6e42fa383c 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -1347,7 +1347,7 @@ long arch_do_domctl(
             break;
 
 #define domctl_psr_get_val(d, domctl, type, copyback) ({    \
-    uint32_t v_;                                            \
+    uint32_t v_ = 0;                                        \
     int r_ = psr_get_val((d), (domctl)->u.psr_alloc.target, \
                          &v_, (type));                      \
                                                             \
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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