Skip to content
Unverified Commit 557d1967 authored by Abdun Nihaal's avatar Abdun Nihaal Committed by Konstantin Komarov
Browse files

fs/ntfs3: Fix slab-out-of-bounds read in ntfs_trim_fs

Syzbot reports an out of bound access in ntfs_trim_fs.
The cause of this is using a loop termination condition that compares
window index (iw) with wnd->nbits instead of wnd->nwnd, due to which the
index used for wnd->free_bits exceeds the size of the array allocated.

Fix the loop condition.

Fixes: 3f3b442b ("fs/ntfs3: Add bitmap")
Link: https://syzkaller.appspot.com/bug?extid=b892240eac461e488d51


Reported-by: default avatar <syzbot+b892240eac461e488d51@syzkaller.appspotmail.com>
Signed-off-by: default avatarAbdun Nihaal <abdun.nihaal@gmail.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent bfcdbae0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment