summaryrefslogtreecommitdiff
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-02-19 21:00:02 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-02-24 20:36:54 +0100
commit137d9ebfdbaa45c01f9f0f6d5121ae6f1eb942bd (patch)
tree982433a233709231acc7ae92d31dbee166602e8e /drivers/firewire
parent58aaa5427663b680030aa58aaaf1e2738564b8dc (diff)
firewire: core: fix an information leak
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 <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/core-device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 150a8ba97488..f61211977d33 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -514,6 +514,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;