<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ntfs3/frecord.c, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-01-08T09:16:52Z</updated>
<entry>
<title>ntfs: Do not overwrite uptodate pages</title>
<updated>2026-01-08T09:16:52Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
</author>
<published>2025-07-18T19:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=791bc3890d6fa56c9de803d601402919d189687f'/>
<id>urn:sha1:791bc3890d6fa56c9de803d601402919d189687f</id>
<content type='text'>
commit 68f6bd128e75a032432eda9d16676ed2969a1096 upstream.

When reading a compressed file, we may read several pages in addition to
the one requested.  The current code will overwrite pages in the page
cache with the data from disc which can definitely result in changes
that have been made being lost.

For example if we have four consecutie pages ABCD in the file compressed
into a single extent, on first access, we'll bring in ABCD.  Then we
write to page B.  Memory pressure results in the eviction of ACD.
When we attempt to write to page C, we will overwrite the data in page
B with the data currently on disk.

I haven't investigated the decompression code to check whether it's
OK to overwrite a clean page or whether it might be possible to see
corrupt data.  Out of an abundance of caution, decline to overwrite
uptodate pages, not just dirty pages.

Fixes: 4342306f0f0d (fs/ntfs3: Add file operations and implementation)
Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Prevent memory leaks in add sub record</title>
<updated>2025-12-18T13:03:05Z</updated>
<author>
<name>Edward Adam Davis</name>
</author>
<published>2025-11-11T11:05:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a3a5c2e93c71dcbe6ba00b87549365eb85130b6'/>
<id>urn:sha1:4a3a5c2e93c71dcbe6ba00b87549365eb85130b6</id>
<content type='text'>
[ Upstream commit ccc4e86d1c24260c18ae94541198c3711c140da6 ]

If a rb node with the same ino already exists in the rb tree, the newly
alloced mft_inode in ni_add_subrecord() will not have its memory cleaned
up, which leads to the memory leak issue reported by syzbot.

The best option to avoid this issue is to put the newly alloced mft node
when a rb node with the same ino already exists in the rb tree and return
the rb node found in the rb tree to the parent layer.

syzbot reported:
BUG: memory leak
unreferenced object 0xffff888110bef280 (size 128):
  backtrace (crc 126a088f):
    ni_add_subrecord+0x31/0x180 fs/ntfs3/frecord.c:317
    ntfs_look_free_mft+0xf0/0x790 fs/ntfs3/fsntfs.c:715

BUG: memory leak
unreferenced object 0xffff888109093400 (size 1024):
  backtrace (crc 7197c55e):
    mi_init+0x2b/0x50 fs/ntfs3/record.c:105
    mi_format_new+0x40/0x220 fs/ntfs3/record.c:422

Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
Reported-by: syzbot+3932ccb896e06f7414c9@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis &lt;eadavis@qq.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: out1 also needs to put mi</title>
<updated>2025-12-18T13:03:05Z</updated>
<author>
<name>Edward Adam Davis</name>
</author>
<published>2025-11-11T11:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=169361f0e0bca86883974441f981bb5296250415'/>
<id>urn:sha1:169361f0e0bca86883974441f981bb5296250415</id>
<content type='text'>
[ Upstream commit 4d78d1173a653acdaf7500a32b8dc530ca4ad075 ]

After ntfs_look_free_mft() executes successfully, all subsequent code
that fails to execute must put mi.

Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
Signed-off-by: Edward Adam Davis &lt;eadavis@qq.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Exclude call make_bad_inode for live nodes.</title>
<updated>2025-07-07T12:35:46Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2025-06-24T13:35:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=519b078998ce6e729f98dccf35505b4756985d11'/>
<id>urn:sha1:519b078998ce6e729f98dccf35505b4756985d11</id>
<content type='text'>
Use ntfs_inode field 'ni_bad' to mark inode as bad (if something went wrong)
and to avoid any operations

