================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 Read of size 8 at addr ffff8880b3d33260 by task kworker/1:4/9347 CPU: 1 PID: 9347 Comm: kworker/1:4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Workqueue: events sco_sock_timeout 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 include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_sock_timeout+0x7b/0x1b0 net/bluetooth/sco.c:95 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 30801: __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 __sys_sendto+0x21a/0x320 net/socket.c:1899 __do_sys_sendto net/socket.c:1911 [inline] __se_sys_sendto net/socket.c:1907 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1907 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 30801: __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+0x46/0x60 net/core/skbuff.c:654 sk_wmem_free_skb include/net/sock.h:1468 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1769 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3160 [inline] tcp_ack+0x1d1e/0x51d0 net/ipv4/tcp_input.c:3695 tcp_rcv_established+0x13e3/0x1ef0 net/ipv4/tcp_input.c:5594 tcp_v6_do_rcv+0xe1e/0x1370 net/ipv6/tcp_ipv6.c:1348 sk_backlog_rcv include/net/sock.h:952 [inline] __release_sock+0x134/0x3a0 net/core/sock.c:2362 __sk_flush_backlog+0x22/0x30 net/core/sock.c:2382 sk_flush_backlog include/net/sock.h:1039 [inline] tcp_sendmsg_locked+0x2624/0x2f60 net/ipv4/tcp.c:1306 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 __sys_sendto+0x21a/0x320 net/socket.c:1899 __do_sys_sendto net/socket.c:1911 [inline] __se_sys_sendto net/socket.c:1907 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1907 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 ffff8880b3d331c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff8880b3d331c0, ffff8880b3d339c0) The buggy address belongs to the page: page:ffffea0002cf4c80 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002bc5908 ffffea00013ee688 ffff88813bff0c40 raw: 0000000000000000 ffff8880b3d320c0 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b3d33100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880b3d33180: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880b3d33200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b3d33280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b3d33300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================