================================================================== BUG: KASAN: use-after-free in trace_event_get_offsets_lock_acquire include/trace/events/lock.h:13 [inline] BUG: KASAN: use-after-free in perf_trace_lock_acquire+0xf8/0x4a0 include/trace/events/lock.h:13 Read of size 8 at addr ffff88808c638138 by task kworker/0:4/22789 CPU: 0 PID: 22789 Comm: kworker/0:4 Not tainted 5.15.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_timeout Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x66/0x3e0 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:459 trace_event_get_offsets_lock_acquire include/trace/events/lock.h:13 [inline] perf_trace_lock_acquire+0xf8/0x4a0 include/trace/events/lock.h:13 trace_lock_acquire+0x161/0x190 include/trace/events/lock.h:13 lock_acquire+0xa5/0x4d0 kernel/locking/lockdep.c:5596 lock_sock_nested+0x4a/0x100 net/core/sock.c:3203 l2cap_sock_teardown_cb+0x76/0x360 net/bluetooth/l2cap_sock.c:1528 l2cap_chan_del+0xaf/0x610 net/bluetooth/l2cap_core.c:622 l2cap_chan_timeout+0x12c/0x280 net/bluetooth/l2cap_core.c:436 process_one_work+0x853/0x1140 kernel/workqueue.c:2297 worker_thread+0xac1/0x1320 kernel/workqueue.c:2444 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 Allocated by task 2969: 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:434 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x24d/0x370 mm/slub.c:4400 kmalloc include/linux/slab.h:596 [inline] sk_prot_alloc+0xf4/0x230 net/core/sock.c:1839 sk_alloc+0x35/0x300 net/core/sock.c:1892 __netlink_create+0x68/0x230 net/netlink/af_netlink.c:643 netlink_create+0x368/0x4f0 net/netlink/af_netlink.c:706 __sock_create+0x580/0x8d0 net/socket.c:1464 sock_create net/socket.c:1515 [inline] __sys_socket+0x133/0x380 net/socket.c:1557 __do_sys_socket net/socket.c:1566 [inline] __se_sys_socket net/socket.c:1564 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1564 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xf1/0x130 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2987 [inline] call_rcu+0x1c4/0xa80 kernel/rcu/tree.c:3067 netlink_release+0x132d/0x1790 net/netlink/af_netlink.c:815 __sock_release net/socket.c:649 [inline] sock_close+0xd8/0x260 net/socket.c:1314 __fput+0x3fe/0x870 fs/file_table.c:280 task_work_run+0x146/0x1c0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x6ff/0x24e0 kernel/exit.c:825 do_group_exit+0x168/0x2d0 kernel/exit.c:922 __do_sys_exit_group+0x13/0x20 kernel/exit.c:933 __ia32_sys_exit_group+0x0/0x40 kernel/exit.c:931 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:931 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xf1/0x130 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2987 [inline] call_rcu+0x1c4/0xa80 kernel/rcu/tree.c:3067 netlink_release+0x132d/0x1790 net/netlink/af_netlink.c:815 __sock_release net/socket.c:649 [inline] sock_close+0xd8/0x260 net/socket.c:1314 __fput+0x3fe/0x870 fs/file_table.c:280 task_work_run+0x146/0x1c0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x6ff/0x24e0 kernel/exit.c:825 do_group_exit+0x168/0x2d0 kernel/exit.c:922 __do_sys_exit_group+0x13/0x20 kernel/exit.c:933 __ia32_sys_exit_group+0x0/0x40 kernel/exit.c:931 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:931 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88808c638000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 312 bytes inside of 2048-byte region [ffff88808c638000, ffff88808c638800) The buggy address belongs to the page: page:ffffea0002318e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88808c638000 pfn:0x8c638 head:ffffea0002318e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00023ac408 ffffea0000960c08 ffff888011042000 raw: ffff88808c638000 0000000000080007 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 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6530, ts 160307522772, free_ts 0 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0x779/0xa30 mm/page_alloc.c:4153 __alloc_pages+0x255/0x580 mm/page_alloc.c:5375 alloc_slab_page mm/slub.c:1770 [inline] allocate_slab+0xcc/0x4d0 mm/slub.c:1907 new_slab mm/slub.c:1970 [inline] ___slab_alloc+0x41e/0xc40 mm/slub.c:3001 __slab_alloc mm/slub.c:3088 [inline] slab_alloc_node mm/slub.c:3179 [inline] __kmalloc_node_track_caller+0x2d9/0x3e0 mm/slub.c:4947 kmalloc_reserve net/core/skbuff.c:355 [inline] pskb_expand_head+0x118/0x10f0 net/core/skbuff.c:1700 netlink_trim+0x17f/0x210 net/netlink/af_netlink.c:1301 netlink_broadcast_filtered+0x6c/0x1110 net/netlink/af_netlink.c:1506 netlink_broadcast net/netlink/af_netlink.c:1551 [inline] nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0x100/0x1c0 net/netlink/af_netlink.c:2553 rtnl_notify net/core/rtnetlink.c:730 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3833 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3848 [inline] rtnetlink_event+0x154/0x1b0 net/core/rtnetlink.c:5623 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:1996 [inline] call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] dev_set_mac_address+0x31d/0x470 net/core/dev.c:9022 dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:9036 do_setlink+0x86c/0x4300 net/core/rtnetlink.c:2674 __rtnl_newlink net/core/rtnetlink.c:3391 [inline] rtnl_newlink+0x170f/0x1d10 net/core/rtnetlink.c:3506 rtnetlink_rcv_msg+0x934/0xe60 net/core/rtnetlink.c:5572 page_owner free stack trace missing Memory state around the buggy address: ffff88808c638000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808c638080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808c638100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808c638180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808c638200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================