diff options
| author | Michael Bommarito <michael.bommarito@gmail.com> | 2026-07-11 11:26:30 -0400 |
|---|---|---|
| committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2026-09-28 19:18:21 +0200 |
| commit | 456189f9c714dee6716c2a3aad908e63830cac66 (patch) | |
| tree | 6be56f89cc7c9a98c63a1cfb65591808d5234653 /tools/lib/python | |
| parent | bf9a6578e03b065335836e025356b4b9170b9449 (diff) | |
| download | linux-next-456189f9c714dee6716c2a3aad908e63830cac66.tar.gz linux-next-456189f9c714dee6716c2a3aad908e63830cac66.zip | |
fs/ntfs3: reject an oversized resident attribute on the inline iomap path
attr_data_get_block_locked() maps a resident attribute as a one-page
IOMAP_INLINE extent: it allocates a single page, copies the resident
value into it with memcpy(), and hands that page to ntfs_iomap_begin()
as the inline data. The copy length is the on-disk resident value
length (res.data_size), and mi_enum_attr() only bounds that length
against the MFT record size. A corrupted volume with MFT records larger
than a page can therefore present a resident $DATA whose length exceeds
PAGE_SIZE, and the memcpy() then writes past the single destination page.
Impact: reading or writing a resident file on a mounted crafted NTFS
volume whose MFT records are larger than a page overflows the one-page
inline buffer in attr_data_get_block_locked() with attacker-controlled
bytes.
Reject such an attribute in attr_data_get_block_locked(), before the
page is allocated and the copy is made.
Fixes: 099ef9ab9203 ("fs/ntfs3: implement iomap-based file operations")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
