bcachefs: Fix an out of bounds read
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 24 Apr 2021 04:42:02 +0000 (00:42 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:02 +0000 (17:09 -0400)
commitbc2e5d5c6636f6a5794e4ed306fb008b02e6f419
treea753121a684ece4617ec43613a1c5721f8389751
parent65c0601a329580f6a016298f7148305288b7d719
bcachefs: Fix an out of bounds read

bch2_varint_decode() can read up to 7 bytes past the end of the buffer,
which means we need to allocate slightly larger key cache buffers.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_key_cache.c
fs/bcachefs/btree_update_leaf.c