diff options
author | Richard Weinberger <[email protected]> | 2020-11-16 22:05:30 +0100 |
---|---|---|
committer | Richard Weinberger <[email protected]> | 2020-12-13 21:57:20 +0100 |
commit | 20f1431160c6b590cdc269a846fc5a448abf5b98 (patch) | |
tree | 5132362b34e3496054ec56c71fc1c3e4a41c9cf0 /lib/test_overflow.c | |
parent | 619ea229e9b54e65955f8746a31ae15797d297fc (diff) |
ubifs: wbuf: Don't leak kernel memory to flash
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: <[email protected]>
Fixes: 1e51764a3c2ac05a2 ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <[email protected]>
Reviewed-by: Zhihao Cheng <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions