aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2024-01-17 00:32:26 +0000
committerDavid Sterba <[email protected]>2024-01-18 22:43:08 +0000
commit7f2d219e78e95a137a9c76fddac7ff8228260439 (patch)
treef6d2ba99e3f8148706efd6f580a9ed9378cf0bb7 /fs/btrfs/dev-replace.c
parentbtrfs: scrub: avoid use-after-free when chunk length is not 64K aligned (diff)
downloadkernel-7f2d219e78e95a137a9c76fddac7ff8228260439.tar.gz
kernel-7f2d219e78e95a137a9c76fddac7ff8228260439.zip
btrfs: scrub: limit RST scrub to chunk boundary
[BUG] If there is an extent beyond chunk boundary, currently RST scrub would error out. [CAUSE] In scrub_submit_extent_sector_read(), we completely rely on extent_sector_bitmap, which is populated using extent tree. The extent tree can be corrupted that there is an extent item beyond a chunk. In that case, RST scrub would fail and error out. [FIX] Despite the extent_sector_bitmap usage, also limit the read to chunk boundary. Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions