ext4: always check block group bounds in ext4_init_block_bitmap()
authorTheodore Ts'o <tytso@mit.edu>
Thu, 14 Jun 2018 03:00:48 +0000 (23:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2018 14:29:17 +0000 (16:29 +0200)
commitac48bb9bc0a32f5a4432be1645b57607f8c46aa7
tree8240b10496dde47fe00ade4af2fee7a8554b2bd8
parentac93c718365ac6ea9d7631641c8dec867d623491
ext4: always check block group bounds in ext4_init_block_bitmap()

commit 819b23f1c501b17b9694325471789e6b5cc2d0d2 upstream.

Regardless of whether the flex_bg feature is set, we should always
check to make sure the bits we are setting in the block bitmap are
within the block group bounds.

https://bugzilla.kernel.org/show_bug.cgi?id=199865

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/balloc.c