syzbot


KASAN: slab-out-of-bounds Write in ntfs_set_ea

Status: upstream: reported C repro on 2024/11/17 01:18
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+09cb867ecb33ece66d64@syzkaller.appspotmail.com
First crash: 487d, last: 25d
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: KASAN: slab-out-of-bounds Read in ntfs_sb_write (log)
Repro: C syz .config
  
Bug presence (2)
Date Name Commit Repro Result
2024/11/18 linux-6.1.y (ToT) b67dc5c9ade9 C [report] KASAN: slab-out-of-bounds Read in ntfs_sb_write
2024/11/18 upstream (ToT) adc218676eef C Didn't crash
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Write in ntfs_set_ea 22 2 599d 599d 0/3 auto-obsoleted due to no activity on 2024/11/04 19:09
upstream KASAN: out-of-bounds Read in ntfs_set_ea ntfs3 17 C error done 4 1184d 1186d 22/29 fixed on 2023/02/24 13:50
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2025/02/11 13:15 1h28m fix candidate upstream OK (0) job log
2025/02/06 04:17 1h30m bisect fix linux-6.1.y OK (0) job log log
2025/01/04 04:41 1h53m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3: loop0: Mark volume as dirty due to NTFS errors
ntfs3: loop0: Failed to load $Extend.
==================================================================
BUG: KASAN: slab-out-of-bounds in ntfs_set_ea+0x110d/0x13b0 fs/ntfs3/xattr.c:411
Write of size 4 at addr ffff888078effd90 by task syz.0.17/4414

CPU: 0 PID: 4414 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 ntfs_set_ea+0x110d/0x13b0 fs/ntfs3/xattr.c:411
 ntfs_setxattr+0x16b/0x840 fs/ntfs3/xattr.c:954
 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182
 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216
 vfs_setxattr+0x167/0x2e0 fs/xattr.c:309
 do_setxattr fs/xattr.c:594 [inline]
 setxattr+0x346/0x360 fs/xattr.c:617
 path_setxattr+0x147/0x290 fs/xattr.c:636
 __do_sys_lsetxattr fs/xattr.c:659 [inline]
 __se_sys_lsetxattr fs/xattr.c:655 [inline]
 __x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:655
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f9045d9c629
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffed83a2248 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 00007f9046015fa0 RCX: 00007f9045d9c629
RDX: 0000200000000000 RSI: 0000200000000080 RDI: 0000200000000300
RBP: 00007f9045e32b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000009ab7 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9046015fac R14: 00007f9046015fa0 R15: 00007f9046015fa0
 </TASK>

The buggy address belongs to the physical page:
page:ffffea0001e3bc00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78ef0
head:ffffea0001e3bc00 order:4 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010000(head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 4, migratetype Unmovable, gfp_mask 0x140d40(GFP_NOFS|__GFP_COMP|__GFP_ZERO|__GFP_HARDWALL), pid 4414, tgid 4414 (syz.0.17), ts 90975725449, free_ts 90974015045
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559
 prep_new_page mm/page_alloc.c:2566 [inline]
 get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5643
 __alloc_pages_node include/linux/gfp.h:237 [inline]
 alloc_pages_node include/linux/gfp.h:260 [inline]
 __kmalloc_large_node+0x8c/0x1e0 mm/slab_common.c:1077
 __do_kmalloc_node mm/slab_common.c:924 [inline]
 __kmalloc+0x110/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 ntfs_set_ea+0x533/0x13b0 fs/ntfs3/xattr.c:401
 ntfs_setxattr+0x16b/0x840 fs/ntfs3/xattr.c:954
 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182
 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216
 vfs_setxattr+0x167/0x2e0 fs/xattr.c:309
 do_setxattr fs/xattr.c:594 [inline]
 setxattr+0x346/0x360 fs/xattr.c:617
 path_setxattr+0x147/0x290 fs/xattr.c:636
 __do_sys_lsetxattr fs/xattr.c:659 [inline]
 __se_sys_lsetxattr fs/xattr.c:655 [inline]
 __x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:655
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1486 [inline]
 __free_pages_ok+0xb46/0xc40 mm/page_alloc.c:1742
 free_large_kmalloc+0xfd/0x190 mm/slab_common.c:913
 ntfs_set_ea+0x724/0x13b0 fs/ntfs3/xattr.c:527
 ntfs_setxattr+0x16b/0x840 fs/ntfs3/xattr.c:954
 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182
 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216
 vfs_setxattr+0x167/0x2e0 fs/xattr.c:309
 do_setxattr fs/xattr.c:594 [inline]
 setxattr+0x346/0x360 fs/xattr.c:617
 path_setxattr+0x147/0x290 fs/xattr.c:636
 __do_sys_lsetxattr fs/xattr.c:659 [inline]
 __se_sys_lsetxattr fs/xattr.c:655 [inline]
 __x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:655
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff888078effc80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff888078effd00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
>ffff888078effd80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
                         ^
 ffff888078effe00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff888078effe80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/21 22:51 linux-6.1.y 779f9571ac3e 6e7b5511 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in ntfs_set_ea
2024/11/17 06:22 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in ntfs_set_ea
2024/11/17 04:39 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in ntfs_set_ea
2024/11/17 03:48 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in ntfs_set_ea
2024/11/17 01:17 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in ntfs_set_ea
2024/11/17 03:11 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: use-after-free Write in ntfs_set_ea
2026/02/21 22:00 linux-6.1.y 779f9571ac3e 6e7b5511 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in ntfs_set_ea
2026/02/21 21:58 linux-6.1.y 779f9571ac3e 6e7b5511 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in ntfs_set_ea
* Struck through repros no longer work on HEAD.