]> git.ipfire.org Git - thirdparty/linux.git/commit
ntfs: harden runlist realloc size calculations
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 10 Jul 2026 05:22:57 +0000 (14:22 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Tue, 21 Jul 2026 09:48:24 +0000 (18:48 +0900)
commit8bed376124ab4505b70083a2b91f2c7ef6d51e24
tree37395998a27835de3f55fae5de0d5daa4ab98ce8
parent523307b8516fc740895238af8473aa0630b3e088
ntfs: harden runlist realloc size calculations

Add a shared helper to safely convert runlist element counts to byte sizes
using overflow checks, and use it in both ntfs_rl_realloc() and
ntfs_rl_realloc_nofail().

Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator")
Co-developed-by: Alper Mudar <kommandant_alper@proton.me>
Signed-off-by: Alper Mudar <kommandant_alper@proton.me>
Tested-by: Alper Mudar <kommandant_alper@proton.me>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/runlist.c