Files
twx-linux/fs
Richard Weinberger 2c3747b1a8 ubifs: wbuf: Don't leak kernel memory to flash
commit 20f1431160 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>
[sudip: adjust context]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-17 13:58:59 +01:00
..
2020-11-05 11:07:03 +01:00
…
2020-04-02 16:34:33 +02:00
…
…
…
2020-10-29 09:07:16 +01:00
…
2020-08-21 09:48:18 +02:00
…
2020-12-29 13:47:08 +01:00
…
2020-11-18 18:27:58 +01:00
…
…
…
…
…
…
…
2020-03-11 18:02:43 +01:00
…
…
…
…
…
2020-04-02 16:34:21 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…