<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/ntfs/ea.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-09-05T04:37:00+00:00</updated>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-09-05T04:37:00+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-09-02T22:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d'/>
<id>urn:sha1:3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d</id>
<content type='text'>
This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: leave HasEA flag untouched on setxattr failure</title>
<updated>2026-08-27T12:56:15+00:00</updated>
<author>
<name>Baolin Liu</name>
<email>liubaolin@kylinos.cn</email>
</author>
<published>2026-08-27T06:43:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ac727d86fb84bdc9626ba9c756c26767459f3083'/>
<id>urn:sha1:ac727d86fb84bdc9626ba9c756c26767459f3083</id>
<content type='text'>
In ntfs_set_ea(), the exit path unconditionally updates the HasEA
flag based on ea_info_qsize. When an error occurs before
ea_info_qsize is updated, NInoClearHasEA() hides existing on-disk
EAs until the inode is evicted.

Only update the flag on success.

Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations")
Signed-off-by: Baolin Liu &lt;liubaolin@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: fix memmove overlap in ntfs_new_attr_flags</title>
<updated>2026-08-27T12:50:45+00:00</updated>
<author>
<name>Hongling Zeng</name>
<email>zenghongling@kylinos.cn</email>
</author>
<published>2026-08-24T07:59:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=acb1095fd2db884b417cb70808c886e4b615ff05'/>
<id>urn:sha1:acb1095fd2db884b417cb70808c886e4b615ff05</id>
<content type='text'>
When the record shrinks while the payload offsets increase (e.g., enabling
compression reduces padding, making arec_size &lt; old_arec_size, but the header
grows by 8 bytes), moving the name first can overwrite the old mapping_pairs
before they are copied. Move mapping_pairs first in this case.

Since mp_ofs is derived from name_ofs, they always change in the same
direction. Checking name_ofs alone is sufficient.

Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations")
Cc: stable@vger.kernel.org
Signed-off-by: Hongling Zeng &lt;zenghongling@kylinos.cn&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: fix incorrect MFT record pointer passed to ntfs_attr_record_resize</title>
<updated>2026-08-26T11:25:44+00:00</updated>
<author>
<name>Hongling Zeng</name>
<email>zenghongling@kylinos.cn</email>
</author>
<published>2026-08-24T05:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8d139e3635c86e2c97c78d55538ce0b00b6d9986'/>
<id>urn:sha1:8d139e3635c86e2c97c78d55538ce0b00b6d9986</id>
<content type='text'>
ntfs_new_attr_flags() passes the wrong MFT record to ntfs_attr_record_resize().
When the attribute is in an extent record, ctx-&gt;mrec points to the extent
but the function receives the base record pointer m, causing incorrect
size calculations in memmove.

Fix by passing ctx-&gt;mrec (the actual MFT record containing the attribute)
instead of m (the base MFT record) to ntfs_attr_record_resize().

Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations")
Cc: stable@vger.kernel.org
Signed-off-by: Hongling Zeng &lt;zenghongling@kylinos.cn&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: return -ERANGE for undersized xattr buffer</title>
<updated>2026-08-26T11:15:38+00:00</updated>
<author>
<name>Baolin Liu</name>
<email>liubaolin@kylinos.cn</email>
</author>
<published>2026-08-21T05:32:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ada728801999e25e610091362447372f1b25dd25'/>
<id>urn:sha1:ada728801999e25e610091362447372f1b25dd25</id>
<content type='text'>
When the value buffer passed to getxattr(2) for system.dos_attrib,
system.ntfs_attrib or system.ntfs_attrib_be is smaller than the
attribute value, ntfs_getxattr() returns -ENODATA, which tells
userspace the attribute does not exist. The xattr API expects
-ERANGE in this case, and ntfs_get_ea() in the same file already
returns -ERANGE for regular EAs.

Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations")
Signed-off-by: Baolin Liu &lt;liubaolin@kylinos.cn&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: add non-resident WOF decompression</title>
<updated>2026-08-21T10:08:57+00:00</updated>
<author>
<name>Hyunchul Lee</name>
<email>hyc.lee@gmail.com</email>
</author>
<published>2026-08-21T05:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2bef615ebf2884f33036123ada4dc00c0f54904d'/>
<id>urn:sha1:2bef615ebf2884f33036123ada4dc00c0f54904d</id>
<content type='text'>
Introduce non-resident Windows System Compression (WOF) decompression
support. Add wof.c containing parse_wof_chunk_table() and
ntfs_read_wof_compressed_block(), and routing them via transparent
codec ops table with dynamic scratch memory allocation. Hook up
ntfs_readpage/read_folio paths in aops.c to delegate to the WOF block
reader when NInoWofCompressed is set.

