All of lore.kernel.org
 help / color / mirror / Atom feed
* red zone violation in ntfs_runlists_merge()
@ 2026-08-16 19:06 rtm
  0 siblings, 0 replies; only message in thread
From: rtm @ 2026-08-16 19:06 UTC (permalink / raw)
  To: Namjae Jeon, Hyunchul Lee; +Cc: linux-fsdevel

The following mounts a corrupt NTFS image that produces a red zone
violation:

# uname -a
Linux xxx 7.2.0-rc7-00016-g3d6d817622b0 #40 SMP PREEMPT_DYNAMIC Wed Aug 12 13:01:40 EDT 2026 x86_64 x86_64 x86_64 GNU/Linux
# wget http://www.rtmrtm.org/rtm/ntfs2b.img.gz
# gunzip ntfs2b.img.gz
mount -t ntfs -o loop ntfs2b.img /mnt
[Right Redzone overwritten] 0xffff888100321300-0xffff888100321307 @offset=4864. 
...

The overrun occurs in the last three lines of this code in
ntfs_runlists_merge():

                        drl[ds].length = marker_vcn - drl[ds].vcn;
                        /* Finally add the ENOENT terminator. */
                        ds++;
                        if (!slots) {
                                drl = ntfs_rl_realloc_nofail(drl, ds, ds + 1);
                                rtm_check(drl);
                                *new_rl_count += 1;
                        }
                        drl[ds].vcn = marker_vcn;
                        drl[ds].lcn = LCN_ENOENT;
                        drl[ds].length = (s64)0;

After the ds++, ds is too large, but slots == 1.

Robert Morris
rtm@mit.edu


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-16 19:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-16 19:06 red zone violation in ntfs_runlists_merge() rtm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.