]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
UBI: fix out of bounds write
authorBrian Norris <computersforpeace@gmail.com>
Sat, 28 Feb 2015 10:23:26 +0000 (02:23 -0800)
committerZefan Li <lizefan@huawei.com>
Fri, 18 Sep 2015 01:20:25 +0000 (09:20 +0800)
commit9ef6369ce62c086c475891681e529f24b377241c
treecea916744fcf49aa63247c5dd01181da31b492f5
parent058ee4d9f5d19172ee16e5a816f65b3e97327e5a
UBI: fix out of bounds write

commit d74adbdb9abf0d2506a6c4afa534d894f28b763f upstream.

If aeb->len >= vol->reserved_pebs, we should not be writing aeb into the
PEB->LEB mapping.

Caught by Coverity, CID #711212.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/mtd/ubi/eba.c