From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Date: Mon, 01 Nov 2010 17:19:37 +0000 Subject: Re: [patch v2] x86: kvm: x86: fix information leak to userland Message-Id: <20101101171937.GA4484@amt.cnet> List-Id: References: <1288447871-7715-1-git-send-email-segooon@gmail.com> <4CCC2D11.7090109@web.de> <20101030153147.GA14169@albatros> <4CCC3DC2.6090505@web.de> <20101030185447.GA7629@albatros> In-Reply-To: <20101030185447.GA7629@albatros> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vasiliy Kulikov Cc: Jan Kiszka , kernel-janitors@vger.kernel.org, Avi Kivity , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org On Sat, Oct 30, 2010 at 10:54:47PM +0400, Vasiliy Kulikov wrote: > Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and > kvm_clock_data are copied to userland with some padding and reserved > fields unitialized. It leads to leaking of contents of kernel stack > memory. We have to initialize them to zero. > > In patch v1 Jan Kiszka suggested to fill reserved fields with zeros > instead of memset'ting the whole struct. It makes sense as these > fields are explicitly marked as padding. No more fields need zeroing. > > Signed-off-by: Vasiliy Kulikov > --- > Compile tesed only. > > arch/x86/kvm/x86.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) Applied, thanks.