linux_dsm_epyc7002/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 ubifs: dent: Fix some potential memory leaks while iterating entries 2020-09-17 22:55:51 +02:00
debug.h
dir.c ubifs: prevent creating duplicate encrypted filenames 2020-12-26 16:02:44 +01:00
file.c
find.c
gc.c ubifs: Fix some kernel-doc warnings in gc.c 2020-09-17 23:06:53 +02:00
io.c ubifs: wbuf: Don't leak kernel memory to flash 2020-12-30 11:54:17 +01:00
ioctl.c ubifs: setflags: Don't show error message when vfs_ioc_setflags_prepare() fails 2020-09-17 22:56:19 +02:00
journal.c ubifs: journal: Make sure to not dirty twice for auth nodes 2020-09-29 10:43:05 +02:00
Kconfig
key.h
log.c
lprops.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
lpt_commit.c
lpt.c
Makefile
master.c
misc.c
misc.h
orphan.c ubifs: xattr: Fix some potential memory leaks while iterating entries 2020-09-17 22:55:41 +02:00
recovery.c
replay.c ubifs: Fix some kernel-doc warnings in replay.c 2020-09-17 23:06:53 +02:00
sb.c
scan.c
shrinker.c
super.c This pull request contains changes for UBIFS 2020-10-18 09:51:10 -07:00
tnc_commit.c
tnc_misc.c
tnc.c This pull request contains fixes for UBI and UBIFS 2020-10-18 09:56:50 -07:00
ubifs-media.h
ubifs.h
xattr.c ubifs: xattr: Fix some potential memory leaks while iterating entries 2020-09-17 22:55:41 +02:00