================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff8880a1405560 by task kworker/1:0/18 CPU: 1 PID: 18 Comm: kworker/1:0 Not tainted 4.14.232-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_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 UDF-fs: Scanning with blocksize 512 failed 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_chan_close+0x103/0x870 net/bluetooth/l2cap_core.c:757 l2cap_chan_timeout+0x143/0x2a0 net/bluetooth/l2cap_core.c:430 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 7979: 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:1778 [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 7979: 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:3286 [inline] free_old_xmit_skbs+0x184/0x2c0 drivers/net/virtio_net.c:1137 start_xmit+0x148/0x14f0 drivers/net/virtio_net.c:1299 __netdev_start_xmit include/linux/netdevice.h:4051 [inline] netdev_start_xmit include/linux/netdevice.h:4060 [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:230 ip_finish_output+0x37c/0xc50 net/ipv4/ip_output.c:318 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1cd/0x510 net/ipv4/ip_output.c:406 dst_output include/net/dst.h:470 [inline] ip_local_out+0x93/0x170 net/ipv4/ip_output.c:125 ip_queue_xmit+0x7d3/0x1a80 net/ipv4/ip_output.c:505 __tcp_transmit_skb+0x17e2/0x2cb0 net/ipv4/tcp_output.c:1133 tcp_transmit_skb net/ipv4/tcp_output.c:1149 [inline] tcp_write_xmit+0x654/0x5570 net/ipv4/tcp_output.c:2394 __tcp_push_pending_frames+0xa0/0x2d0 net/ipv4/tcp_output.c:2580 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:1778 [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 ffff8880a14054c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff8880a14054c0, ffff8880a1405cc0) The buggy address belongs to the page: page:ffffea0002850100 count:1 mapcount:0 mapping:ffff8880a14043c0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880a14043c0 0000000000000000 0000000100000003 raw: ffffea0001495a20 ffffea00028754a0 ffff88813fe80c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a1405400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a1405480: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880a1405500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a1405580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a1405600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================