mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
firewire: core: fix an information leak
commit 137d9ebfdb 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 <stefanr@s5r6.in-berlin.de>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6f3fc70b17
commit
7098a32a03
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user