Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754674Ab0BSUAS (ORCPT ); Fri, 19 Feb 2010 15:00:18 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:48916 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404Ab0BSUAQ (ORCPT ); Fri, 19 Feb 2010 15:00:16 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Date: Fri, 19 Feb 2010 21:00:02 +0100 (CET) From: Stefan Richter Subject: [PATCH] firewire: core: fix an information leak To: linux1394-devel@lists.sourceforge.net cc: linux-kernel@vger.kernel.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-Disposition: INLINE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1100 Lines: 33 If a device exposes a sparsely populated configuration ROM, firewire-core's sysfs interface and character device file interface showed random data in the gaps between config ROM blocks. Fix this by zero-initialization of the config ROM reader's scratch buffer. Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 1 + 1 file changed, 1 insertion(+) Index: b/drivers/firewire/core-device.c =================================================================== --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -514,6 +514,7 @@ static int read_bus_info_block(struct fw return -ENOMEM; stack = &rom[READ_BIB_ROM_SIZE]; + memset(rom, 0, sizeof(*rom) * READ_BIB_ROM_SIZE); device->max_speed = SCODE_100; -- Stefan Richter -=====-==-=- --=- =--== http://arcgraph.de/sr/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/