================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff8880aa4f6660 by task syz-executor.3/11645 CPU: 1 PID: 11645 Comm: syz-executor.3 Not tainted 4.14.232-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:176 spin_lock_bh include/linux/spinlock.h:322 [inline] lock_sock_nested+0x39/0x100 net/core/sock.c:2788 l2cap_sock_teardown_cb+0x93/0x650 net/bluetooth/l2cap_sock.c:1341 l2cap_chan_del+0xaf/0x950 net/bluetooth/l2cap_core.c:599 l2cap_conn_del+0x36e/0x690 net/bluetooth/l2cap_core.c:1729 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7441 [inline] l2cap_disconn_cfm+0x7c/0xb0 net/bluetooth/l2cap_core.c:7434 hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1393 hci_dev_do_close+0x535/0xca0 net/bluetooth/hci_core.c:1622 hci_unregister_dev+0x17f/0x8c0 net/bluetooth/hci_core.c:3193 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa44/0x2850 kernel/exit.c:868 do_group_exit+0x100/0x2e0 kernel/exit.c:965 get_signal+0x38d/0x1ca0 kernel/signal.c:2423 do_signal+0x7c/0x1550 arch/x86/kernel/signal.c:792 exit_to_usermode_loop+0x160/0x200 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x4665f9 RSP: 002b:00007f9017f94218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000056bf68 RCX: 00000000004665f9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000056bf68 RBP: 000000000056bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf6c R13: 00007fff64f554ff R14: 00007f9017f94300 R15: 0000000000022000 Allocated by task 14975: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3696 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] dccp_send_ack.part.0+0x75/0x2f0 net/dccp/output.c:580 dccp_send_ack+0x45/0x60 net/dccp/output.c:579 ccid2_hc_rx_packet_recv+0x104/0x170 net/dccp/ccids/ccid2.c:778 ccid_hc_rx_packet_recv net/dccp/ccid.h:185 [inline] dccp_deliver_input_to_ccids+0xd3/0x240 net/dccp/input.c:180 dccp_rcv_established net/dccp/input.c:378 [inline] dccp_rcv_established+0xdb/0x140 net/dccp/input.c:368 dccp_v6_do_rcv+0x7ff/0xa40 net/dccp/ipv6.c:611 sk_backlog_rcv include/net/sock.h:921 [inline] __sk_receive_skb+0x5b9/0x960 net/core/sock.c:511 dccp_v6_rcv+0xa70/0x1590 net/dccp/ipv6.c:780 ip6_input_finish+0x3e1/0x1580 net/ipv6/ip6_input.c:284 NF_HOOK include/linux/netfilter.h:250 [inline] ip6_input+0xb9/0x300 net/ipv6/ip6_input.c:327 dst_input include/net/dst.h:476 [inline] ip6_rcv_finish+0x23b/0x7a0 net/ipv6/ip6_input.c:71 NF_HOOK include/linux/netfilter.h:250 [inline] ipv6_rcv+0xac7/0x1b60 net/ipv6/ip6_input.c:208 __netif_receive_skb_core+0x15ee/0x2a30 net/core/dev.c:4474 __netif_receive_skb+0x27/0x1a0 net/core/dev.c:4512 process_backlog+0x218/0x6f0 net/core/dev.c:5194 napi_poll net/core/dev.c:5596 [inline] net_rx_action+0x466/0xfd0 net/core/dev.c:5662 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 Freed by task 14975: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] kfree_skb+0xe7/0x390 net/core/skbuff.c:672 dccp_v6_do_rcv+0x7d2/0xa40 net/dccp/ipv6.c:683 sk_backlog_rcv include/net/sock.h:921 [inline] __release_sock+0x12a/0x350 net/core/sock.c:2269 release_sock+0x54/0x1b0 net/core/sock.c:2805 dccp_sendmsg+0x4eb/0x890 net/dccp/proto.c:813 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x326/0x800 net/socket.c:2062 __sys_sendmmsg+0x129/0x330 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2178 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880aa4f65c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff8880aa4f65c0, ffff8880aa4f6dc0) The buggy address belongs to the page: page:ffffea0002a93d80 count:1 mapcount:0 mapping:ffff8880aa4f65c0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880aa4f65c0 0000000000000000 0000000100000003 raw: ffffea0002936ea0 ffffea0001295b20 ffff88813fe80c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aa4f6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880aa4f6580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880aa4f6600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880aa4f6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880aa4f6700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================