summaryrefslogtreecommitdiff
path: root/uuid-tree.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-01-06 17:30:44 +0800
committerDavid Sterba <dsterba@suse.cz>2015-01-09 18:46:16 +0100
commitdbed21e7c20d3f85d6edffe7cd25353af0569278 (patch)
tree3d3f4ce18fce7ab81b26bfe0c87a120e0ab2f6ce /uuid-tree.c
parent74f7b51c749d32f7001faa9492f42c99e42c3b37 (diff)
btrfs-progs: Fix a buffer overflow causing segfault in fstests/btrfs/069
The newly introduced search_chunk_tree_for_fs_info() won't count devid 0 in fi_arg->num_devices, which will cause buffer overflow since later get_device_info() will fill di_args with devid. This can be trigger by fstests/btrfs/069 and any operations needs to iterate over all the devices like 'fi show' or 'dev stat' while replacing. The fix is do an extra probe specifically for devid 0 after search_chunk_tree_for_fs_info() and change num_devices if needed. Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'uuid-tree.c')
0 files changed, 0 insertions, 0 deletions