diff options
| author | Matthias Goergens <matthias.goergens@gmail.com> | 2026-10-02 12:34:57 +0800 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-20 18:41:52 +0900 |
| commit | 258239e79b842e5246fb7f50758d9d15430f4102 (patch) | |
| tree | d4baa5c38f4a582f7bca8124fbc19611d127e3a8 /scripts/Makefile.thinlto | |
| parent | 768c6f5fab58cefa65509dd34b946fdd1071746e (diff) | |
| download | linux-258239e79b842e5246fb7f50758d9d15430f4102.tar.gz linux-258239e79b842e5246fb7f50758d9d15430f4102.zip | |
ntfs: do not use a stale runlist pointer when undoing $MFT extension
When ntfs_mft_data_extend_allocation_nolock() fails after it has
rebuilt the mapping pairs of the last $MFT data extent, undo_alloc
truncates the runlist and then rebuilds the old mapping pairs from rl2,
a pointer into the runlist taken before the truncation.
ntfs_rl_truncate_nolock() can reallocate the runlist, and KASAN then
reports a use-after-free in ntfs_mapping_pairs_build().
Pass the start of the runlist instead, and hold the runlist lock for
reading while the mapping pairs are built from it.
ntfs_mapping_pairs_build() skips to the element containing the first
vcn by itself.
Fixes: 1e9ea7e04472 ("Revert "fs: Remove NTFS classic"")
Cc: stable@vger.kernel.org
Reviewed-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
