summaryrefslogtreecommitdiff
path: root/fs/ntfs/ea.c
AgeCommit message (Collapse)Author
2026-03-16ntfs: harden ntfs_listxattr against EA entriesHyunchul Lee
Validate every EA entry only if the buffer length is required to prevent large memory allocation. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-03-16ntfs: harden ntfs_ea_lookup against malformed EA entriesHyunchul Lee
Validate p_ea->ea_name_length tightly, and the used entry size for every EA. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-03-16ntfs: check $EA query-length in ntfs_ea_getHyunchul Lee
if ea_info_qlen exceeds all_ea_size, OOB can happen. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-03-16ntfs: validate WSL EA payload sizesHyunchul Lee
Enforce the exact-size reads for $LXUID, $LXGID, $LXMOD, $LXDEV. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-03-16ntfs: fix WSL ea restore conditionHyunchul Lee
Use NTFS_VOL_GID(not NTFS_VOL_UID) for restoring the gid, and call ntfs_ea_get_wsl_inode() only when $EA_INFORMATION exists. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-03-10ntfs: add missing newlines to pr_err() messagesWoody Suwalski
There is an inconsistent use of pr_err() statements in the current code. Many error messages are missing the \n termination, what results in the messages being printed with a delay, only after a next printk() line is printed. It prevents relying on printk() to monitor the driver errors. This patch is modifying only text messages, no functional change. Signed-off-by: Woody Suwalski <terraluna977@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-02-26ntfs: Fix null pointer dereferenceEthan Tidmore
The variable ctx can be null and once confirmed to be null in its error path goes to label err_out. Once there it can be immediately dereferenced by the function ntfs_attr_put_search_ctx() which has no null pointer check. Detected by Smatch: fs/ntfs/ea.c:687 ntfs_new_attr_flags() error: we previously assumed 'ctx' could be null (see line 577) Add null pointer check before running ntfs_attr_put_search_ctx() in error path. Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-02-19ntfs: add reparse and ea operationsNamjae Jeon
Implement support for Extended Attributes and Reparse Points, enabling Posix ACL support and, and compatibility with Windows Subsystem for Linux (WSL) metadata. Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>