The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: 이상호 <kudo3228@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>, Hyunchul Lee <hyc.lee@gmail.com>
Cc: 이상호 <kudo3228@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [BUG/RFC] ntfs: crafted image triggers WARN_ON in ntfs_map_runlist_nolock()
Date: Thu,  2 Jul 2026 07:12:37 +0900	[thread overview]
Message-ID: <20260701221237.822167-1-kudo3228@gmail.com> (raw)

Hi,

I found a crafted NTFS image that triggers the following warning during
mount-time NTFS logfile handling:

  WARNING: fs/ntfs/attrib.c:177 at ntfs_map_runlist_nolock+0x1275/0x17b0

The observed stack is:

  ntfs_map_runlist_nolock
  ntfs_empty_logfile
  load_system_files
  ntfs_fill_super
  get_tree_bdev_flags
  vfs_get_tree
  do_new_mount
  __se_sys_mount

The warning site is:

  fs/ntfs/attrib.c:177
  WARN_ON(!ctx->attr->non_resident);

The caller path reaches this through:

  fs/ntfs/logfile.c:677
  err = ntfs_map_runlist_nolock(log_ni, vcn, NULL);

The current hypothesis is that a malformed image reaches the $LogFile cleanup
path and causes ntfs_map_runlist_nolock() to find a resident attribute where it
expects a non-resident one. Since the input is a crafted filesystem image, this
looks like it should be rejected through an ordinary mount error path rather
than tripping a kernel WARN_ON().

The crash was found with syzkaller/SyzDirect on a recent local mainline build.
syz-repro reproduced the warning during minimization and reduced the syscall
sequence to syz_mount_image$ntfs. I also extracted the crashing program from
the syzkaller log and generated a standalone C reproducer from it. The generated
C reproducer compiles locally.

I have not yet confirmed whether this has impact beyond a mount-time warning
from a crafted NTFS image. I can provide the full syzkaller/C reproducer and
kernel config if useful.

Thanks,
이상호

             reply	other threads:[~2026-07-01 22:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 22:12 이상호 [this message]
2026-07-01 23:36 ` [BUG/RFC] ntfs: crafted image triggers WARN_ON in ntfs_map_runlist_nolock() Namjae Jeon
2026-07-02  1:37   ` Namjae Jeon
2026-07-03  3:39     ` 이상호
2026-07-03  4:41       ` Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260701221237.822167-1-kudo3228@gmail.com \
    --to=kudo3228@gmail.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox