Hello,
syzbot found the following issue on:
HEAD commit: 67029a49db6c Merge tag 'trace-v6.18-3' of git://git.kernel..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=16033892580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=af9170887d81dea1
dashboard link:
https://syzkaller.appspot.com/bug?extid=57df10019818acd1b218
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [
almaz.ale...@paragon-software.com linux-...@vger.kernel.org nt...@lists.linux.dev]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/2814be0f1710/disk-67029a49.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/4d6927781cbd/vmlinux-67029a49.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/85a97edee876/bzImage-67029a49.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+57df10...@syzkaller.appspotmail.com
=========================[ 127.386411][ T6183] ==================================================================
BUG: KASAN: slab-use-after-free in ino_get fs/ntfs3/ntfs.h:188 [inline]
BUG: KASAN: slab-use-after-free in ntfs_set_inode+0x70/0x80 fs/ntfs3/inode.c:525
Read of size 4 at addr ffff8880315a4a38 by task syz.1.41/6183
CPU: 0 UID: 0 PID: 6183 Comm: syz.1.41 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
ino_get fs/ntfs3/ntfs.h:188 [inline]
ntfs_set_inode+0x70/0x80 fs/ntfs3/inode.c:525
inode_insert5+0x13d/0x4f0 fs/inode.c:1303
iget5_locked+0x66/0xa0 fs/inode.c:1360
ntfs_iget5+0xc1/0x37e0 fs/ntfs3/inode.c:534
ntfs_dir_emit fs/ntfs3/dir.c:337 [inline]
ntfs_read_hdr+0x7cf/0xc30 fs/ntfs3/dir.c:385
ntfs_readdir+0x5eb/0xdd0 fs/ntfs3/dir.c:458
iterate_dir+0x3a5/0x580 fs/readdir.c:108
__do_sys_getdents64 fs/readdir.c:410 [inline]
__se_sys_getdents64+0xe4/0x260 fs/readdir.c:396
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f80ef5deec9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f80ed825038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f80ef836090 RCX: 00007f80ef5deec9
RDX: 00000000000000ee RSI: 0000200000000340 RDI: 0000000000000004
RBP: 00007f80ef661f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f80ef836128 R14: 00007f80ef836090 R15: 00007ffdc4899dc8
</TASK>
Allocated by task 6164:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:400 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417
kasan_kmalloc include/linux/kasan.h:262 [inline]
__do_kmalloc_node mm/slub.c:5627 [inline]
__kmalloc_noprof+0x233/0x7d0 mm/slub.c:5639
kmalloc_noprof include/linux/slab.h:961 [inline]
mi_init+0x76/0xe0 fs/ntfs3/record.c:105
ntfs_read_mft fs/ntfs3/inode.c:54 [inline]
ntfs_iget5+0x356/0x37e0 fs/ntfs3/inode.c:541
dir_search_u+0x1df/0x2c0 fs/ntfs3/dir.c:264
ntfs_lookup+0xfb/0x1f0 fs/ntfs3/namei.c:85
lookup_one_qstr_excl+0x131/0x360 fs/namei.c:1705
filename_create+0x224/0x3c0 fs/namei.c:4227
do_mkdirat+0xa0/0x590 fs/namei.c:4478
__do_sys_mkdirat fs/namei.c:4503 [inline]
__se_sys_mkdirat fs/namei.c:4501 [inline]
__x64_sys_mkdirat+0x87/0xa0 fs/namei.c:4501
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 1336:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
__kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587
kasan_save_free_info mm/kasan/kasan.h:406 [inline]
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2523 [inline]
slab_free mm/slub.c:6611 [inline]
kfree+0x197/0x950 mm/slub.c:6818
ni_try_remove_attr_list+0xd72/0xf20 fs/ntfs3/frecord.c:-1
ni_write_inode+0xa37/0xfb0 fs/ntfs3/frecord.c:3288
write_inode fs/fs-writeback.c:1564 [inline]
__writeback_single_inode+0x6f4/0x1000 fs/fs-writeback.c:1784
writeback_sb_inodes+0x6b7/0xf60 fs/fs-writeback.c:2015
wb_writeback+0x43b/0xaf0 fs/fs-writeback.c:2195
wb_do_writeback fs/fs-writeback.c:2342 [inline]
wb_workfn+0x40e/0xf00 fs/fs-writeback.c:2382
process_one_work kernel/workqueue.c:3263 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff8880315a4800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 568 bytes inside of
freed 1024-byte region [ffff8880315a4800, ffff8880315a4c00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x315a0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x80000000000040(head|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000040 ffff88813ff26dc0 ffffea00009fc200 dead000000000002
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0080000000000040 ffff88813ff26dc0 ffffea00009fc200 dead000000000002
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0080000000000003 ffffea0000c56801 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5756, tgid 5756 (dhcpcd-run-hook), ts 73276999703, free_ts 73209189273
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
prep_new_page mm/page_alloc.c:1858 [inline]
get_page_from_freelist+0x28c0/0x2960 mm/page_alloc.c:3884
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183
alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:3039 [inline]
allocate_slab+0x96/0x3a0 mm/slub.c:3212
new_slab mm/slub.c:3266 [inline]
___slab_alloc+0xb12/0x13f0 mm/slub.c:4636
__slab_alloc+0xc6/0x1f0 mm/slub.c:4755
__slab_alloc_node mm/slub.c:4831 [inline]
slab_alloc_node mm/slub.c:5253 [inline]
__do_kmalloc_node mm/slub.c:5626 [inline]
__kmalloc_noprof+0x14b/0x7d0 mm/slub.c:5639
kmalloc_noprof include/linux/slab.h:961 [inline]
load_elf_phdrs+0x13e/0x230 fs/binfmt_elf.c:540
load_elf_binary+0x962/0x2750 fs/binfmt_elf.c:969
search_binary_handler fs/exec.c:1670 [inline]
exec_binprm fs/exec.c:1702 [inline]
bprm_execve+0x99c/0x1450 fs/exec.c:1754
do_execveat_common+0x510/0x6a0 fs/exec.c:1860
do_execve fs/exec.c:1934 [inline]
__do_sys_execve fs/exec.c:2010 [inline]
__se_sys_execve fs/exec.c:2005 [inline]
__x64_sys_execve+0x94/0xb0 fs/exec.c:2005
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5753 tgid 5753 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1394 [inline]
__free_frozen_pages+0xfb6/0x1140 mm/page_alloc.c:2906
discard_slab mm/slub.c:3310 [inline]
__put_partials+0x149/0x170 mm/slub.c:3857
__slab_free+0x29e/0x370 mm/slub.c:5906
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:352
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4955 [inline]
slab_alloc_node mm/slub.c:5265 [inline]
kmem_cache_alloc_noprof+0x181/0x6b0 mm/slub.c:5272
vm_area_alloc+0x24/0x140 mm/vma_init.c:32
do_brk_flags+0x33c/0xbb0 mm/vma.c:2802
__do_sys_brk mm/mmap.c:194 [inline]
__se_sys_brk+0x9ab/0xb80 mm/mmap.c:115
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff8880315a4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880315a4980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880315a4a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880315a4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880315a4b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup