ubi: Fix out of bounds write in volume update code
authorRichard Weinberger <richard@nod.at>
Sun, 21 Feb 2016 09:53:03 +0000 (10:53 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 1 Apr 2016 00:54:37 +0000 (01:54 +0100)
commit7aae79649d6a88e7104d4d22aa4ba21f4e699e40
tree7022c733bf7892534bd7238054c8c134c2844c70
parent5476a24d66a7d275ed1e0a3113f26c1158684462
ubi: Fix out of bounds write in volume update code

commit e4f6daac20332448529b11f09388f1d55ef2084c upstream.

ubi_start_leb_change() allocates too few bytes.
ubi_more_leb_change_data() will write up to req->upd_bytes +
ubi->min_io_size bytes.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/mtd/ubi/upd.c