Skip to content

Commit

Permalink
firewire: core: fix an information leak
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Stefan Richter committed Feb 24, 2010
1 parent 58aaa54 commit 137d9eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/firewire/core-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 137d9eb

Please sign in to comment.