loop2: detected capacity change from 0 to 64 ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0xa5/0xb0 lib/list_debug.c:30 Read of size 8 at addr ffff8880992285c8 by task syz-executor.2/19385 CPU: 1 PID: 19385 Comm: syz-executor.2 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x6e9 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 __list_add_valid+0xa5/0xb0 lib/list_debug.c:30 __list_add include/linux/list.h:69 [inline] list_add_tail include/linux/list.h:102 [inline] register_shrinker_prepared+0x37/0x120 mm/vmscan.c:684 sget+0x472/0x580 fs/super.c:660 mount_bdev+0xf8/0x410 fs/super.c:1371 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f69aac8cada Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 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:00007f69abe6ff88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f69aac8cada RDX: 0000000020000140 RSI: 0000000020000100 RDI: 00007f69abe6ffe0 RBP: 00007f69abe70020 R08: 00007f69abe70020 R09: 0000000020000140 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000140 R13: 0000000020000100 R14: 00007f69abe6ffe0 R15: 0000000020000380 Allocated by task 19361: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:525 kasan_kmalloc include/linux/kasan.h:234 [inline] __do_kmalloc mm/slab.c:3686 [inline] __kmalloc+0x1f9/0x4a0 mm/slab.c:3695 kmalloc include/linux/slab.h:605 [inline] kzalloc include/linux/slab.h:733 [inline] ops_init+0xfb/0x470 net/core/net_namespace.c:124 setup_net+0x5d1/0xc50 net/core/net_namespace.c:325 copy_net_ns+0x318/0x760 net/core/net_namespace.c:471 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 copy_namespaces+0x391/0x450 kernel/nsproxy.c:178 copy_process+0x307b/0x7110 kernel/fork.c:2257 kernel_clone+0xe7/0x8f0 kernel/fork.c:2672 __do_sys_clone3+0x1cd/0x2e0 kernel/fork.c:2964 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 19361: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x13d/0x1a0 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:200 [inline] __cache_free mm/slab.c:3418 [inline] kfree+0x173/0x390 mm/slab.c:3786 ops_init+0xcd/0x470 net/core/net_namespace.c:139 setup_net+0x5d1/0xc50 net/core/net_namespace.c:325 copy_net_ns+0x318/0x760 net/core/net_namespace.c:471 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 copy_namespaces+0x391/0x450 kernel/nsproxy.c:178 copy_process+0x307b/0x7110 kernel/fork.c:2257 kernel_clone+0xe7/0x8f0 kernel/fork.c:2672 __do_sys_clone3+0x1cd/0x2e0 kernel/fork.c:2964 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888099228000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1480 bytes inside of 2048-byte region [ffff888099228000, ffff888099228800) The buggy address belongs to the physical page: page:ffffea0002648a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x99228 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0002296f08 ffffea0002734b08 ffff888011840800 raw: 0000000000000000 ffff888099228000 0000000100000001 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 0x3d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE), pid 18025, tgid 18007 (syz-executor.5), ts 515255637023, free_ts 515254944294 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:243 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] slab_alloc_node mm/slab.c:3220 [inline] kmem_cache_alloc_node_trace+0x50a/0x570 mm/slab.c:3601 __do_kmalloc_node mm/slab.c:3623 [inline] __kmalloc_node_track_caller+0x38/0x60 mm/slab.c:3638 kmalloc_reserve net/core/skbuff.c:437 [inline] pskb_expand_head+0x203/0x1110 net/core/skbuff.c:1832 netlink_trim+0x1ea/0x240 net/netlink/af_netlink.c:1301 netlink_broadcast+0x5f/0xd90 net/netlink/af_netlink.c:1497 nlmsg_multicast include/net/netlink.h:1044 [inline] nlmsg_notify+0x8f/0x280 net/netlink/af_netlink.c:2583 rtnl_notify net/core/rtnetlink.c:767 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3929 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3944 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3932 [inline] rtmsg_ifinfo+0xf0/0x120 net/core/rtnetlink.c:3950 register_netdevice+0x12a4/0x1670 net/core/dev.c:10100 register_netdev+0x2d/0x50 net/core/dev.c:10179 vti6_init_net+0x449/0x860 net/ipv6/ip6_vti.c:1164 ops_init+0xaf/0x470 net/core/net_namespace.c:134 setup_net+0x5d1/0xc50 net/core/net_namespace.c:325 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 kasan_depopulate_vmalloc_pte+0x5c/0x70 mm/kasan/shadow.c:372 apply_to_pte_range mm/memory.c:2633 [inline] apply_to_pmd_range mm/memory.c:2677 [inline] apply_to_pud_range mm/memory.c:2713 [inline] apply_to_p4d_range mm/memory.c:2749 [inline] __apply_to_page_range+0x686/0x1030 mm/memory.c:2783 kasan_release_vmalloc+0xa7/0xc0 mm/kasan/shadow.c:486 __purge_vmap_area_lazy+0x885/0x1c50 mm/vmalloc.c:1753 drain_vmap_area_work+0x52/0xe0 mm/vmalloc.c:1782 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff888099228480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099228500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888099228580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888099228600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099228680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================