ntfs: finish resident attribute lookup validation
Status from this message: Applied them to #ntfs-next.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest4 patches 5 repliesApplied
- v54 patches 2 repliesSuperseded
Changes in v6 from the cover letter
- Rebased onto the official git.kernel.org ntfs-next branch instead of the temporary out-of-tree test branch, so the series no longer depends on patches that only existed there.
- Patch 4 is now a complete resident $INDEX_ROOT validator. In v5 it was an incremental allocated_size-only change on top of the out-of-tree validator; the resulting validator function is unchanged, but it now stands on its own against ntfs-next.
- No functional changes to the other three patches.
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | ntfs: reject non-resident records for resident-only attributesfs/ | +17 | 1 reply | |
| 2/4 | ntfs: grow index root value before reparent header updatefs/ | +48 | 1 reply | |
| 3/4 | ntfs: update index root allocated size before shrinkfs/ | +15 | 1 reply | |
| 4/4 | ntfs: validate resident index root values on lookupfs/ | +31 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Hyunchul Lee |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 0/4] ntfs: finish resident attribute lookup validation
Hi,
this is v6 of the remaining NTFS resident attribute lookup validation fixes, rebased onto the current ntfs-next branch from git.kernel.org.
v5 was generated against the temporary linux-ntfs ntfs-next test branch, where the earlier lookup validation patches and the initial resident $INDEX_ROOT validator were already present. That made the final allocated_size-only patch depend on context that is not present in the official ntfs-next branch.
This version is generated on top of:
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git
branch ntfs-next
base: <b3f6cd1d54aa>
The current official ntfs-next branch already contains the earlier shared attribute-value validator, the volume-name error handling fix, the volume information search-context reinit fix, and the resident $VOLUME_NAME validator. This resend therefore contains only the remaining official-base delta:
- reject non-resident records for all resident-only attribute types;
- fix the $INDEX_ROOT grow and shrink ordering so header capacity never exceeds the resident value visible to lookup-time validation;
- add the full resident $INDEX_ROOT lookup validator, including allocated_size checks.
Changes since v5:
- Rebased onto the official git.kernel.org ntfs-next branch instead of the temporary out-of-tree test branch, so the series no longer depends on patches that only existed there.
- Patch 4 is now a complete resident $INDEX_ROOT validator. In v5 it was an incremental allocated_size-only change on top of the out-of-tree validator; the resulting validator function is unchanged, but it now stands on its own against ntfs-next.
- No functional changes to the other three patches.
Testing:
- Applied this 4-patch series on top of the ntfs-next base above with git am; git diff --check is clean and scripts/checkpatch.pl --strict passes on all four patches.
- Built a KASAN kernel (CONFIG_KASAN=y, CONFIG_NTFS_FS=y) and ran it under QEMU against fresh 512 MiB NTFS images: mounted each read-write, created 12 directories and 2160 files, then renamed, removed, cleaned up and unmounted. Repeated three times; no KASAN report, oops or panic, and ntfsfix -n reported each image clean after every run.
DaeMyung Kang (4):
ntfs: reject non-resident records for resident-only attributes
ntfs: grow index root value before reparent header update
ntfs: update index root allocated size before shrink
ntfs: validate resident index root values on lookup
fs/ntfs/attrib.c | 49 +++++++++++++++++++++++- fs/ntfs/index.c | 96 +++++++++++++++++++++++++++++++----------------- 2 files changed, 111 insertions(+), 34 deletions(-)
base-commit: b3f6cd1d54aa279cc4f47aa27939ebe517a2c390
Signature · 1 line
2.43.0