================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff88809bffac20 by task kworker/1:2/32255 CPU: 1 PID: 32255 Comm: kworker/1:2 Not tainted 4.14.270-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events sco_sock_timeout 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 include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_sock_timeout+0x7b/0x1a0 net/bluetooth/sco.c:95 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 7960: 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_fclone include/linux/skbuff.h:1022 [inline] sk_stream_alloc_skb+0xb1/0x760 net/ipv4/tcp.c:855 tcp_sendmsg_locked+0xed8/0x2ef0 net/ipv4/tcp.c:1301 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 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 sock_write_iter+0x22c/0x370 net/socket.c:925 call_write_iter include/linux/fs.h:1780 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 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 Freed by task 7960: 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] consume_skb+0xe0/0x380 net/core/skbuff.c:714 __dev_kfree_skb_any+0x7a/0xa0 net/core/dev.c:2529 dev_consume_skb_any include/linux/netdevice.h:3287 [inline] free_old_xmit_skbs+0x184/0x2c0 drivers/net/virtio_net.c:1141 start_xmit+0x148/0x14f0 drivers/net/virtio_net.c:1303 __netdev_start_xmit include/linux/netdevice.h:4052 [inline] netdev_start_xmit include/linux/netdevice.h:4061 [inline] xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0x188/0x890 net/core/dev.c:3021 sch_direct_xmit+0x251/0x500 net/sched/sch_generic.c:186 __dev_xmit_skb net/core/dev.c:3214 [inline] __dev_queue_xmit+0x1ab0/0x2480 net/core/dev.c:3489 neigh_hh_output include/net/neighbour.h:490 [inline] neigh_output include/net/neighbour.h:498 [inline] ip_finish_output2+0x9db/0x1340 net/ipv4/ip_output.c:237 ip_finish_output+0x37c/0xc50 net/ipv4/ip_output.c:325 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1cd/0x510 net/ipv4/ip_output.c:413 dst_output include/net/dst.h:470 [inline] ip_local_out+0x93/0x170 net/ipv4/ip_output.c:125 ip_queue_xmit+0x82b/0x1b40 net/ipv4/ip_output.c:513 __tcp_transmit_skb+0x17da/0x2ca0 net/ipv4/tcp_output.c:1133 tcp_transmit_skb net/ipv4/tcp_output.c:1149 [inline] tcp_write_xmit+0x654/0x5580 net/ipv4/tcp_output.c:2395 __tcp_push_pending_frames+0xa0/0x2d0 net/ipv4/tcp_output.c:2581 tcp_push+0x3fd/0x5f0 net/ipv4/tcp.c:715 tcp_sendmsg_locked+0x2153/0x2ef0 net/ipv4/tcp.c:1426 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 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 sock_write_iter+0x22c/0x370 net/socket.c:925 call_write_iter include/linux/fs.h:1780 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 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 The buggy address belongs to the object at ffff88809bffab80 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff88809bffab80, ffff88809bffb380) The buggy address belongs to the page: page:ffffea00026ffe80 count:1 mapcount:0 mapping:ffff88809bffa300 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff88809bffa300 0000000000000000 0000000100000003 raw: ffffea00025e4620 ffffea000263c820 ffff88813fe74c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809bffab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809bffab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809bffac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809bffac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809bffad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================