================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3c2f/0x5470 kernel/locking/lockdep.c:4897 Read of size 8 at addr ffff888074bb1040 by task syz-executor.4/10896 CPU: 0 PID: 10896 Comm: syz-executor.4 Not tainted 5.16.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 __lock_acquire+0x3c2f/0x5470 kernel/locking/lockdep.c:4897 lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 remove_wait_queue+0x1d/0x180 kernel/sched/wait.c:55 ep_remove_wait_queue+0x88/0x1a0 fs/eventpoll.c:545 ep_unregister_pollwait fs/eventpoll.c:561 [inline] ep_free+0x18a/0x390 fs/eventpoll.c:756 ep_eventpoll_release+0x41/0x60 fs/eventpoll.c:788 __fput+0x286/0x9f0 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0xc14/0x2b40 kernel/exit.c:832 do_group_exit+0x125/0x310 kernel/exit.c:929 get_signal+0x47d/0x2220 kernel/signal.c:2852 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f455215dfe9 Code: Unable to access opcode bytes at RIP 0x7f455215dfbf. RSP: 002b:00007f4550a70168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: 000000000000002f RBX: 00007f45522711d0 RCX: 00007f455215dfe9 RDX: 000000000000002f RSI: 0000000020001340 RDI: 0000000000000004 RBP: 00007f45521b808d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeb94c559f R14: 00007f4550a70300 R15: 0000000000022000 Allocated by task 10889: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [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+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:582 [inline] psi_trigger_create.part.0+0x15e/0x7f0 kernel/sched/psi.c:1141 cgroup_pressure_write+0x17e/0x6e0 kernel/cgroup/cgroup.c:3647 cgroup_file_write+0x1de/0x760 kernel/cgroup/cgroup.c:3877 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2162 [inline] new_sync_write+0x429/0x660 fs/read_write.c:503 vfs_write+0x7cd/0xae0 fs/read_write.c:590 ksys_write+0x12d/0x250 fs/read_write.c:643 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+0x44/0xae Freed by task 10896: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x130/0x160 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:236 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1754 slab_free mm/slub.c:3509 [inline] kfree+0xcb/0x280 mm/slub.c:4562 cgroup_pressure_write+0x1b3/0x6e0 kernel/cgroup/cgroup.c:3653 cgroup_file_write+0x1de/0x760 kernel/cgroup/cgroup.c:3877 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2162 [inline] new_sync_write+0x429/0x660 fs/read_write.c:503 vfs_write+0x7cd/0xae0 fs/read_write.c:590 ksys_write+0x12d/0x250 fs/read_write.c:643 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+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1354 __queue_work+0x5ca/0xee0 kernel/workqueue.c:1520 queue_work_on+0xee/0x110 kernel/workqueue.c:1547 queue_work include/linux/workqueue.h:502 [inline] addr_event.part.0+0x326/0x4e0 drivers/infiniband/core/roce_gid_mgmt.c:853 addr_event drivers/infiniband/core/roce_gid_mgmt.c:824 [inline] inet6addr_event+0x13e/0x1b0 drivers/infiniband/core/roce_gid_mgmt.c:883 notifier_call_chain+0xb5/0x200 kernel/notifier.c:84 atomic_notifier_call_chain+0x70/0x180 kernel/notifier.c:199 addrconf_ifdown.isra.0+0xa58/0x1630 net/ipv6/addrconf.c:3841 addrconf_notify+0xeb/0x1ba0 net/ipv6/addrconf.c:3651 notifier_call_chain+0xb5/0x200 kernel/notifier.c:84 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919 call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] __dev_notify_flags+0x1da/0x2b0 net/core/dev.c:8179 dev_change_flags+0x112/0x170 net/core/dev.c:8215 do_setlink+0x96d/0x3a10 net/core/rtnetlink.c:2729 rtnl_setlink+0x24d/0x3c0 net/core/rtnetlink.c:3031 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5592 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x539/0x7e0 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 sock_write_iter+0x289/0x3c0 net/socket.c:1061 call_write_iter include/linux/fs.h:2162 [inline] do_iter_readv_writev+0x472/0x750 fs/read_write.c:725 do_iter_write+0x188/0x710 fs/read_write.c:851 vfs_writev+0x1aa/0x630 fs/read_write.c:924 do_writev+0x27f/0x300 fs/read_write.c:967 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+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2985 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3065 neigh_parms_release net/core/neighbour.c:1706 [inline] neigh_parms_release+0x205/0x290 net/core/neighbour.c:1697 addrconf_ifdown.isra.0+0x1003/0x1630 net/ipv6/addrconf.c:3871 addrconf_notify+0xeb/0x1ba0 net/ipv6/addrconf.c:3651 notifier_call_chain+0xb5/0x200 kernel/notifier.c:84 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919 call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] unregister_netdevice_many+0x964/0x1850 net/core/dev.c:10409 ip_tunnel_delete_nets+0x39f/0x5b0 net/ipv4/ip_tunnel.c:1123 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:171 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:595 process_one_work+0x9b2/0x1660 kernel/workqueue.c:2298 worker_thread+0x65d/0x1130 kernel/workqueue.c:2445 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888074bb1000 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 64 bytes inside of 192-byte region [ffff888074bb1000, ffff888074bb10c0) The buggy address belongs to the page: page:ffffea0001d2ec40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74bb1 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000001 ffff888010c41a00 raw: 0000000000000000 0000000000100010 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 7553, ts 296309279856, free_ts 296088047013 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2190 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab mm/slub.c:1944 [inline] new_slab+0x28a/0x3b0 mm/slub.c:2004 ___slab_alloc+0x87c/0xe90 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] __kmalloc_track_caller+0x2e7/0x320 mm/slub.c:4926 kmemdup+0x23/0x50 mm/util.c:128 kmemdup include/linux/fortify-string.h:304 [inline] neigh_parms_alloc+0x7e/0x580 net/core/neighbour.c:1662 ipv6_add_dev+0x30c/0x11a0 net/ipv6/addrconf.c:400 addrconf_notify+0x60e/0x1ba0 net/ipv6/addrconf.c:3510 notifier_call_chain+0xb5/0x200 kernel/notifier.c:84 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919 call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] register_netdevice+0x1073/0x1500 net/core/dev.c:9692 __ip_tunnel_create+0x398/0x5c0 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x2e4/0x9d0 net/ipv4/ip_tunnel.c:1070 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page_list+0x1a9/0xfa0 mm/page_alloc.c:3425 release_pages+0x3f4/0x1480 mm/swap.c:980 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu mm/mmu_gather.c:249 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:340 exit_mmap+0x1ea/0x630 mm/mmap.c:3172 __mmput+0x122/0x4b0 kernel/fork.c:1113 mmput+0x56/0x60 kernel/fork.c:1134 exit_mm kernel/exit.c:507 [inline] do_exit+0xb27/0x2b40 kernel/exit.c:819 do_group_exit+0x125/0x310 kernel/exit.c:929 get_signal+0x47d/0x2220 kernel/signal.c:2852 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888074bb0f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888074bb0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888074bb1000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888074bb1080: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888074bb1100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================