Signed-off-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: return errors from ntfs_attr_readall</title>
<updated>2026-08-21T10:06:36+00:00</updated>
<author>
<name>Hyunchul Lee</name>
<email>hyc.lee@gmail.com</email>
</author>
<published>2026-08-21T05:00:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=56cc42a7b3878ad1450d04713beabeb3e7447b14'/>
<id>urn:sha1:56cc42a7b3878ad1450d04713beabeb3e7447b14</id>
<content type='text'>
ntfs_attr_readall() currently loses the failure reason for attribute
lookup, allocation, and read failures by returning NULL. Return ERR_PTR()
with the original error instead.

The reparse parser can then propagate allocation and I/O errors without
treating them as filesystem corruption.

Signed-off-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: fix resource leak in ntfs_new_attr_flags</title>
<updated>2026-08-20T11:05:48+00:00</updated>
<author>
<name>Hongling Zeng</name>
<email>zenghongling@kylinos.cn</email>
</author>
<published>2026-08-20T08:14:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9969d58a9b0417393d033b24c670d57b686cabbf'/>
<id>urn:sha1:9969d58a9b0417393d033b24c670d57b686cabbf</id>
<content type='text'>
When handling resident attributes that don't need sparse/compressed
changes, ntfs_new_attr_flags() returns 0 directly at line 678 without
calling unmap_mft_record() or ntfs_attr_put_search_ctx(). This leaks
the MFT record mapping and attribute search context.

An unprivileged user can cause a denial of service by repeatedly
calling setxattr(2) with system.ntfs_attrib on files with resident
attributes, eventually exhausting kernel memory.

Fix by replacing the direct return with goto err_out to ensure proper
cleanup of resources via the existing cleanup code.

Fixes: e791930240a5 ("ntfs: fix resident conversion in ntfs_new_attr_flags")
Cc: stable@vger.kernel.org
Signed-off-by: Hongling Zeng &lt;zenghongling@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: do not update ctime when setxattr fails</title>
<updated>2026-08-19T10:12:02+00:00</updated>
<author>
<name>Baolin Liu</name>
<email>liubaolin@kylinos.cn</email>
</author>
<published>2026-08-18T08:27:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=60038154b40e03fdfade1eb975f0305c4c887d5e'/>
<id>urn:sha1:60038154b40e03fdfade1eb975f0305c4c887d5e</id>
<content type='text'>
ntfs_setxattr() updates ctime and marks the inode dirty even when
the operation fails. A failed setxattr(2) must not change file
metadata.

Update ctime only on success.

Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations")
Signed-off-by: Baolin Liu &lt;liubaolin@kylinos.cn&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: reject unprivileged writes to reserved $LX* xattrs</title>
<updated>2026-08-19T09:16:45+00:00</updated>
<author>
<name>Pisit Preechapramoth</name>
<email>kml.delusion501@slmail.me</email>
</author>
<published>2026-07-28T12:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ea6a67ef64451d2da298f15baa35865b4bb6372a'/>
<id>urn:sha1:ea6a67ef64451d2da298f15baa35865b4bb6372a</id>
<content type='text'>
Reject setxattr of the reserved $LXUID, $LXGID, $LXMOD and $LXDEV names
from userspace unless the caller has CAP_SYS_ADMIN.

Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations")
Signed-off-by: Pisit Preechapramoth &lt;kml.delusion501@slmail.me&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
</feed>
