]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix potential race between s_group_info online resizing and access
authorSuraj Jitindar Singh <surajjs@amazon.com>
Wed, 19 Feb 2020 03:08:50 +0000 (19:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 16:22:22 +0000 (17:22 +0100)
commit9cd9b26a3161042643b92e3afc126051363b88ed
tree1cf4ac0b74f4d73dbf0a0fcc27ed31fa11da5bc3
parent8ece390575f5edafaed479e1d1474e86427fbb41
ext4: fix potential race between s_group_info online resizing and access

commit ef68afa3be2dadd94b7ce68fba424e4b3c5a1e01 upstream.

During an online resize an array of pointers to s_group_info gets replaced
so it can get enlarged. If there is a concurrent access to the array in
ext4_get_group_info() and this memory has been reused then this can lead to
an invalid memory access.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=206443
Link: https://lore.kernel.org/r/20200221053458.730016-3-tytso@mit.edu
Signed-off-by: Suraj Jitindar Singh <surajjs@amazon.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Balbir Singh <sblbir@amazon.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/mballoc.c