================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 Read of size 8 at addr ffff8880ab442a20 by task syz-executor.0/18715 CPU: 1 PID: 18715 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:334 [inline] lock_sock_nested+0x3b/0x110 net/core/sock.c:2884 l2cap_sock_teardown_cb+0xa0/0x6d0 net/bluetooth/l2cap_sock.c:1348 l2cap_chan_del+0xbc/0xa50 net/bluetooth/l2cap_core.c:603 l2cap_conn_del+0x3a6/0x6e0 net/bluetooth/l2cap_core.c:1733 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7445 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:7438 hci_disconn_cfm include/net/bluetooth/hci_core.h:1263 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x6bc/0x1020 net/bluetooth/hci_core.c:1687 hci_rfkill_set_block+0xe7/0x160 net/bluetooth/hci_core.c:2121 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:353 rfkill_fop_write+0x250/0x4a0 net/rfkill/core.c:1249 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f26a86ce5a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f26a6c41168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f26a87eef80 RCX: 00007f26a86ce5a9 RDX: 0000000000000008 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f26a87297b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeb6c8daef R14: 00007f26a6c41300 R15: 0000000000022000 Allocated by task 8135: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0xae/0x560 net/core/skbuff.c:205 alloc_skb_fclone include/linux/skbuff.h:1037 [inline] sk_stream_alloc_skb+0xba/0x850 net/ipv4/tcp.c:884 tcp_sendmsg_locked+0xc0b/0x2f60 net/ipv4/tcp.c:1312 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1462 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 sock_write_iter+0x287/0x3c0 net/socket.c:966 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8135: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x6de/0x920 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] consume_skb+0x113/0x3d0 net/core/skbuff.c:714 __dev_kfree_skb_any+0x9c/0xc0 net/core/dev.c:2796 dev_consume_skb_any include/linux/netdevice.h:3567 [inline] napi_consume_skb+0x45d/0x5e0 net/core/skbuff.c:778 free_old_xmit_skbs+0xea/0x270 drivers/net/virtio_net.c:1395 start_xmit+0x156/0x17a0 drivers/net/virtio_net.c:1611 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403 qdisc_run include/net/pkt_sched.h:120 [inline] __dev_xmit_skb net/core/dev.c:3451 [inline] __dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip_finish_output2+0xb6d/0x15a0 net/ipv4/ip_output.c:230 ip_finish_output+0xae9/0x10b0 net/ipv4/ip_output.c:318 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_output+0x203/0x5f0 net/ipv4/ip_output.c:406 dst_output include/net/dst.h:455 [inline] ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:125 __ip_queue_xmit+0x91e/0x1c10 net/ipv4/ip_output.c:507 __tcp_transmit_skb+0x1b9c/0x3400 net/ipv4/tcp_output.c:1148 tcp_transmit_skb net/ipv4/tcp_output.c:1164 [inline] tcp_write_xmit+0x989/0x5100 net/ipv4/tcp_output.c:2391 __tcp_push_pending_frames+0xae/0x310 net/ipv4/tcp_output.c:2572 tcp_push+0x4b7/0x6b0 net/ipv4/tcp.c:745 tcp_sendmsg_locked+0x26b3/0x2f60 net/ipv4/tcp.c:1432 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1462 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 sock_write_iter+0x287/0x3c0 net/socket.c:966 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880ab442980 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff8880ab442980, ffff8880ab443180) The buggy address belongs to the page: page:ffffea0002ad1080 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0xffff8880ab443200 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea00026f0e08 ffffea0002805608 ffff88813bff0c40 raw: ffff8880ab443200 ffff8880ab442100 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ab442900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880ab442980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880ab442a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880ab442a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880ab442b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================