]> git.dujemihanovic.xyz Git - u-boot.git/commit
fs: btrfs: fix out of bounds write
authorAlex Shumsky <alexthreed@gmail.com>
Tue, 18 Jun 2024 21:41:38 +0000 (00:41 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 26 Jun 2024 15:55:53 +0000 (09:55 -0600)
commitee1941e4fec601a8444f49c7dad04ad700d501a6
tree0846207bf11e3385bd7b3b283b8e963cedf470e6
parent5d9aca5e043084d08666f4f7a87a1d416d9d6421
fs: btrfs: fix out of bounds write

Fix btrfs_read/read_and_truncate_page write out of bounds of destination
buffer. Old behavior break bootstd malloc'd buffers of exact file size.
Previously this OOB write have not been noticed because distroboot usually
read files into huge static memory areas.

Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Fixes: e342718 ("fs: btrfs: Implement btrfs_file_read()")
Reviewed-by: Qu Wenruo <wqu@suse.com>
fs/btrfs/inode.c