mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
Revert "UBIFS: Fix potential integer overflow in allocation"
commit08acbdd6fdupstream. This reverts commit353748a359. It bypassed the linux-mtd review process and fixes the issue not as it should. Cc: Kees Cook <keescook@chromium.org> Cc: Silvio Cesare <silvio.cesare@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
20da15a755
commit
d90fea0256
@@ -1107,7 +1107,7 @@ static int recomp_data_node(const struct ubifs_info *c,
|
||||
int err, len, compr_type, out_len;
|
||||
|
||||
out_len = le32_to_cpu(dn->size);
|
||||
buf = kmalloc_array(out_len, WORST_COMPR_FACTOR, GFP_NOFS);
|
||||
buf = kmalloc(out_len * WORST_COMPR_FACTOR, GFP_NOFS);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user