<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ntfs3/attrlist.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-03-04T12:21:27Z</updated>
<entry>
<title>fs: ntfs3: fix infinite loop triggered by zero-sized ATTR_LIST</title>
<updated>2026-03-04T12:21:27Z</updated>
<author>
<name>Jaehun Gou</name>
</author>
<published>2025-12-02T11:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ef219656febf5ae06ae56b1fce47ebd05f92b68'/>
<id>urn:sha1:7ef219656febf5ae06ae56b1fce47ebd05f92b68</id>
<content type='text'>
[ Upstream commit 06909b2549d631a47fcda249d34be26f7ca1711d ]

We found an infinite loop bug in the ntfs3 file system that can lead to a
Denial-of-Service (DoS) condition.

A malformed NTFS image can cause an infinite loop when an ATTR_LIST attribute
indicates a zero data size while the driver allocates memory for it.

When ntfs_load_attr_list() processes a resident ATTR_LIST with data_size set
to zero, it still allocates memory because of al_aligned(0). This creates an
inconsistent state where ni-&gt;attr_list.size is zero, but ni-&gt;attr_list.le is
non-null. This causes ni_enum_attr_ex to incorrectly assume that no attribute
list exists and enumerates only the primary MFT record. When it finds
ATTR_LIST, the code reloads it and restarts the enumeration, repeating
indefinitely. The mount operation never completes, hanging the kernel thread.

This patch adds validation to ensure that data_size is non-zero before memory
allocation. When a zero-sized ATTR_LIST is detected, the function returns
-EINVAL, preventing a DoS vulnerability.

Co-developed-by: Seunghun Han &lt;kkamagui@gmail.com&gt;
Signed-off-by: Seunghun Han &lt;kkamagui@gmail.com&gt;
Co-developed-by: Jihoon Kwon &lt;kjh010315@gmail.com&gt;
Signed-off-by: Jihoon Kwon &lt;kjh010315@gmail.com&gt;
Signed-off-by: Jaehun Gou &lt;p22gone@gmail.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: Remove unused al_delete_le</title>
<updated>2024-10-01T09:19:05Z</updated>
<author>
<name>Dr. David Alan Gilbert</name>
</author>
<published>2024-09-13T20:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bdd6baf7408c69d403365d156447a22982d45430'/>
<id>urn:sha1:bdd6baf7408c69d403365d156447a22982d45430</id>
<content type='text'>
'al_delete_le' was added by:
Commit be71b5cba2e6 ("fs/ntfs3: Add attrib operations")

but has remained unused; there is an al_remove_le which seems
to be being used instead.

Remove 'al_delete_le'.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Use kvfree to free memory allocated by kvmalloc</title>
<updated>2024-01-16T08:31:56Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2024-01-16T07:32:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ddb17dc880eeaac37b5a6e984de07b882de7d78d'/>
<id>urn:sha1:ddb17dc880eeaac37b5a6e984de07b882de7d78d</id>
<content type='text'>
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Disable ATTR_LIST_ENTRY size check</title>
<updated>2023-12-21T11:25:40Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2023-12-21T10:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4cdfb6e7bc9c80142d33bf1d4653a73fa678ba56'/>
<id>urn:sha1:4cdfb6e7bc9c80142d33bf1d4653a73fa678ba56</id>
<content type='text'>
The use of sizeof(struct ATTR_LIST_ENTRY) has been replaced with le_size(0)
due to alignment peculiarities on different platforms.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202312071005.g6YrbaIe-lkp@intel.com/
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Use kvmalloc instead of kmalloc(... __GFP_NOWARN)</title>
<updated>2023-09-28T12:03:56Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2023-06-30T12:12:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc471e39e38fea6677017cbdd6d928088a59fc67'/>
<id>urn:sha1:fc471e39e38fea6677017cbdd6d928088a59fc67</id>
<content type='text'>
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Code refactoring</title>
<updated>2023-07-02T20:21:27Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2023-05-08T08:59:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a81f47c4406e372ce47aff140f3876babac5f01e'/>
<id>urn:sha1:a81f47c4406e372ce47aff140f3876babac5f01e</id>
<content type='text'>
Check functions arguments. Use u8 instead of size_t for ntfs names, more consts and other.

Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_load_attr_list()</title>
<updated>2023-07-02T20:21:23Z</updated>
<author>
<name>Tetsuo Handa</name>
</author>
<published>2023-03-28T11:05:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea303f72d70ce2f0b0aa94ab127085289768c5a6'/>
<id>urn:sha1:ea303f72d70ce2f0b0aa94ab127085289768c5a6</id>
<content type='text'>
syzbot is reporting too large allocation at ntfs_load_attr_list(), for
a crafted filesystem can have huge data_size.

Reported-by: syzbot &lt;syzbot+89dbb3a789a5b9711793@syzkaller.appspotmail.com&gt;
Link: https://syzkaller.appspot.com/bug?extid=89dbb3a789a5b9711793
Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Validate data run offset</title>
<updated>2022-09-30T14:39:49Z</updated>
<author>
<name>Edward Lo</name>
</author>
<published>2022-08-05T16:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6db620863f8528ed9a9aa5ad323b26554a17881d'/>
<id>urn:sha1:6db620863f8528ed9a9aa5ad323b26554a17881d</id>
<content type='text'>
This adds sanity checks for data run offset. We should make sure data
run offset is legit before trying to unpack them, otherwise we may
encounter use-after-free or some unexpected memory access behaviors.

[   82.940342] BUG: KASAN: use-after-free in run_unpack+0x2e3/0x570
[   82.941180] Read of size 1 at addr ffff888008a8487f by task mount/240
[   82.941670]
[   82.942069] CPU: 0 PID: 240 Comm: mount Not tainted 5.19.0+ #15
[   82.942482] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[   82.943720] Call Trace:
[   82.944204]  &lt;TASK&gt;
[   82.944471]  dump_stack_lvl+0x49/0x63
[   82.944908]  print_report.cold+0xf5/0x67b
[   82.945141]  ? __wait_on_bit+0x106/0x120
[   82.945750]  ? run_unpack+0x2e3/0x570
[   82.946626]  kasan_report+0xa7/0x120
[   82.947046]  ? run_unpack+0x2e3/0x570
[   82.947280]  __asan_load1+0x51/0x60
[   82.947483]  run_unpack+0x2e3/0x570
[   82.947709]  ? memcpy+0x4e/0x70
[   82.947927]  ? run_pack+0x7a0/0x7a0
[   82.948158]  run_unpack_ex+0xad/0x3f0
[   82.948399]  ? mi_enum_attr+0x14a/0x200
[   82.948717]  ? run_unpack+0x570/0x570
[   82.949072]  ? ni_enum_attr_ex+0x1b2/0x1c0
[   82.949332]  ? ni_fname_type.part.0+0xd0/0xd0
[   82.949611]  ? mi_read+0x262/0x2c0
[   82.949970]  ? ntfs_cmp_names_cpu+0x125/0x180
[   82.950249]  ntfs_iget5+0x632/0x1870
[   82.950621]  ? ntfs_get_block_bmap+0x70/0x70
[   82.951192]  ? evict+0x223/0x280
[   82.951525]  ? iput.part.0+0x286/0x320
[   82.951969]  ntfs_fill_super+0x1321/0x1e20
[   82.952436]  ? put_ntfs+0x1d0/0x1d0
[   82.952822]  ? vsprintf+0x20/0x20
[   82.953188]  ? mutex_unlock+0x81/0xd0
[   82.953379]  ? set_blocksize+0x95/0x150
[   82.954001]  get_tree_bdev+0x232/0x370
[   82.954438]  ? put_ntfs+0x1d0/0x1d0
[   82.954700]  ntfs_fs_get_tree+0x15/0x20
[   82.955049]  vfs_get_tree+0x4c/0x130
[   82.955292]  path_mount+0x645/0xfd0
[   82.955615]  ? putname+0x80/0xa0
[   82.955955]  ? finish_automount+0x2e0/0x2e0
[   82.956310]  ? kmem_cache_free+0x110/0x390
[   82.956723]  ? putname+0x80/0xa0
[   82.957023]  do_mount+0xd6/0xf0
[   82.957411]  ? path_mount+0xfd0/0xfd0
[   82.957638]  ? __kasan_check_write+0x14/0x20
[   82.957948]  __x64_sys_mount+0xca/0x110
[   82.958310]  do_syscall_64+0x3b/0x90
[   82.958719]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[   82.959341] RIP: 0033:0x7fd0d1ce948a
[   82.960193] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008
[   82.961532] RSP: 002b:00007ffe59ff69a8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
[   82.962527] RAX: ffffffffffffffda RBX: 0000564dcc107060 RCX: 00007fd0d1ce948a
[   82.963266] RDX: 0000564dcc107260 RSI: 0000564dcc1072e0 RDI: 0000564dcc10fce0
[   82.963686] RBP: 0000000000000000 R08: 0000564dcc107280 R09: 0000000000000020
[   82.964272] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000564dcc10fce0
[   82.964785] R13: 0000564dcc107260 R14: 0000000000000000 R15: 00000000ffffffff

Signed-off-by: Edward Lo &lt;edward.lo@ambergroup.io&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Add sync flag to ntfs_sb_write_run and al_update</title>
<updated>2021-09-21T15:37:01Z</updated>
<author>
<name>Konstantin Komarov</name>
</author>
<published>2021-09-09T10:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6354467245ff8dd04b54e39790f2ee4d21d5419e'/>
<id>urn:sha1:6354467245ff8dd04b54e39790f2ee4d21d5419e</id>
<content type='text'>
This allows to wait only when it's requested.
It speeds up creation of hardlinks.

Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Remove unneeded header files from c files</title>
<updated>2021-09-13T16:41:46Z</updated>
<author>
<name>Kari Argillander</name>
</author>
<published>2021-09-02T16:15:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c2aadd0fdf88a7ebeebd1e97a9c66b07ad3e14a'/>
<id>urn:sha1:9c2aadd0fdf88a7ebeebd1e97a9c66b07ad3e14a</id>
<content type='text'>
We have lot of unnecessary headers in these files. Remove them so that
we help compiler a little bit.

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