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

[Xen-changelog] [xen stable-4.12] xen: Add missing va_end() in hypercall_create_continuation()



commit 1a69ef0435602c33b4a31b17663c119bc1acd16a
Author:     Julien Grall <julien@xxxxxxx>
AuthorDate: Mon Nov 25 16:04:02 2019 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Nov 25 16:04:02 2019 +0100

    xen: Add missing va_end() in hypercall_create_continuation()
    
    The documentation requires va_start() to always be matched with a
    corresponding va_end(). However, this is not the case in the path used
    for bad format.
    
    This was introduced by XSA-296.
    
    Coverity-ID: 1488727
    Fixes: 0bf9f8d3e3 ("xen/hypercall: Don't use BUG() for parameter checking 
in hypercall_create_continuation()")
    Signed-off-by: Julien Grall <julien@xxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: df7a19338a892b5cf585fd2bee8584cb15e0cace
    master date: 2019-11-21 15:50:01 +0000
---
 xen/arch/arm/domain.c    | 1 +
 xen/arch/x86/hypercall.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index f6ea51979b..2df64eabf3 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -477,6 +477,7 @@ unsigned long hypercall_create_continuation(
     return rc;
 
  bad_fmt:
+    va_end(args);
     gprintk(XENLOG_ERR, "Bad hypercall continuation format '%c'\n", *p);
     ASSERT_UNREACHABLE();
     domain_crash(current->domain);
diff --git a/xen/arch/x86/hypercall.c b/xen/arch/x86/hypercall.c
index e85d19a2d3..076b0cf32b 100644
--- a/xen/arch/x86/hypercall.c
+++ b/xen/arch/x86/hypercall.c
@@ -156,6 +156,7 @@ unsigned long hypercall_create_continuation(
     return op;
 
  bad_fmt:
+    va_end(args);
     gprintk(XENLOG_ERR, "Bad hypercall continuation format '%c'\n", *p);
     ASSERT_UNREACHABLE();
     domain_crash(curr->domain);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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