diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-12-15 09:14:37 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2016-01-19 18:21:41 -0800 |
commit | f04b772bfc17f502703794f4d100d12155c1a1a9 (patch) | |
tree | f69d161dd9d146284d0e0870fcfce492ea210a6a /fs/btrfs/rcu-string.h | |
parent | 319e4d0661e5323c9f9945f0f8fb5905e5fe74c3 (diff) | |
download | blackbird-obmc-linux-f04b772bfc17f502703794f4d100d12155c1a1a9.tar.gz blackbird-obmc-linux-f04b772bfc17f502703794f4d100d12155c1a1a9.zip |
btrfs: Enhance chunk validation check
Enhance chunk validation:
1) Num_stripes
We already have such check but it's only in super block sys chunk
array.
Now check all on-disk chunks.
2) Chunk logical
It should be aligned to sector size.
This behavior should be *DOUBLE CHECKED* for 64K sector size like
PPC64 or AArch64.
Maybe we can found some hidden bugs.
3) Chunk length
Same as chunk logical, should be aligned to sector size.
4) Stripe length
It should be power of 2.
5) Chunk type
Any bit out of TYPE_MAS | PROFILE_MASK is invalid.
With all these much restrict rules, several fuzzed image reported in
mail list should no longer cause kernel panic.
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/rcu-string.h')
0 files changed, 0 insertions, 0 deletions