Hello,
syzbot found the following issue on:
HEAD commit: 68efe5a6c16a Linux 5.15.197
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=11a8a99a580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7e6ed99963d6ee1d
dashboard link:
https://syzkaller.appspot.com/bug?extid=068c6664d354756b7b39
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/900f9b9bd850/disk-68efe5a6.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/1e089a5019a6/vmlinux-68efe5a6.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/b319f477b907/bzImage-68efe5a6.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+068c66...@syzkaller.appspotmail.com
ntfs3: loop6: Different NTFS' sector size (2048) and media sector size (512)
==================================================================
BUG: KASAN: use-after-free in ntfs_iget5+0x14a/0x3670 fs/ntfs3/inode.c:527
Read of size 8 at addr ffff8880727b10d0 by task syz.6.206/5563
CPU: 1 PID: 5563 Comm: syz.6.206 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
ntfs_iget5+0x14a/0x3670 fs/ntfs3/inode.c:527
ntfs_fill_super+0x19a0/0x3c10 fs/ntfs3/super.c:941
get_tree_bdev+0x3f1/0x610 fs/super.c:1325
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x24a/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3562
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fb45982aeea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007fb457a8fe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fb457a8fef0 RCX: 00007fb45982aeea
RDX: 0000200000000100 RSI: 0000200000000040 RDI: 00007fb457a8feb0
RBP: 0000200000000100 R08: 00007fb457a8fef0 R09: 000000000200809e
R10: 000000000200809e R11: 0000000000000246 R12: 0000200000000040
R13: 00007fb457a8feb0 R14: 000000000001f45c R15: 0000200000000400
</TASK>
Allocated by task 5196:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
__kasan_slab_alloc+0x9c/0xd0 mm/kasan/common.c:467
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3225 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x100/0x290 mm/slub.c:3238
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2648 [inline]
f2fs_alloc_inode+0x16c/0x5d0 fs/f2fs/super.c:1396
alloc_inode fs/inode.c:261 [inline]
iget_locked+0x191/0x820 fs/inode.c:1308
f2fs_iget+0x52/0x4a50 fs/f2fs/inode.c:505
f2fs_fill_super+0x4925/0x6f00 fs/f2fs/super.c:4294
mount_bdev+0x287/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x24a/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3562
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3011 [inline]
call_rcu+0x182/0x930 kernel/rcu/tree.c:3091
destroy_inode fs/inode.c:316 [inline]
evict+0x7da/0x870 fs/inode.c:662
dispose_list fs/inode.c:680 [inline]
evict_inodes+0x604/0x690 fs/inode.c:734
generic_shutdown_super+0x93/0x300 fs/super.c:454
kill_block_super+0x7c/0xe0 fs/super.c:1427
kill_f2fs_super+0x2ed/0x3a0 fs/f2fs/super.c:4565
deactivate_locked_super+0x93/0xf0 fs/super.c:335
cleanup_mnt+0x418/0x4d0 fs/namespace.c:1148
task_work_run+0x125/0x1a0 kernel/task_work.c:188
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Second to last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3011 [inline]
call_rcu+0x182/0x930 kernel/rcu/tree.c:3091
destroy_inode fs/inode.c:316 [inline]
evict+0x7da/0x870 fs/inode.c:662
f2fs_fill_super+0x55e5/0x6f00 fs/f2fs/super.c:4469
mount_bdev+0x287/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x24a/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3562
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
The buggy address belongs to the object at ffff8880727b0980
which belongs to the cache f2fs_inode_cache of size 2304
The buggy address is located 1872 bytes inside of
2304-byte region [ffff8880727b0980, ffff8880727b1280)
The buggy address belongs to the page:
page:ffffea0001c9ec00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880727b4280 pfn:0x727b0
head:ffffea0001c9ec00 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff8880622a7801
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 0000000100000001 ffff888146b468c0
raw: ffff8880727b4280 00000000800d000a 00000001ffffffff ffff8880622a7801
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4776, ts 79850436921, free_ts 67133484325
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x81e/0xdf0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x195/0x290 mm/slub.c:3238
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2648 [inline]
f2fs_alloc_inode+0x16c/0x5d0 fs/f2fs/super.c:1396
alloc_inode fs/inode.c:261 [inline]
iget_locked+0x191/0x820 fs/inode.c:1308
f2fs_iget+0x52/0x4a50 fs/f2fs/inode.c:505
f2fs_fill_super+0x3c76/0x6f00 fs/f2fs/super.c:4178
mount_bdev+0x287/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x24a/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3562
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x94/0x280 mm/page_alloc.c:3396
free_slab mm/slub.c:2020 [inline]
discard_slab mm/slub.c:2026 [inline]
__unfreeze_partials+0x1a5/0x200 mm/slub.c:2512
put_cpu_partial+0x12d/0x190 mm/slub.c:2592
qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3225 [inline]
slab_alloc mm/slub.c:3233 [inline]
__kmalloc_track_caller+0x125/0x330 mm/slub.c:4930
kvasprintf+0xd4/0x180 lib/kasprintf.c:25
kobject_set_name_vargs+0x5d/0x110 lib/kobject.c:297
kobject_add_varg lib/kobject.c:392 [inline]
kobject_init_and_add+0xda/0x190 lib/kobject.c:481
netdev_queue_add_kobject net/core/net-sysfs.c:1666 [inline]
netdev_queue_update_kobjects+0x19c/0x3e0 net/core/net-sysfs.c:1711
register_queue_kobjects net/core/net-sysfs.c:1772 [inline]
netdev_register_kobject+0x265/0x310 net/core/net-sysfs.c:2018
register_netdevice+0x1019/0x16b0 net/core/dev.c:10397
tun_set_iff+0x82a/0xda0 drivers/net/tun.c:2802
Memory state around the buggy address:
ffff8880727b0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880727b1000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880727b1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880727b1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880727b1180: 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