OSDN Git Service

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)
committerRichard Weinberger <richard@nod.at>
Sat, 5 Mar 2016 20:56:23 +0000 (21:56 +0100)
commite4f6daac20332448529b11f09388f1d55ef2084c
tree176dde53412c2d03a732188850394580159dade8
parentfc77dbd34c5c99bce46d40a2491937c3bcbd10af
ubi: Fix out of bounds write in volume update code

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.

Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/ubi/upd.c