public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ntfs3: fix OOB read and integer overflow in run_unpack()
@ 2026-03-29 11:17 tobgaertner
  2026-03-29 11:17 ` [PATCH 1/2] ntfs3: add buffer boundary checks to run_unpack() tobgaertner
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: tobgaertner @ 2026-03-29 11:17 UTC (permalink / raw)
  To: almaz.alexandrovich
  Cc: ntfs3, linux-kernel, stable, security, Tobias Gaertner

From: Tobias Gaertner <tob.gaertner@me.com>

Two bugs in run_unpack() found by fuzzing with a source-patched harness
(LibAFL + QEMU ARM64 system-mode):

Patch 1: run_unpack() checks `run_buf < run_last` at the loop top but
then reads size_size and offset_size bytes via run_unpack_s64() without
verifying they fit in the remaining buffer.  A crafted NTFS image with
truncated run data triggers a heap OOB read of up to 15 bytes on mount.

Patch 2: The volume boundary check `lcn + len > sbi->used.bitmap.nbits`
uses raw addition that can wrap for large values, bypassing the
validation.  CVE-2025-40068 added check_add_overflow() for adjacent
arithmetic but missed this instance.

Both bugs are present since NTFS3 was merged in 5.15.

Could CVE IDs be assigned for these two issues?

tobgaertner (2):
  ntfs3: add buffer boundary checks to run_unpack()
  ntfs3: fix integer overflow in run_unpack() volume boundary check

 fs/ntfs3/run.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-04-15  7:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-29 11:17 [PATCH 0/2] ntfs3: fix OOB read and integer overflow in run_unpack() tobgaertner
2026-03-29 11:17 ` [PATCH 1/2] ntfs3: add buffer boundary checks to run_unpack() tobgaertner
2026-03-29 11:17 ` [PATCH 2/2] ntfs3: fix integer overflow in run_unpack() volume boundary check tobgaertner
2026-04-07 17:19 ` [PATCH 0/2] ntfs3: fix OOB read and integer overflow in run_unpack() Konstantin Komarov
2026-04-15  4:19   ` Tobias Gaertner
2026-04-15  7:00     ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox