]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ntfs: zero out stale data in straddle block beyond initialized_size
authorHyunchul Lee <hyc.lee@gmail.com>
Wed, 1 Apr 2026 07:24:57 +0000 (16:24 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Sat, 18 Apr 2026 02:32:56 +0000 (11:32 +0900)
commit8b4064e6146efc6c0202d671c4e26bcbd26e3555
tree7f0c00fc56a3e9a9a6dc76b72e0dbc324ae4fb2c
parent8541d8f725c673db3bd741947f27974358b2e163
ntfs: zero out stale data in straddle block beyond initialized_size

ntfs_read_iomap_begin_non_resident() rounds up MAPPED extents
to the block boundary of initialized_size. This ensures that
any subsequent blocks are treated as IOMAP_UNWRITTEN, but
it also causes the "straddle block" containing initialized_size
to be read from disk. The disk data beyond initialized_size in
this block is stale and must be zeroed to prevent data leakage.

Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/aops.c
fs/ntfs/file.c