summaryrefslogtreecommitdiff
path: root/include/memory
diff options
context:
space:
mode:
authorZhan Xusheng <zhanxusheng@xiaomi.com>2026-04-23 07:52:26 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-04-27 16:31:19 +0300
commitcad7c6f0a5147680dd2081256cf8da54fb445d94 (patch)
tree04aeada317bbfa796dff92fba3e0d74184c2b13a /include/memory
parent2dd8c1662e38f7bb68a102f1acad9b518c09aeab (diff)
downloadlinux-cad7c6f0a5147680dd2081256cf8da54fb445d94.tar.xz
ntfs: fix VCN overflow in ntfs_mapping_pairs_decompress()
In ntfs_mapping_pairs_decompress(), lowest_vcn is read from on-disk metadata and used as the initial vcn without validation. A malformed value can introduce an invalid (e.g. negative) vcn, corrupting the runlist from the start. Additionally, the accumulation vcn += deltaxcn does not check for s64 overflow. A crafted mapping pairs array can wrap vcn to a negative value, breaking the monotonically- increasing invariant relied upon by ntfs_rl_vcn_to_lcn() and related helpers. Fix this by validating lowest_vcn and using check_add_overflow() for vcn accumulation. Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'include/memory')
0 files changed, 0 insertions, 0 deletions