================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x1b1/0x1d0 lib/list_debug.c:62 Read of size 8 at addr ffff888025a0eb38 by task syz-executor/5923 CPU: 3 UID: 0 PID: 5923 Comm: syz-executor Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1e0 mm/kasan/report.c:595 __list_del_entry_valid_or_report+0x1b1/0x1d0 lib/list_debug.c:62 __list_del_entry_valid include/linux/list.h:132 [inline] __list_del_entry include/linux/list.h:223 [inline] list_del_init include/linux/list.h:295 [inline] trace_transfers fs/pnode.c:132 [inline] bulk_make_private+0xd8/0x720 fs/pnode.c:168 umount_tree+0x3fb/0xec0 fs/namespace.c:1786 put_mnt_ns+0x267/0x300 fs/namespace.c:6230 nsproxy_free kernel/nsproxy.c:65 [inline] deactivate_nsproxy kernel/nsproxy.c:79 [inline] put_nsproxy include/linux/nsproxy.h:110 [inline] put_nsproxy include/linux/nsproxy.h:107 [inline] switch_task_namespaces+0x133/0x2c0 kernel/nsproxy.c:252 do_exit+0x824/0x2a90 kernel/exit.c:970 do_group_exit+0xd5/0x2a0 kernel/exit.c:1112 get_signal+0x1ec7/0x21e0 kernel/signal.c:3034 arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x4a0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x67c/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff9cbb5c84e Code: Unable to access opcode bytes at 0x7ff9cbb5c824. RSP: 002b:00007ffc800245f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: fffffffffffffe00 RBX: 000055555ec93500 RCX: 00007ff9cbb5c84e RDX: 0000000000000030 RSI: 00007ffc800246f0 RDI: 00000000000000f9 RBP: 00007ffc8002469c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000258 R13: 00000000000927c0 R14: 000000000002846e R15: 00007ffc800246f0 Allocated by task 14144: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4459 [inline] slab_alloc_node mm/slub.c:4788 [inline] kmem_cache_alloc_noprof+0x241/0x6e0 mm/slub.c:4795 alloc_vfsmnt+0x23/0x6a0 fs/namespace.c:287 clone_mnt+0x4b/0x930 fs/namespace.c:1246 clone_private_mount+0x3aa/0x4f0 fs/namespace.c:2392 ovl_get_upper fs/overlayfs/super.c:528 [inline] ovl_fill_super_creds fs/overlayfs/super.c:1439 [inline] ovl_fill_super+0x920/0x5db0 fs/overlayfs/super.c:1567 vfs_get_super fs/super.c:1327 [inline] get_tree_nodev+0xdd/0x190 fs/super.c:1346 vfs_get_tree+0x92/0x320 fs/super.c:1754 fc_mount fs/namespace.c:1193 [inline] do_new_mount_fc fs/namespace.c:3760 [inline] do_new_mount fs/namespace.c:3836 [inline] path_mount+0x7d0/0x23d0 fs/namespace.c:4146 do_mount fs/namespace.c:4159 [inline] __do_sys_mount fs/namespace.c:4348 [inline] __se_sys_mount fs/namespace.c:4325 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4325 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 0: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2670 [inline] slab_free mm/slub.c:6082 [inline] kmem_cache_free+0x124/0x6a0 mm/slub.c:6212 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2869 handle_softirqs+0x1eb/0x9e0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xef/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 Last potentially related work creation: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556 __call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3131 task_work_run+0x150/0x240 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0x100/0x4a0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x67c/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Second to last potentially related work creation: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556 task_work_add+0x28b/0x3b0 kernel/task_work.c:70 mntput_no_expire_slowpath+0x3da/0xb00 fs/namespace.c:1379 mntput_no_expire+0x1fd/0x220 fs/namespace.c:1406 mntput fs/namespace.c:1416 [inline] kern_unmount_array+0x145/0x1d0 fs/namespace.c:6267 ovl_free_fs+0x30b/0x790 fs/overlayfs/params.c:839 ovl_put_super+0x6e/0xa0 fs/overlayfs/super.c:230 generic_shutdown_super+0x167/0x360 fs/super.c:646 kill_anon_super+0x3a/0x60 fs/super.c:1292 deactivate_locked_super+0xc1/0x1b0 fs/super.c:476 deactivate_super fs/super.c:509 [inline] deactivate_super+0xe7/0x110 fs/super.c:505 cleanup_mnt+0x21f/0x450 fs/namespace.c:1312 task_work_run+0x150/0x240 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0x100/0x4a0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x67c/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888025a0ea80 which belongs to the cache mnt_cache of size 352 The buggy address is located 184 bytes inside of freed 352-byte region [ffff888025a0ea80, ffff888025a0ebe0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888025a0e1c0 pfn:0x25a0e head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025a0e171 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801d6b0000 ffff88801d2e0dc8 ffffea0000898290 raw: ffff888025a0e1c0 000001c000120009 00000000f5000000 ffff888025a0e171 head: 00fff00000000240 ffff88801d6b0000 ffff88801d2e0dc8 ffffea0000898290 head: ffff888025a0e1c0 000001c000120009 00000000f5000000 ffff888025a0e171 head: 00fff00000000001 ffffea0000968381 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5927, tgid 5927 (syz-executor), ts 55127441541, free_ts 55055214156 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1888 prep_new_page mm/page_alloc.c:1896 [inline] get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3961 __alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5249 alloc_slab_page mm/slub.c:3238 [inline] allocate_slab mm/slub.c:3411 [inline] new_slab+0xa6/0x6e0 mm/slub.c:3469 refill_objects+0x26b/0x400 mm/slub.c:7091 refill_sheaf mm/slub.c:2787 [inline] alloc_full_sheaf mm/slub.c:2808 [inline] __pcs_replace_empty_main+0x19f/0x600 mm/slub.c:4546 alloc_from_pcs mm/slub.c:4639 [inline] slab_alloc_node mm/slub.c:4773 [inline] kmem_cache_alloc_noprof+0x480/0x6e0 mm/slub.c:4795 alloc_vfsmnt+0x23/0x6a0 fs/namespace.c:287 clone_mnt+0x4b/0x930 fs/namespace.c:1246 copy_tree+0x329/0xbf0 fs/namespace.c:2194 __do_loopback+0x2fc/0x520 fs/namespace.c:2974 do_loopback fs/namespace.c:3006 [inline] path_mount+0x1967/0x23d0 fs/namespace.c:4140 do_mount fs/namespace.c:4159 [inline] __do_sys_mount fs/namespace.c:4348 [inline] __se_sys_mount fs/namespace.c:4325 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4325 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5927 tgid 5927 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1432 [inline] __free_frozen_pages+0x7ca/0x10a0 mm/page_alloc.c:2977 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xe0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4459 [inline] slab_alloc_node mm/slub.c:4788 [inline] __do_kmalloc_node mm/slub.c:5176 [inline] __kmalloc_node_track_caller_noprof+0x2ba/0x850 mm/slub.c:5285 __kmemdup_nul mm/util.c:64 [inline] kstrdup+0x51/0xe0 mm/util.c:84 kstrdup_const+0x63/0x80 mm/util.c:104 __kernfs_new_node+0x9b/0x960 fs/kernfs/dir.c:633 kernfs_new_node+0x11b/0x1a0 fs/kernfs/dir.c:718 kernfs_create_link+0xcc/0x240 fs/kernfs/symlink.c:39 sysfs_do_create_link_sd+0x90/0x140 fs/sysfs/symlink.c:44 sysfs_do_create_link fs/sysfs/symlink.c:80 [inline] sysfs_create_link+0x61/0xc0 fs/sysfs/symlink.c:92 driver_sysfs_add+0x91/0x2d0 drivers/base/dd.c:442 device_bind_driver+0x16/0x70 drivers/base/dd.c:500 mac80211_hwsim_new_radio+0x3fb/0x57d0 drivers/net/wireless/virtual/mac80211_hwsim.c:5436 hwsim_new_radio_nl+0xc1f/0x1340 drivers/net/wireless/virtual/mac80211_hwsim.c:6504 Memory state around the buggy address: ffff888025a0ea00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff888025a0ea80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888025a0eb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888025a0eb80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888025a0ec00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================