==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: use-after-free in atomic_long_read include/linux/atomic/atomic-instrumented.h:1265 [inline]
BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0xa6/0x5e0 kernel/locking/mutex.c:916
Read of size 8 at addr ffff888077c054b8 by task syz-executor.3/10095

CPU: 0 PID: 10095 Comm: syz-executor.3 Not tainted 6.1.0-rc2-syzkaller-00070-g4dc12f37a8e9 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
 <TASK>
 __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:284 [inline]
 print_report+0x15e/0x45d mm/kasan/report.c:395
 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 atomic_long_read include/linux/atomic/atomic-instrumented.h:1265 [inline]
 __mutex_unlock_slowpath+0xa6/0x5e0 kernel/locking/mutex.c:916
 l2cap_chan_unlock include/net/bluetooth/l2cap.h:860 [inline]
 l2cap_conn_del+0x404/0x7b0 net/bluetooth/l2cap_core.c:1932
 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8221 [inline]
 l2cap_disconn_cfm+0x8c/0xc0 net/bluetooth/l2cap_core.c:8214
 hci_disconn_cfm include/net/bluetooth/hci_core.h:1787 [inline]
 hci_conn_hash_flush+0x122/0x260 net/bluetooth/hci_conn.c:2430
 hci_dev_close_sync+0x5f7/0x1200 net/bluetooth/hci_sync.c:4824
 hci_dev_do_close+0x2d/0x70 net/bluetooth/hci_core.c:554
 hci_rfkill_set_block+0x15d/0x1c0 net/bluetooth/hci_core.c:956
 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:345
 rfkill_fop_write+0x2c3/0x570 net/rfkill/core.c:1286
 do_loop_readv_writev fs/read_write.c:759 [inline]
 do_loop_readv_writev fs/read_write.c:743 [inline]
 do_iter_write+0x4ef/0x700 fs/read_write.c:863
 vfs_writev+0x1aa/0x630 fs/read_write.c:934
 do_writev+0x279/0x2f0 fs/read_write.c:977
 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
 __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203
 entry_SYSENTER_compat_after_hwframe+0x70/0x82
RIP: 0023:0xf7f18549
Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f7f135cc EFLAGS: 00000296 ORIG_RAX: 0000000000000092
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000200
RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Allocated by task 3720:
 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45
 kasan_set_track+0x21/0x30 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:371 [inline]
 ____kasan_kmalloc mm/kasan/common.c:330 [inline]
 __kasan_kmalloc+0xa1/0xb0 mm/kasan/common.c:380
 kmalloc include/linux/slab.h:576 [inline]
 kzalloc include/linux/slab.h:712 [inline]
 l2cap_chan_create+0x40/0x930 net/bluetooth/l2cap_core.c:466
 a2mp_chan_open net/bluetooth/a2mp.c:771 [inline]
 amp_mgr_create+0x8f/0x960 net/bluetooth/a2mp.c:862
 a2mp_channel_create+0x7d/0x150 net/bluetooth/a2mp.c:894
 l2cap_data_channel net/bluetooth/l2cap_core.c:7578 [inline]
 l2cap_recv_frame+0x51e5/0x9aa0 net/bluetooth/l2cap_core.c:7733
 l2cap_recv_acldata+0xaa6/0xc00 net/bluetooth/l2cap_core.c:8438
 hci_acldata_packet net/bluetooth/hci_core.c:3809 [inline]
 hci_rx_work+0x705/0x1230 net/bluetooth/hci_core.c:4044
 process_one_work+0x9bf/0x1710 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

Freed by task 10095:
 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45
 kasan_set_track+0x21/0x30 mm/kasan/common.c:52
 kasan_save_free_info+0x2a/0x40 mm/kasan/generic.c:511
 ____kasan_slab_free mm/kasan/common.c:236 [inline]
 ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1724 [inline]
 slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1750
 slab_free mm/slub.c:3661 [inline]
 __kmem_cache_free+0xab/0x3b0 mm/slub.c:3674
 l2cap_chan_destroy net/bluetooth/l2cap_core.c:509 [inline]
 kref_put include/linux/kref.h:65 [inline]
 l2cap_chan_put+0x22a/0x2d0 net/bluetooth/l2cap_core.c:533
 l2cap_conn_del+0x3fc/0x7b0 net/bluetooth/l2cap_core.c:1930
 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8221 [inline]
 l2cap_disconn_cfm+0x8c/0xc0 net/bluetooth/l2cap_core.c:8214
 hci_disconn_cfm include/net/bluetooth/hci_core.h:1787 [inline]
 hci_conn_hash_flush+0x122/0x260 net/bluetooth/hci_conn.c:2430
 hci_dev_close_sync+0x5f7/0x1200 net/bluetooth/hci_sync.c:4824
 hci_dev_do_close+0x2d/0x70 net/bluetooth/hci_core.c:554
 hci_rfkill_set_block+0x15d/0x1c0 net/bluetooth/hci_core.c:956
 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:345
 rfkill_fop_write+0x2c3/0x570 net/rfkill/core.c:1286
 do_loop_readv_writev fs/read_write.c:759 [inline]
 do_loop_readv_writev fs/read_write.c:743 [inline]
 do_iter_write+0x4ef/0x700 fs/read_write.c:863
 vfs_writev+0x1aa/0x630 fs/read_write.c:934
 do_writev+0x279/0x2f0 fs/read_write.c:977
 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
 __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203
 entry_SYSENTER_compat_after_hwframe+0x70/0x82

