================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff8880b51b2ce0 by task kworker/0:3/8688 CPU: 0 PID: 8688 Comm: kworker/0:3 Not tainted 4.14.231-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 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 15004: 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] nlmsg_new include/net/netlink.h:511 [inline] rtmsg_ifinfo_build_skb+0x65/0x130 net/core/rtnetlink.c:2909 rtmsg_ifinfo_event net/core/rtnetlink.c:2943 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:2934 [inline] rtmsg_ifinfo+0x68/0x100 net/core/rtnetlink.c:2951 __dev_notify_flags+0x1d3/0x260 net/core/dev.c:6828 dev_change_flags+0xe6/0x130 net/core/dev.c:6865 do_setlink+0x83f/0x2bf0 net/core/rtnetlink.c:2092 rtnl_newlink+0x128a/0x1860 net/core/rtnetlink.c:2660 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 15004: 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 netlink_broadcast_filtered+0x2ab/0x9e0 net/netlink/af_netlink.c:1489 netlink_broadcast net/netlink/af_netlink.c:1511 [inline] nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x126/0x170 net/netlink/af_netlink.c:2476 rtnl_notify net/core/rtnetlink.c:653 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:2931 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:2945 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:2934 [inline] rtmsg_ifinfo+0xd4/0x100 net/core/rtnetlink.c:2951 __dev_notify_flags+0x1d3/0x260 net/core/dev.c:6828 dev_change_flags+0xe6/0x130 net/core/dev.c:6865 do_setlink+0x83f/0x2bf0 net/core/rtnetlink.c:2092 rtnl_newlink+0x128a/0x1860 net/core/rtnetlink.c:2660 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 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 ffff8880b51b2c40 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff8880b51b2c40, ffff8880b51b3440) The buggy address belongs to the page: page:ffffea0002d46c80 count:1 mapcount:0 mapping:ffff8880b51b23c0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880b51b23c0 0000000000000000 0000000100000003 raw: ffffea00014b6420 ffffea0001508520 ffff88813fe80c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b51b2b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880b51b2c00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880b51b2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b51b2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b51b2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================