lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17d27b8d-908b-a740-1d2d-e92a8507f25b@redhat.com>
Date:   Mon, 18 Dec 2017 12:55:05 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Marc Zyngier <marc.zyngier@....com>,
        Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Cc:     Radim Krčmář <rkrcmar@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>,
        Christoffer Dall <christoffer.dall@...aro.org>
Subject: Re: [PATCH v4] KVM: Fix stack-out-of-bounds read in write_mmio

On 15/12/2017 12:06, Marc Zyngier wrote:
> Assuming you address the above:
> 
> Reviewed-by: Marc Zyngier <marc.zyngier@....com>
> Tested-by: Marc Zyngier <marc.zyngier@....com>

Done as follows:

diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index dfd21708694f..0a016bd14c2d 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -227,7 +227,8 @@
 		__entry->gpa		= gpa;
 		__entry->val = 0;
 		if (val)
-			memcpy(&__entry->val, val, min(8, len));
+			memcpy(&__entry->val, val,
+			       min_t(u32, sizeof(__entry->val), len));
 	),
 
 	TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx",

Thanks,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