EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs warning (device loop0): ext4_update_dynamic_rev:1060: updating to rev 1 because of new feature flag, running e2fsck is recommended ================================================================== BUG: KASAN: slab-out-of-bounds in ext4_rename_dir_prepare+0x42e/0x4a0 fs/ext4/namei.c:3704 Read of size 4 at addr ffff88810d700e02 by task syz-executor.0/428 CPU: 0 PID: 428 Comm: syz-executor.0 Not tainted 5.10.160-syzkaller-987330-g003c389455eb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3c0 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x1a4/0x1f0 mm/kasan/report.c:436 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_rename_dir_prepare+0x42e/0x4a0 fs/ext4/namei.c:3704 ext4_cross_rename fs/ext4/namei.c:4212 [inline] ext4_rename2+0x1f37/0x45a0 fs/ext4/namei.c:4296 vfs_rename+0x95e/0xde0 fs/namei.c:4389 do_renameat2+0x83e/0x1190 fs/namei.c:4536 __do_sys_renameat2 fs/namei.c:4571 [inline] __se_sys_renameat2 fs/namei.c:4568 [inline] __x64_sys_renameat2+0xbf/0xd0 fs/namei.c:4568 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f8b04e59639 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:00007f8b049cd168 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007f8b04f79f80 RCX: 00007f8b04e59639 RDX: ffffffffffffff9c RSI: 00000000200004c0 RDI: 0000000000000003 RBP: 00007f8b04eb4ae9 R08: 0000000000000002 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff215c832f R14: 00007f8b049cd300 R15: 0000000000022000 Allocated by task 417: 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:428 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:507 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:269 [inline] __kmalloc+0x1f7/0x360 mm/slub.c:4042 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:664 [inline] __register_sysctl_table+0xee/0x1280 fs/proc/proc_sysctl.c:1314 register_net_sysctl+0x2c/0x40 net/sysctl_net.c:121 neigh_sysctl_register+0x47b/0x550 net/core/neighbour.c:3723 devinet_sysctl_register+0xaa/0x1e0 net/ipv4/devinet.c:2609 inetdev_init+0x254/0x460 net/ipv4/devinet.c:276 inetdev_event+0x202/0x1090 net/ipv4/devinet.c:1531 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x9e/0x110 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers+0x14e/0x1d0 net/core/dev.c:2080 register_netdevice+0x1404/0x1790 net/core/dev.c:10050 __ip_tunnel_create+0x2af/0x370 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x29b/0x750 net/ipv4/ip_tunnel.c:1069 ipgre_tap_init_net+0x29/0x30 net/ipv4/ip_gre.c:1693 ops_init+0x1bf/0x4a0 net/core/net_namespace.c:153 setup_net+0x21b/0xa70 net/core/net_namespace.c:351 copy_net_ns+0x317/0x520 net/core/net_namespace.c:492 create_new_namespaces+0x425/0x710 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x125/0x190 kernel/nsproxy.c:231 ksys_unshare+0x54b/0x9a0 kernel/fork.c:3019 __do_sys_unshare kernel/fork.c:3087 [inline] __se_sys_unshare kernel/fork.c:3085 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3085 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The buggy address belongs to the object at ffff88810d700800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 514 bytes to the right of 1024-byte region [ffff88810d700800, ffff88810d700c00) The buggy address belongs to the page: page:ffffea000435c000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d700 head:ffffea000435c000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff888100042f00 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 417, ts 36397413685, free_ts 36195785703 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2386 [inline] prep_new_page mm/page_alloc.c:2392 [inline] get_page_from_freelist+0x755/0x810 mm/page_alloc.c:4073 __alloc_pages_nodemask+0x3b6/0x890 mm/page_alloc.c:5160 alloc_slab_page mm/slub.c:1815 [inline] allocate_slab+0x78/0x540 mm/slub.c:1817 new_slab mm/slub.c:1878 [inline] new_slab_objects mm/slub.c:2636 [inline] ___slab_alloc+0x131/0x2e0 mm/slub.c:2800 __slab_alloc+0x63/0xa0 mm/slub.c:2840 slab_alloc_node mm/slub.c:2922 [inline] slab_alloc mm/slub.c:2964 [inline] __kmalloc+0x24f/0x360 mm/slub.c:4038 __kmalloc_node include/linux/slab.h:418 [inline] kmalloc_node include/linux/slab.h:575 [inline] kvmalloc_node+0x82/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:822 [inline] kvzalloc include/linux/mm.h:830 [inline] bucket_table_alloc lib/rhashtable.c:184 [inline] rhashtable_init+0x4f1/0x990 lib/rhashtable.c:1061 fqdir_init+0xa8/0x180 net/ipv4/inet_fragment.c:176 nf_ct_net_init+0x2f/0x330 net/ipv6/netfilter/nf_conntrack_reasm.c:500 ops_init+0x1bf/0x4a0 net/core/net_namespace.c:153 setup_net+0x21b/0xa70 net/core/net_namespace.c:351 copy_net_ns+0x317/0x520 net/core/net_namespace.c:492 create_new_namespaces+0x425/0x710 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x125/0x190 kernel/nsproxy.c:231 ksys_unshare+0x54b/0x9a0 kernel/fork.c:3019 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1332 [inline] __free_pages_ok+0x7f8/0x830 mm/page_alloc.c:1612 free_the_page mm/page_alloc.c:5221 [inline] __free_pages+0x383/0x570 mm/page_alloc.c:5228 __free_slab+0xd3/0x190 mm/slub.c:1903 free_slab mm/slub.c:1918 [inline] discard_slab mm/slub.c:1924 [inline] unfreeze_partials+0x17d/0x1b0 mm/slub.c:2419 put_cpu_partial+0xc8/0x190 mm/slub.c:2455 __slab_free+0x2d8/0x3a0 mm/slub.c:3104 do_slab_free mm/slub.c:3200 [inline] ___cache_free+0x11f/0x140 mm/slub.c:3219 qlink_free+0x38/0x40 mm/kasan/quarantine.c:146 qlist_free_all+0x4c/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:438 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook include/../mm/slab.h:583 [inline] slab_alloc_node mm/slub.c:2956 [inline] slab_alloc mm/slub.c:2964 [inline] kmem_cache_alloc+0x16c/0x300 mm/slub.c:2969 getname_flags+0xba/0x510 fs/namei.c:141 user_path_at_empty+0x2d/0x50 fs/namei.c:2728 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x116/0x3f0 fs/stat.c:193 vfs_fstatat fs/stat.c:215 [inline] __do_sys_newfstatat fs/stat.c:383 [inline] __se_sys_newfstatat+0xc8/0x780 fs/stat.c:377 Memory state around the buggy address: ffff88810d700d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810d700d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88810d700e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88810d700e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810d700f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================