Suggested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: cancle set bad inode after removing name fails</title>
<updated>2025-06-23T17:23:04Z</updated>
<author>
<name>Edward Adam Davis</name>
</author>
<published>2025-06-18T07:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d99208b91933fd2a58ed9ed321af07dacd06ddc3'/>
<id>urn:sha1:d99208b91933fd2a58ed9ed321af07dacd06ddc3</id>
<content type='text'>
The reproducer uses a file0 on a ntfs3 file system with a corrupted i_link.
When renaming, the file0's inode is marked as a bad inode because the file
name cannot be deleted.

The underlying bug is that make_bad_inode() is called on a live inode.
In some cases it's "icache lookup finds a normal inode, d_splice_alias()
is called to attach it to dentry, while another thread decides to call
make_bad_inode() on it - that would evict it from icache, but we'd already
found it there earlier".
In some it's outright "we have an inode attached to dentry - that's how we
got it in the first place; let's call make_bad_inode() on it just for shits
and giggles".

Fixes: 78ab59fee07f ("fs/ntfs3: Rework file operations")
Reported-by: syzbot+1aa90f0eb1fc3e77d969@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=1aa90f0eb1fc3e77d969
Signed-off-by: Edward Adam Davis &lt;eadavis@qq.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: fix symlinks cannot be handled correctly</title>
<updated>2025-06-23T17:22:32Z</updated>
<author>
<name>Rong Zhang</name>
</author>
<published>2025-05-07T07:34:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8df35e16a92c002f046bc410998b89b07cfcd639'/>
<id>urn:sha1:8df35e16a92c002f046bc410998b89b07cfcd639</id>
<content type='text'>
The symlinks created in windows will be broken in linux by ntfs3,
the patch fixes it.

Signed-off-by: Rong Zhang &lt;ulin0208@gmail.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: remove ability to change compression on mounted volume</title>
<updated>2025-05-19T09:17:33Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2025-05-19T09:07:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eeb0819318cc0c30161821d429ca022dfbedc6ac'/>
<id>urn:sha1:eeb0819318cc0c30161821d429ca022dfbedc6ac</id>
<content type='text'>
Remove all the code related to changing compression on the fly because
it's not safe and not maintainable.

Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Remove unused ni_load_attr</title>
<updated>2025-03-06T16:53:27Z</updated>
<author>
<name>Dr. David Alan Gilbert</name>
</author>
<published>2025-02-19T01:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b998c4cf0166eaab5e4194d25b922e8377aee14'/>
<id>urn:sha1:1b998c4cf0166eaab5e4194d25b922e8377aee14</id>
<content type='text'>
ni_load_attr() was added in 2021 by
commit 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
but hasn't been used.

Remove it.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Update inode-&gt;i_mapping-&gt;a_ops on compression state</title>
<updated>2025-02-05T14:48:41Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2025-01-30T14:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b432163ebd15a0fb74051949cb61456d6c55ccbd'/>
<id>urn:sha1:b432163ebd15a0fb74051949cb61456d6c55ccbd</id>
<content type='text'>
Update inode-&gt;i_mapping-&gt;a_ops when the compression state changes to
ensure correct address space operations.
Clear ATTR_FLAG_SPARSED/FILE_ATTRIBUTE_SPARSE_FILE when enabling
compression to prevent flag conflicts.

v2:
Additionally, ensure that all dirty pages are flushed and concurrent access
to the page cache is blocked.

Fixes: 6b39bfaeec44 ("fs/ntfs3: Add support for the compression attribute")
Reported-by: Kun Hu &lt;huk23@m.fudan.edu.cn&gt;, Jiaji Qin &lt;jjtan24@m.fudan.edu.cn&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Unify inode corruption marking with _ntfs_bad_inode()</title>
<updated>2024-12-30T08:37:40Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2024-12-30T07:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55ad333de0f80bc0caee10c6c27196cdcf8891bb'/>
<id>urn:sha1:55ad333de0f80bc0caee10c6c27196cdcf8891bb</id>
<content type='text'>
Also reworked error handling in a couple of places.

Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
</feed>
