summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-12-15 09:14:37 +0800
committerChris Mason <clm@fb.com>2016-01-19 18:21:41 -0800
commitf04b772bfc17f502703794f4d100d12155c1a1a9 (patch)
treef69d161dd9d146284d0e0870fcfce492ea210a6a /fs/btrfs/ioctl.c
parent319e4d0661e5323c9f9945f0f8fb5905e5fe74c3 (diff)
downloadblackbird-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/ioctl.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud