ntfs3: loop5: Failed to load $Extend. ================================================================== BUG: KASAN: slab-out-of-bounds in hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 Read of size 2 at addr ffff88807a39d820 by task syz-executor.5/9130 CPU: 1 PID: 9130 Comm: syz-executor.5 Not tainted 6.1.0-rc4-syzkaller-00011-g59f2f4b8a757 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 indx_find+0x4ff/0xb20 fs/ntfs3/index.c:1085 dir_search_u+0x161/0x320 fs/ntfs3/dir.c:254 ntfs_lookup+0x112/0x1b0 fs/ntfs3/namei.c:83 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3710 do_filp_open+0x264/0x4f0 fs/namei.c:3740 do_sys_openat2+0x124/0x4e0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_open fs/open.c:1334 [inline] __se_sys_open fs/open.c:1330 [inline] __x64_sys_open+0x221/0x270 fs/open.c:1330 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f5765a8b639 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5766862168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f5765babf80 RCX: 00007f5765a8b639 RDX: 0000000000000000 RSI: 0000000000141a42 RDI: 0000000020000a40 RBP: 00007f5765ae67e1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffeb77565f R14: 00007f5766862300 R15: 0000000000022000 Allocated by task 3645: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:325 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1cc/0x300 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:702 [inline] __kernfs_new_node+0xdb/0x730 fs/kernfs/dir.c:603 kernfs_new_node+0x95/0x160 fs/kernfs/dir.c:665 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1043 sysfs_add_file_mode_ns+0x21d/0x330 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x508/0xde0 fs/sysfs/group.c:148 internal_create_groups fs/sysfs/group.c:188 [inline] sysfs_create_groups+0x5d/0x130 fs/sysfs/group.c:214 create_dir lib/kobject.c:68 [inline] kobject_add_internal+0x723/0xd10 lib/kobject.c:223 kobject_add_varg lib/kobject.c:358 [inline] kobject_init_and_add+0x104/0x160 lib/kobject.c:441 netdev_queue_add_kobject net/core/net-sysfs.c:1666 [inline] netdev_queue_update_kobjects+0x20c/0x4c0 net/core/net-sysfs.c:1718 register_queue_kobjects net/core/net-sysfs.c:1779 [inline] netdev_register_kobject+0x263/0x310 net/core/net-sysfs.c:2019 register_netdevice+0x1043/0x1790 net/core/dev.c:10057 cfg80211_register_netdevice+0x151/0x2e0 net/wireless/core.c:1397 ieee80211_if_add+0xcac/0x1930 net/mac80211/iface.c:2259 ieee80211_register_hw+0x2ccb/0x3850 net/mac80211/main.c:1396 mac80211_hwsim_new_radio+0x2201/0x3c90 drivers/net/wireless/mac80211_hwsim.c:4577 hwsim_new_radio_nl+0xc77/0x11e0 drivers/net/wireless/mac80211_hwsim.c:5170 genl_family_rcv_msg_doit net/netlink/genetlink.c:756 [inline] genl_family_rcv_msg net/netlink/genetlink.c:833 [inline] genl_rcv_msg+0xb8e/0xf20 net/netlink/genetlink.c:850 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2540 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7e7/0x9c0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x9b3/0xcd0 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] __sys_sendto+0x46e/0x5f0 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88807a39d740 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 56 bytes to the right of 168-byte region [ffff88807a39d740, ffff88807a39d7e8) The buggy address belongs to the physical page: page:ffffea0001e8e740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a39d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff8880121d5c80 raw: 0000000000000000 0000000000110011 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 3645, tgid 3645 (syz-executor.2), ts 112226819397, free_ts 112196618251 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4288 __alloc_pages+0x259/0x560 mm/page_alloc.c:5555 alloc_slab_page+0x70/0xf0 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x782/0xe20 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x24c/0x300 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:702 [inline] __kernfs_new_node+0xdb/0x730 fs/kernfs/dir.c:603 kernfs_new_node+0x95/0x160 fs/kernfs/dir.c:665 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1043 sysfs_add_file_mode_ns+0x21d/0x330 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x508/0xde0 fs/sysfs/group.c:148 internal_create_groups fs/sysfs/group.c:188 [inline] sysfs_create_groups+0x5d/0x130 fs/sysfs/group.c:214 create_dir lib/kobject.c:68 [inline] kobject_add_internal+0x723/0xd10 lib/kobject.c:223 kobject_add_varg lib/kobject.c:358 [inline] kobject_init_and_add+0x104/0x160 lib/kobject.c:441 netdev_queue_add_kobject net/core/net-sysfs.c:1666 [inline] netdev_queue_update_kobjects+0x20c/0x4c0 net/core/net-sysfs.c:1718 register_queue_kobjects net/core/net-sysfs.c:1779 [inline] netdev_register_kobject+0x263/0x310 net/core/net-sysfs.c:2019 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3483 __vunmap+0x877/0x9e0 mm/vmalloc.c:2713 free_work+0x66/0x90 mm/vmalloc.c:97 process_one_work+0x877/0xdb0 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff88807a39d700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff88807a39d780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc >ffff88807a39d800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807a39d880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff88807a39d900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================