The buggy address belongs to the object at ffff888077c05000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1208 bytes inside of
 2048-byte region [ffff888077c05000, ffff888077c05800)

The buggy address belongs to the physical page:
page:ffffea0001df0000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888077c01000 pfn:0x77c00
head:ffffea0001df0000 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4fff00000010200(slab|head|node=1|zone=1|lastcpupid=0x7ff)
raw: 04fff00000010200 ffffea0001ce3c08 ffffea0001d73008 ffff888011842f00
raw: ffff888077c01000 0000000000080001 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5187, tgid 5184 (syz-executor.1), ts 264796525529, free_ts 264755624884
 prep_new_page mm/page_alloc.c:2538 [inline]
 get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4287
 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5554
 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2285
 alloc_slab_page mm/slub.c:1794 [inline]
 allocate_slab+0x213/0x300 mm/slub.c:1939
 new_slab mm/slub.c:1992 [inline]
 ___slab_alloc+0xa91/0x1400 mm/slub.c:3180
 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3279
 slab_alloc_node mm/slub.c:3364 [inline]
 __kmem_cache_alloc_node+0x191/0x3e0 mm/slub.c:3437
 kmalloc_trace+0x22/0x60 mm/slab_common.c:1046
 kmalloc include/linux/slab.h:576 [inline]
 kzalloc include/linux/slab.h:712 [inline]
 copy_verifier_state+0x827/0xb80 kernel/bpf/verifier.c:1211
 is_state_visited kernel/bpf/verifier.c:12061 [inline]
 do_check kernel/bpf/verifier.c:12176 [inline]
 do_check_common+0x1a22/0xcc20 kernel/bpf/verifier.c:14643
 do_check_main kernel/bpf/verifier.c:14706 [inline]
 bpf_check+0x734c/0xac10 kernel/bpf/verifier.c:15276
 bpf_prog_load+0x13cb/0x2230 kernel/bpf/syscall.c:2605
 __sys_bpf+0x1605/0x4cf0 kernel/bpf/syscall.c:4965
 __do_sys_bpf kernel/bpf/syscall.c:5069 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5067 [inline]
 __ia32_sys_bpf+0x74/0xc0 kernel/bpf/syscall.c:5067
 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
 __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1458 [inline]
 free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1508
 free_unref_page_prepare mm/page_alloc.c:3386 [inline]
 free_unref_page+0x19/0x4d0 mm/page_alloc.c:3482
 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2586
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294
 ____kasan_kmalloc mm/kasan/common.c:337 [inline]
 __kasan_krealloc+0x12e/0x180 mm/kasan/common.c:439
 kasan_krealloc include/linux/kasan.h:231 [inline]
 __do_krealloc mm/slab_common.c:1346 [inline]
 krealloc+0x54/0xf0 mm/slab_common.c:1383
 push_jmp_history kernel/bpf/verifier.c:2504 [inline]
 is_state_visited kernel/bpf/verifier.c:12040 [inline]
 do_check kernel/bpf/verifier.c:12176 [inline]
 do_check_common+0x33e4/0xcc20 kernel/bpf/verifier.c:14643
 do_check_main kernel/bpf/verifier.c:14706 [inline]
 bpf_check+0x734c/0xac10 kernel/bpf/verifier.c:15276
 bpf_prog_load+0x13cb/0x2230 kernel/bpf/syscall.c:2605
 __sys_bpf+0x1605/0x4cf0 kernel/bpf/syscall.c:4965
 __do_sys_bpf kernel/bpf/syscall.c:5069 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5067 [inline]
 __ia32_sys_bpf+0x74/0xc0 kernel/bpf/syscall.c:5067
 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
 __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203
 entry_SYSENTER_compat_after_hwframe+0x70/0x82

Memory state around the buggy address:
 ffff888077c05380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888077c05400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888077c05480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                        ^
 ffff888077c05500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888077c05580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
   0:	03 74 c0 01          	add    0x1(%rax,%rax,8),%esi
   4:	10 05 03 74 b8 01    	adc    %al,0x1b87403(%rip)        # 0x1b8740d
   a:	10 06                	adc    %al,(%rsi)
   c:	03 74 b4 01          	add    0x1(%rsp,%rsi,4),%esi
  10:	10 07                	adc    %al,(%rdi)
  12:	03 74 b0 01          	add    0x1(%rax,%rsi,4),%esi
  16:	10 08                	adc    %cl,(%rax)
  18:	03 74 d8 01          	add    0x1(%rax,%rbx,8),%esi
  1c:	00 00                	add    %al,(%rax)
  1e:	00 00                	add    %al,(%rax)
  20:	00 51 52             	add    %dl,0x52(%rcx)
  23:	55                   	push   %rbp
  24:	89 e5                	mov    %esp,%ebp
  26:	0f 34                	sysenter
  28:	cd 80                	int    $0x80
* 2a:	5d                   	pop    %rbp <-- trapping instruction
  2b:	5a                   	pop    %rdx
  2c:	59                   	pop    %rcx
  2d:	c3                   	retq
  2e:	90                   	nop
  2f:	90                   	nop
  30:	90                   	nop
  31:	90                   	nop
  32:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi
  39:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi