Re: [PATCH] fs/ntfs3: validate log replay bitmap buffer spans
From: Jérémy Jean
Date: Tue Nov 03 2026 - 13:26:08 EST
On 2026-08-17 22:29, Jérémy Jean wrote:
do_action() derives the read buffer size for bitmap replay records from
lrh->lcns_follow in u64, then stores it in u32 bytes. A log record that
covers more than U32_MAX bytes therefore allocates and reads only the
truncated tail while the bitmap range checks still compare against the
full u64 span. ntfs_bitmap_{set,clear}_le() can then access past
buffer_le.
Keep the span in u64 until the read size has been validated against the
u32 ntfs_read_run_nb() interface. Also validate bitmap ranges in u64 and
reject lengths that cannot be represented by the helpers' int len
parameter, so crafted bitmap_off/bits values cannot wrap the existing
u32 arithmetic before the bounds check.
Hello,
Did anyone had time to check at this?
Current master branch is still unfixed.
Regards,
Jérémy