================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline] BUG: KASAN: use-after-free in __refcount_add include/linux/refcount.h:193 [inline] BUG: KASAN: use-after-free in __refcount_inc include/linux/refcount.h:250 [inline] BUG: KASAN: use-after-free in refcount_inc include/linux/refcount.h:267 [inline] BUG: KASAN: use-after-free in sock_hold include/net/sock.h:712 [inline] BUG: KASAN: use-after-free in sco_sock_timeout+0x63/0x240 net/bluetooth/sco.c:89 Write of size 4 at addr ffff8880271c8080 by task kworker/0:10/4129 CPU: 0 PID: 4129 Comm: kworker/0:10 Not tainted 5.17.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events sco_sock_timeout Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x3a0 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:459 kasan_check_range+0x2b5/0x2f0 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline] __refcount_add include/linux/refcount.h:193 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] sock_hold include/net/sock.h:712 [inline] sco_sock_timeout+0x63/0x240 net/bluetooth/sco.c:89 process_one_work+0x86c/0x1190 kernel/workqueue.c:2307 worker_thread+0xab1/0x1300 kernel/workqueue.c:2454 kthread+0x2a3/0x2d0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 Allocated by task 10956: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:270 [inline] __kmalloc+0x253/0x380 mm/slub.c:4424 kmalloc include/linux/slab.h:586 [inline] sk_prot_alloc+0xf4/0x230 net/core/sock.c:1923 sk_alloc+0x36/0x340 net/core/sock.c:1976 sco_sock_alloc net/bluetooth/sco.c:483 [inline] sco_sock_create+0xb0/0x450 net/bluetooth/sco.c:522 bt_sock_create+0x15b/0x220 net/bluetooth/af_bluetooth.c:130 __sock_create+0x580/0x8d0 net/socket.c:1468 sock_create net/socket.c:1519 [inline] __sys_socket+0x133/0x380 net/socket.c:1561 __do_sys_socket net/socket.c:1570 [inline] __se_sys_socket net/socket.c:1568 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1568 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+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3026 [inline] call_rcu+0x1c4/0xa70 kernel/rcu/tree.c:3106 netlink_release+0x132f/0x17a0 net/netlink/af_netlink.c:813 __sock_release net/socket.c:650 [inline] sock_close+0xd8/0x260 net/socket.c:1318 __fput+0x3fc/0x870 fs/file_table.c:317 task_work_run+0x146/0x1c0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x209/0x220 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x2e/0x70 kernel/entry/common.c:300 do_syscall_64+0x53/0xd0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:348 kvfree_call_rcu+0x119/0x880 kernel/rcu/tree.c:3591 drop_sysctl_table+0x2cd/0x400 fs/proc/proc_sysctl.c:1705 unregister_sysctl_table+0x86/0x130 fs/proc/proc_sysctl.c:1743 __devinet_sysctl_unregister net/ipv4/devinet.c:2604 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2632 [inline] inetdev_destroy net/ipv4/devinet.c:326 [inline] inetdev_event+0x71d/0x1410 net/ipv4/devinet.c:1600 notifier_call_chain kernel/notifier.c:84 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:392 call_netdevice_notifiers_info net/core/dev.c:1919 [inline] call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] unregister_netdevice_many+0xfae/0x19e0 net/core/dev.c:10415 ip6gre_exit_batch_net+0x455/0x4a0 net/ipv6/ip6_gre.c:1632 ops_exit_list net/core/net_namespace.c:173 [inline] cleanup_net+0x80c/0xc70 net/core/net_namespace.c:597 process_one_work+0x86c/0x1190 kernel/workqueue.c:2307 worker_thread+0xab1/0x1300 kernel/workqueue.c:2454 kthread+0x2a3/0x2d0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff8880271c8000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 128 bytes inside of 2048-byte region [ffff8880271c8000, ffff8880271c8800) The buggy address belongs to the page: page:ffffea00009c7200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880271cc000 pfn:0x271c8 head:ffffea00009c7200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001eb2608 ffffea0000a42208 ffff888011442000 raw: ffff8880271cc000 0000000000080003 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3631, ts 133243632014, free_ts 0 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0x729/0x9e0 mm/page_alloc.c:4165 __alloc_pages+0x255/0x580 mm/page_alloc.c:5389 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0xce/0x3f0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x3fe/0xc30 mm/slub.c:3018 __slab_alloc mm/slub.c:3105 [inline] slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc_trace+0x28c/0x330 mm/slub.c:3255 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:714 [inline] ipv6_add_dev+0xce/0x10c0 net/ipv6/addrconf.c:385 addrconf_notify+0x6a6/0x2110 net/ipv6/addrconf.c:3523 notifier_call_chain kernel/notifier.c:84 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:392 call_netdevice_notifiers_info net/core/dev.c:1919 [inline] call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] register_netdevice+0x15fd/0x1c00 net/core/dev.c:9698 register_vlan_dev+0x361/0x7c0 net/8021q/vlan.c:179 vlan_newlink+0x460/0x5a0 net/8021q/vlan_netlink.c:188 __rtnl_newlink net/core/rtnetlink.c:3483 [inline] rtnl_newlink+0x14db/0x1d80 net/core/rtnetlink.c:3531 rtnetlink_rcv_msg+0x96f/0xec0 net/core/rtnetlink.c:5596 netlink_rcv_skb+0x200/0x470 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x81a/0x9f0 net/netlink/af_netlink.c:1343 netlink_sendmsg+0xaec/0xe60 net/netlink/af_netlink.c:1919 page_owner free stack trace missing Memory state around the buggy address: ffff8880271c7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880271c8000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880271c8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880271c8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880271c8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================