]> git.baikalelectronics.ru Git - kernel.git/commit
UBIFS: Fix potential integer overflow in allocation
authorSilvio Cesare <silvio.cesare@gmail.com>
Fri, 4 May 2018 03:44:02 +0000 (13:44 +1000)
committerKees Cook <keescook@chromium.org>
Tue, 12 Jun 2018 23:19:22 +0000 (16:19 -0700)
commit0ced5499aaf3194292884bf926133563052c3943
treec386b02a98fa6658d42dce10ce588f99536ea339
parent778ff325472e89fab5bf41432d8897942deadfa4
UBIFS: Fix potential integer overflow in allocation

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: 974763da840db ("UBIFS: add new flash file system")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/ubifs/journal.c