diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2014-09-30 16:52:10 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-01 16:35:33 +0200 |
commit | 2c1b155988a9263bb5e4dc81c6a48c699f649789 (patch) | |
tree | 6a4bef81c3c945763789c5f0c7153c394f5aa044 /ctree.c | |
parent | 3fce2fa9a136ed79e32b50d5ba4c34ea521f59ef (diff) |
btrfs-progs: Check the csum tree node before go through the csum tree
[BUG]
Some fsfuzzed btrfs image will cause btrfsck segfault.
[REPRODUCER]
Run btrfsck on a csum tree block corrupted image.
[REASON]
check_csums() function call btrfs_search_slot() on csum_tree but doesn't
check whether the csum_tree contains a valid extent_buffer, which causes
the segfault.
[FIX]
Check the csum_root->node before any search.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'ctree.c')
0 files changed, 0 insertions, 0 deletions