mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] fs/ntfs3: fix log replay payload overreads
@ 2026-09-25 11:16 Giulia Aloia
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Giulia Aloia @ 2026-09-25 11:16 UTC (permalink / raw)
  To: almaz.alexandrovich; +Cc: ntfs3, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-25 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 11:16 [PATCH 0/2] fs/ntfs3: fix log replay payload overreads Giulia Aloia
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

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®