Re: [PATCH v2] ntfs: reject invalid MFT LCNs from boot sector

From: Namjae Jeon

Date: Wed Aug 19 2026 - 05:34:18 EST


On Wed, Aug 19, 2026 at 4:19 PM Hyunchul Lee <hyc.lee@xxxxxxxxx> wrote:
>
> The NTFS boot sector stores the MFT and MFTMirr locations as unsigned
> 64-bit LCNs, but parse_ntfs_boot_sector() decoded them into an s64.
> A crafted high-bit value could therefore become negative and pass
> the existing upper-bound check. The invalid value then propagated into
> the MFT zone allocator and could result in an out-of-bounds access to
> lcn_empty_bits_per_page.
>
> Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator")
> Reported-by: Robert Morris <rtm@xxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/all/57514.1787000602@localhost
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Hyunchul Lee <hyc.lee@xxxxxxxxx>
Applied it to #ntfs-next.
Thanks!