Skip to content
Commit 85d07fbe authored by Daniel Xu's avatar Daniel Xu Committed by David Sterba
Browse files

btrfs: tree-checker: validate number of chunk stripes and parity



If there's no parity and num_stripes < ncopies, a crafted image can
trigger a division by zero in calc_stripe_length().

The image was generated through fuzzing.

CC: stable@vger.kernel.org # 5.4+
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209587


Signed-off-by: default avatarDaniel Xu <dxu@dxuuu.xyz>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent cad69d13
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment