From: Giulia Aloia <giulia@bynar.io>
To: almaz.alexandrovich@paragon-software.com
Cc: ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] fs/ntfs3: fix log replay payload overreads
Date: Fri, 25 Sep 2026 13:16:12 +0200 [thread overview]
Message-ID: <20260925111619.68345-1-giulia@bynar.io> (raw)
This series fixes two journal replay paths that can read past crafted
redo or undo payloads while mounting a dirty NTFS volume.
Patch 1 validates that redo and undo payload ranges stay within the log
record before replay uses them, while preserving the compensation-log
record undo exception used by Windows. It also validates the fixed-size
OpenNonresidentAttribute redo entry and optional undo name before the
analysis pass copies them.
Patch 2 validates the minimum payload length for SetNewAttributeSizes,
which always reads alloc_size, valid_size and data_size but previously
only checked whether the optional total_size field was present.
The two checks are complementary. Patch 1 makes sure the selected
payload range is inside the log record when that range is expected to be
present. Patch 2 makes sure that the selected range is large enough for
the SetNewAttributeSizes operation that interprets it.
Both issues are reachable while mounting crafted images. Each patch
contains the KASAN report observed before the fix. With these patches,
the same images are rejected during mount without sanitizer reports.
Giulia Aloia (2):
fs/ntfs3: fix out-of-bounds read of redo/undo data during log replay
fs/ntfs3: validate SetNewAttributeSizes payload length
fs/ntfs3/fslog.c | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
--
2.55.0
next reply other threads:[~2026-09-25 11:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 11:16 Giulia Aloia [this message]
2026-09-25 11:16 ` [PATCH 1/2] fs/ntfs3: fix out-of-bounds read of redo/undo data during log replay Giulia Aloia
2026-09-25 11:16 ` [PATCH 2/2] fs/ntfs3: validate SetNewAttributeSizes payload length Giulia Aloia
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=20260925111619.68345-1-giulia@bynar.io \
--to=giulia@bynar.io \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
/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
all inboxes | Powered by JetHome®