================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff88805ed0b760 by task syz-executor.1/12848 CPU: 1 PID: 12848 Comm: syz-executor.1 Not tainted 4.14.231-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_rfkill_set_block+0xaf/0x120 net/bluetooth/hci_core.c:2052 rfkill_set_block+0x1b2/0x4a0 net/rfkill/core.c:337 rfkill_fop_write+0x1b6/0x3c0 net/rfkill/core.c:1233 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x4665f9 RSP: 002b:00007f56d1060188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00000000004bfce1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffe4d76ad4f R14: 00007f56d1060300 R15: 0000000000022000 Allocated by task 12348: 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 12348: 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 ffff88805ed0b6c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff88805ed0b6c0, ffff88805ed0bec0) The buggy address belongs to the page: page:ffffea00017b4280 count:1 mapcount:0 mapping:ffff88805ed0a5c0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff88805ed0a5c0 0000000000000000 0000000100000003 raw: ffffea00017b3a20 ffffea00017b4820 ffff88813fe80c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805ed0b600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805ed0b680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff88805ed0b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805ed0b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805ed0b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================