]> git.baikalelectronics.ru Git - kernel.git/commit
staging: erofs: fix unexpected out-of-bound data access
authorGao Xiang <gaoxiang25@huawei.com>
Fri, 12 Apr 2019 09:53:14 +0000 (17:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Apr 2019 11:56:20 +0000 (13:56 +0200)
commit4cc891f9e2d4cf874962ed727cb7c31333914930
tree1db2a14a70ab972819be7a2ddaf2d48067a7e552
parent478314e0f538162dc5f2584892aad352792b8128
staging: erofs: fix unexpected out-of-bound data access

Unexpected out-of-bound data will be read in erofs_read_raw_page
after commit da14fd34e72b ("block: enable multipage bvecs") since
one iovec could have multiple pages.

Let's fix as what Ming's pointed out in the previous email [1].

[1] https://lore.kernel.org/lkml/20190411080953.GE421@ming.t460p/

Suggested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Fixes: da14fd34e72b ("block: enable multipage bvecs")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/data.c