kernel_optimize_test/fs/ubifs
Richard Weinberger 453f2dfa34 ubifs: wbuf: Don't leak kernel memory to flash
commit 20f1431160c6b590cdc269a846fc5a448abf5b98 upstream.

Write buffers use a kmalloc()'ed buffer, they can leak
up to seven bytes of kernel memory to flash if writes are not
aligned.
So use ubifs_pad() to fill these gaps with padding bytes.
This was never a problem while scanning because the scanner logic
manually aligns node lengths and skips over these gaps.

Cc: <stable@vger.kernel.org>
Fixes: 1e51764a3c ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:54:17 +01:00
..
auth.c ubifs: Fix error return code in ubifs_init_authentication() 2020-12-30 11:53:52 +01:00
budget.c
commit.c
compress.c
crypto.c
debug.c
debug.h
dir.c
file.c
find.c
gc.c
io.c ubifs: wbuf: Don't leak kernel memory to flash 2020-12-30 11:54:17 +01:00
ioctl.c
journal.c
Kconfig
key.h
log.c
lprops.c
lpt_commit.c
lpt.c
Makefile
master.c
misc.c
misc.h
orphan.c
recovery.c
replay.c
sb.c
scan.c
shrinker.c
super.c
tnc_commit.c
tnc_misc.c
tnc.c
ubifs-media.h
ubifs.h
xattr.c