Silvio Cesare b7261fc5f5 UBIFS: Fix potential integer overflow in allocation
commit 353748a359f1821ee934afc579cf04572406b420 upstream.

There is potential for the size and len fields in ubifs_data_node to be
too large causing either a negative value for the length fields or an
integer overflow leading to an incorrect memory allocation. Likewise,
when the len field is small, an integer underflow may occur.

Signed-off-by: Silvio Cesare <silvio.cesare@gmail.com>
Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:24:59 +02:00
..
2018-02-16 20:22:57 +01:00
2016-12-12 23:06:28 +01:00
2017-07-14 22:49:06 +02:00
2015-03-25 11:08:41 +02:00
2016-12-12 23:07:38 +01:00
2016-12-12 23:07:38 +01:00