stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "UBI: fix out of bounds write" has been added to the 3.10-stable tree
@ 2015-05-02 16:44 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-02 16:44 UTC (permalink / raw)
  To: computersforpeace, gregkh, richard; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    UBI: fix out of bounds write

to the 3.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ubi-fix-out-of-bounds-write.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From d74adbdb9abf0d2506a6c4afa534d894f28b763f Mon Sep 17 00:00:00 2001
From: Brian Norris <computersforpeace@gmail.com>
Date: Sat, 28 Feb 2015 02:23:26 -0800
Subject: UBI: fix out of bounds write

From: Brian Norris <computersforpeace@gmail.com>

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mtd/ubi/eba.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -1362,7 +1362,8 @@ int ubi_eba_init(struct ubi_device *ubi,
 				 * during re-size.
 				 */
 				ubi_move_aeb_to_list(av, aeb, &ai->erase);
-			vol->eba_tbl[aeb->lnum] = aeb->pnum;
+			else
+				vol->eba_tbl[aeb->lnum] = aeb->pnum;
 		}
 	}
 


Patches currently in stable-queue which might be from computersforpeace@gmail.com are

queue-3.10/ubi-initialize-leb-number-variable.patch
queue-3.10/ubi-fix-out-of-bounds-write.patch
queue-3.10/ubi-account-for-bitflips-in-both-the-vid-header-and-data.patch
queue-3.10/ubi-fix-check-for-too-many-bytes.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-02 16:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 16:44 Patch "UBI: fix out of bounds write" has been added to the 3.10-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).