]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: fix shift oob in alloc_lru_idx_fragmentation
authorJeongjun Park <aha310510@gmail.com>
Mon, 21 Oct 2024 15:43:56 +0000 (00:43 +0900)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 24 Oct 2024 21:41:43 +0000 (17:41 -0400)
commit5c41f75d1b921b9eaf79588cdd3b22b00fb4ec52
treef418a08a55aeff77e3d753f64e9c1d980e60189e
parent2045fc4295c427d420aa1ff551b4de8179b6e5d5
bcachefs: fix shift oob in alloc_lru_idx_fragmentation

The size of a.data_type is set abnormally large, causing shift-out-of-bounds.
To fix this, we need to add validation on a.data_type in
alloc_lru_idx_fragmentation().

Reported-by: syzbot+7f45fa9805c40db3f108@syzkaller.appspotmail.com
Fixes: 260af1562ec1 ("bcachefs: Kill alloc_v4.fragmentation_lru")
Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.h