From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757614Ab0LHBWT (ORCPT ); Tue, 7 Dec 2010 20:22:19 -0500 Received: from kroah.org ([198.145.64.141]:33566 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932593Ab0LHBC5 (ORCPT ); Tue, 7 Dec 2010 20:02:57 -0500 X-Mailbox-Line: From gregkh@clark.site Tue Dec 7 16:57:41 2010 Message-Id: <20101208005741.680768041@clark.site> User-Agent: quilt/0.48-11.2 Date: Tue, 07 Dec 2010 16:59:39 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Vasiliy Kulikov , Kees Cook Subject: [202/289] usb: misc: iowarrior: fix information leak to userland In-Reply-To: <20101208005821.GA2922@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.36-stable review patch. If anyone has any objections, please let us know. ------------------ From: Vasiliy Kulikov commit eca67aaeebd6e5d22b0d991af1dd0424dc703bfb upstream. Structure iowarrior_info is copied to userland with padding byted between "serial" and "revision" fields uninitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/iowarrior.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c @@ -553,6 +553,7 @@ static long iowarrior_ioctl(struct file /* needed for power consumption */ struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc; + memset(&info, 0, sizeof(info)); /* directly from the descriptor */ info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor); info.product = dev->product_id;