diff options
| author | Baolin Liu <liubaolin@kylinos.cn> | 2026-09-23 14:02:38 +0800 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-12 20:46:06 +0900 |
| commit | b90a4aa9c1310b8281a4be6c7e5ca52bff24d398 (patch) | |
| tree | 2dfe59c3f67208e646adc2b0c9cc45eb8275c092 /tools/lib/python/kdoc/parse_data_structs.py | |
| parent | e714d71beda91e6ab2d9edb5970cb911e3abd95e (diff) | |
| download | linux-next-b90a4aa9c1310b8281a4be6c7e5ca52bff24d398.tar.gz linux-next-b90a4aa9c1310b8281a4be6c7e5ca52bff24d398.zip | |
ntfs: validate EA chains and link zero-terminated tails
A zero next-entry offset terminates an EA list. Appending an entry
without linking the old tail makes the new entry unreachable. Invalid
entries are also treated as missing names, allowing setters to proceed
on corrupt metadata.
Validate the entire chain before modifying it and connect a zero tail to
the append position. Check name terminators and retain the full tail
span when removing an entry. Return EUCLEAN for malformed EA structures
and inconsistent information lengths, preserving that error through the
get, set and list paths. Keep ENOENT for a missing name and translate it
to ENODATA only at the xattr read boundary. Preserve lower-level read
errors.
Reuse the same full-chain validation in ntfs_listxattr(), including
size-only queries, before copying names. Reject malformed lists with
EUCLEAN instead of returning an empty or partial list.
Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions
