loop3: detected capacity change from 0 to 4096 ntfs3: loop3: Different NTFS sector size (2048) and media sector size (512). ntfs3: loop3: Mark volume as dirty due to NTFS errors ================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_write_bh+0x6b9/0x6e0 fs/ntfs3/fsntfs.c:1401 Read of size 8 at addr ffff8880817c2000 by task syz-executor.3/24920 CPU: 1 PID: 24920 Comm: syz-executor.3 Not tainted 6.6.0-rc1-syzkaller-00033-g3669558bdf35 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 ntfs_write_bh+0x6b9/0x6e0 fs/ntfs3/fsntfs.c:1401 mi_write+0xc0/0x1e0 fs/ntfs3/record.c:346 ni_write_inode+0x102c/0x2810 fs/ntfs3/frecord.c:3360 write_inode fs/fs-writeback.c:1456 [inline] __writeback_single_inode+0xa81/0xe70 fs/fs-writeback.c:1668 writeback_single_inode+0x2af/0x590 fs/fs-writeback.c:1724 sync_inode_metadata+0xa5/0xe0 fs/fs-writeback.c:2786 ntfs_set_state+0x3f0/0x6e0 fs/ntfs3/fsntfs.c:995 run_unpack_ex+0x391/0x520 fs/ntfs3/run.c:1095 ntfs_read_mft fs/ntfs3/inode.c:400 [inline] ntfs_iget5+0xd75/0x3960 fs/ntfs3/inode.c:532 ntfs_fill_super+0x2feb/0x4330 fs/ntfs3/super.c:1350 get_tree_bdev+0x3b5/0x650 fs/super.c:1577 vfs_get_tree+0x8c/0x370 fs/super.c:1750 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1f1327e1ea Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1f11dfdee8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1f11dfdf80 RCX: 00007f1f1327e1ea RDX: 0000000020000180 RSI: 0000000020000000 RDI: 00007f1f11dfdf40 RBP: 0000000020000180 R08: 00007f1f11dfdf80 R09: 0000000001004018 R10: 0000000001004018 R11: 0000000000000202 R12: 0000000020000000 R13: 00007f1f11dfdf40 R14: 000000000001f410 R15: 00000000200000c0 Allocated by task 15429: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slab.c:3237 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc+0x15e/0x400 mm/slab.c:3432 kmem_cache_zalloc include/linux/slab.h:710 [inline] __kernfs_new_node+0xd3/0x8a0 fs/kernfs/dir.c:615 kernfs_new_node+0x94/0x110 fs/kernfs/dir.c:679 __kernfs_create_file+0x53/0x340 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x1ff/0x3b0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x31c/0xb40 fs/sysfs/group.c:152 br_sysfs_addbr+0x2a/0x180 net/bridge/br_sysfs_br.c:1049 br_device_event+0x4e1/0x920 net/bridge/br.c:46 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1970 call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] register_netdevice+0xf84/0x1490 net/core/dev.c:10169 br_dev_newlink+0x27/0x110 net/bridge/br_netlink.c:1552 rtnl_newlink_create net/core/rtnetlink.c:3485 [inline] __rtnl_newlink+0x1177/0x1940 net/core/rtnetlink.c:3705 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3718 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6444 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:753 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2541 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2595 __sys_sendmsg+0x117/0x1e0 net/socket.c:2624 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880817c2040 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 64 bytes to the left of allocated 168-byte region [ffff8880817c2040, ffff8880817c20e8) The buggy address belongs to the physical page: page:ffffea000205f080 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x817c2 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x11() raw: 00fff00000000800 ffff88801825e400 ffffea0000699ed0 ffffea0000e36a50 raw: 0000000000000000 ffff8880817c2040 0000000100000011 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 15119, tgid 15117 (syz-executor.5), ts 1860651307453, free_ts 1854238087849 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x294/0x3a0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3182 [inline] slab_alloc_node mm/slab.c:3230 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc+0x3a6/0x400 mm/slab.c:3432 kmem_cache_zalloc include/linux/slab.h:710 [inline] __kernfs_new_node+0xd3/0x8a0 fs/kernfs/dir.c:615 kernfs_new_node+0x94/0x110 fs/kernfs/dir.c:679 __kernfs_create_file+0x53/0x340 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x1ff/0x3b0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x31c/0xb40 fs/sysfs/group.c:152 netdev_queue_add_kobject net/core/net-sysfs.c:1701 [inline] netdev_queue_update_kobjects+0x236/0x520 net/core/net-sysfs.c:1747 register_queue_kobjects net/core/net-sysfs.c:1808 [inline] netdev_register_kobject+0x297/0x3f0 net/core/net-sysfs.c:2048 register_netdevice+0xbcb/0x1490 net/core/dev.c:10136 register_netdev+0x2f/0x50 net/core/dev.c:10266 ip6_tnl_init_net+0x26e/0x450 net/ipv6/ip6_tunnel.c:2255 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:427 apply_to_pte_range mm/memory.c:2586 [inline] apply_to_pmd_range mm/memory.c:2630 [inline] apply_to_pud_range mm/memory.c:2666 [inline] apply_to_p4d_range mm/memory.c:2702 [inline] __apply_to_page_range+0x5ed/0xdb0 mm/memory.c:2736 kasan_release_vmalloc+0xa8/0xc0 mm/kasan/shadow.c:544 __purge_vmap_area_lazy+0x8b9/0x2160 mm/vmalloc.c:1770 drain_vmap_area_work+0x54/0xd0 mm/vmalloc.c:1804 process_one_work+0x887/0x15d0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784 kthread+0x33a/0x430 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff8880817c1f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880817c1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880817c2000: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff8880817c2080: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff8880817c2100: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ==================================================================