diff options
| author | 2026-05-09 15:12:36 +0900 | |
|---|---|---|
| committer | 2026-05-10 00:42:27 +0900 | |
| commit | 679ee5afd5b4764911656b4d4b83b9abee2b5572 (patch) | |
| tree | 8c7c886982d87afa98894f82983ce831b34870b3 /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com | |
| parent | ntfs: validate MFT attrs_offset against bytes_in_use (diff) | |
ntfs: fix MFT bitmap scan 2^32 boundary check
NTFS MFT record numbers are limited to the 32-bit range, and
ntfs_mft_record_layout() rejects mft_no >= 2^32. The free-MFT-record
bitmap scan in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock() also
guards against this overflow but uses a strict greater than comparison,
allowing record number 2^32 itself through this earlier check.
Every other 2^32 boundary check in fs/ntfs/mft.c uses '>=', so the
strict greater than here is both a real off-by-one and an internal
inconsistency. A model with ll == 2^32 confirms the current check
accepts the value while the corrected check rejects it.
Use '>=' so the boundary matches the layout-time rejection and the
surrounding bitmap-scan checks.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
