================================================================== BUG: KASAN: slab-out-of-bounds in ext4_search_dir+0xf2/0x1b0 fs/ext4/namei.c:1543 Read of size 1 at addr ffff88803607de54 by task syz-executor.4/20519 CPU: 1 PID: 20519 Comm: syz-executor.4 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #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+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 ext4_search_dir+0xf2/0x1b0 fs/ext4/namei.c:1543 ext4_find_inline_entry+0x4ba/0x5e0 fs/ext4/inline.c:1694 __ext4_find_entry+0x2b4/0x1b30 fs/ext4/namei.c:1616 ext4_lookup_entry fs/ext4/namei.c:1771 [inline] ext4_lookup+0x17a/0x750 fs/ext4/namei.c:1839 lookup_open fs/namei.c:3473 [inline] open_last_lookups fs/namei.c:3563 [inline] path_openat+0x11f1/0x3180 fs/namei.c:3793 do_filp_open+0x234/0x490 fs/namei.c:3823 do_sys_openat2+0x13e/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_creat fs/open.c:1513 [inline] __se_sys_creat fs/open.c:1507 [inline] __x64_sys_creat+0x123/0x160 fs/open.c:1507 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f97f387cae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f97f45fe0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f97f399bf80 RCX: 00007f97f387cae9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000080 RBP: 00007f97f38c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f97f399bf80 R15: 00007ffc931cda68 Allocated by task 5061: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1023 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [inline] fib6_info_alloc+0x2e/0xe0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x445/0x1220 net/ipv6/route.c:3749 ip6_route_add+0x26/0x120 net/ipv6/route.c:3843 addrconf_prefix_route net/ipv6/addrconf.c:2434 [inline] fixup_permanent_addr net/ipv6/addrconf.c:3537 [inline] addrconf_permanent_addr+0x7e1/0xc80 net/ipv6/addrconf.c:3561 addrconf_notify+0x9e3/0x1010 net/ipv6/addrconf.c:3633 notifier_call_chain+0x18c/0x3a0 kernel/notifier.c:93 __dev_notify_flags+0x359/0x650 dev_change_flags+0xf0/0x1a0 net/core/dev.c:8674 do_setlink+0xfb2/0x4340 net/core/rtnetlink.c:2880 __rtnl_newlink net/core/rtnetlink.c:3671 [inline] rtnl_newlink+0x17f6/0x2070 net/core/rtnetlink.c:3718 rtnetlink_rcv_msg+0x87e/0x1030 net/core/rtnetlink.c:6444 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x7dc/0x970 net/netlink/af_netlink.c:1368 netlink_sendmsg+0xa37/0xd70 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] sock_sendmsg net/socket.c:753 [inline] __sys_sendto+0x484/0x640 net/socket.c:2177 __do_sys_sendto net/socket.c:2189 [inline] __se_sys_sendto net/socket.c:2185 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2185 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88803607dc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 308 bytes to the right of allocated 288-byte region [ffff88803607dc00, ffff88803607dd20) The buggy address belongs to the physical page: page:ffffea0000d81f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88803607d000 pfn:0x3607c head:ffffea0000d81f00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012841c80 ffffea0000dbfe10 ffffea0001f7ca10 raw: ffff88803607d000 000000000010000e 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5064, tgid 5064 (syz-executor.0), ts 174754688975, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 alloc_slab_page+0x6a/0x160 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x84/0x2f0 mm/slub.c:2070 ___slab_alloc+0xc85/0x1310 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1af/0x270 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1022 [inline] __kmalloc+0xa8/0x230 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [inline] new_dir fs/proc/proc_sysctl.c:966 [inline] get_subdir fs/proc/proc_sysctl.c:1010 [inline] sysctl_mkdir_p fs/proc/proc_sysctl.c:1301 [inline] __register_sysctl_table+0xb30/0x1440 fs/proc/proc_sysctl.c:1382 mpls_dev_sysctl_register+0x1f6/0x2e0 net/mpls/af_mpls.c:1422 mpls_dev_notify+0x6a8/0x790 net/mpls/af_mpls.c:1668 notifier_call_chain+0x18c/0x3a0 kernel/notifier.c:93 call_netdevice_notifiers_info net/core/dev.c:1970 [inline] call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] dev_change_name+0x5db/0x8f0 net/core/dev.c:1244 do_setlink+0xab8/0x4340 net/core/rtnetlink.c:2853 __rtnl_newlink net/core/rtnetlink.c:3671 [inline] rtnl_newlink+0x17f6/0x2070 net/core/rtnetlink.c:3718 rtnetlink_rcv_msg+0x87e/0x1030 net/core/rtnetlink.c:6444 page_owner free stack trace missing Memory state around the buggy address: ffff88803607dd00: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff88803607dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803607de00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803607de80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803607df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================