From: Stefan Richter Date: Fri, 19 Feb 2010 20:00:02 +0000 (+0100) Subject: firewire: core: fix an information leak X-Git-Tag: firefly_0821_release~10186^2~701 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7098a32a0303c42e8b2db72fd8cf58c624a96a7e;p=firefly-linux-kernel-4.4.55.git firewire: core: fix an information leak commit 137d9ebfdbaa45c01f9f0f6d5121ae6f1eb942bd upstream. 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 Cc: maximilian attems Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index 9d0dfcbe2c1c..17e2b1740202 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -463,6 +463,7 @@ static int read_bus_info_block(struct fw_device *device, int generation) return -ENOMEM; stack = &rom[READ_BIB_ROM_SIZE]; + memset(rom, 0, sizeof(*rom) * READ_BIB_ROM_SIZE); device->max_speed = SCODE_100;