Skip to content
Commit a268d985 authored by John Pittman's avatar John Pittman Committed by Greg Kroah-Hartman
Browse files

md/raid10: prevent access of uninitialized resync_pages offset



commit 45422b70 upstream.

Due to unneeded multiplication in the out_free_pages portion of
r10buf_pool_alloc(), when using a 3-copy raid10 layout, it is
possible to access a resync_pages offset that has not been
initialized.  This access translates into a crash of the system
within resync_free_pages() while passing a bad pointer to
put_page().  Remove the multiplication, preventing access to the
uninitialized area.

Fixes: f0250618 ("md: raid10: don't use bio's vec table to manage resync pages")
Cc: stable@vger.kernel.org # 4.12+
Signed-off-by: default avatarJohn Pittman <jpittman@redhat.com>
Suggested-by: default avatarDavid Jeffery <djeffery@redhat.com>
Reviewed-by: default avatarLaurence Oberman <loberman@redhat.com>
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f8dc0350
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment