================================================================== BUG: KASAN: use-after-free in rfcomm_dlc_get net/bluetooth/rfcomm/core.c:360 [inline] BUG: KASAN: use-after-free in __rfcomm_dlc_open net/bluetooth/rfcomm/core.c:396 [inline] BUG: KASAN: use-after-free in rfcomm_dlc_open+0xc9d/0xd80 net/bluetooth/rfcomm/core.c:431 Read of size 1 at addr ffff888091d146c4 by task syz-executor.2/9603 CPU: 0 PID: 9603 Comm: syz-executor.2 Not tainted 5.2.0+ #67 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:612 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:129 rfcomm_dlc_get net/bluetooth/rfcomm/core.c:360 [inline] __rfcomm_dlc_open net/bluetooth/rfcomm/core.c:396 [inline] rfcomm_dlc_open+0xc9d/0xd80 net/bluetooth/rfcomm/core.c:431 rfcomm_sock_connect+0x38a/0x4b0 net/bluetooth/rfcomm/sock.c:416 __sys_connect+0x264/0x330 net/socket.c:1828 __do_sys_connect net/socket.c:1839 [inline] __se_sys_connect net/socket.c:1836 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1836 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459829 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f6aab41bc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459829 RDX: 000000000000000e RSI: 0000000020000080 RDI: 0000000000000005 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6aab41c6d4 R13: 00000000004bfd0a R14: 00000000004d19d0 R15: 00000000ffffffff Allocated by task 8165: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:460 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:501 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3629 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:141 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1055 [inline] alloc_uevent_skb+0x83/0x1e2 lib/kobject_uevent.c:289 uevent_net_broadcast_tagged lib/kobject_uevent.c:350 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:411 [inline] kobject_uevent_env+0xbdc/0x1023 lib/kobject_uevent.c:592 kobject_uevent+0x20/0x26 lib/kobject_uevent.c:641 device_add+0xad8/0x17a0 drivers/base/core.c:2110 netdev_register_kobject+0x183/0x3b0 net/core/net-sysfs.c:1746 register_netdevice+0x875/0xf10 net/core/dev.c:8723 veth_newlink+0x540/0x990 drivers/net/veth.c:1329 __rtnl_newlink+0x1086/0x16c0 net/core/rtnetlink.c:3196 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3254 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5223 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 __sys_sendto+0x262/0x380 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto net/socket.c:1960 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1960 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8165: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:449 kasan_slab_free+0xe/0x10 mm/kasan/common.c:457 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 skb_free_head+0x93/0xb0 net/core/skbuff.c:591 skb_release_data+0x42d/0x7c0 net/core/skbuff.c:611 skb_release_all+0x4d/0x60 net/core/skbuff.c:665 __kfree_skb net/core/skbuff.c:679 [inline] consume_skb net/core/skbuff.c:838 [inline] consume_skb+0xfb/0x3b0 net/core/skbuff.c:832 netlink_broadcast_filtered+0x34f/0xb90 net/netlink/af_netlink.c:1512 netlink_broadcast+0x3a/0x50 net/netlink/af_netlink.c:1534 uevent_net_broadcast_tagged lib/kobject_uevent.c:371 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:411 [inline] kobject_uevent_env+0xcc3/0x1023 lib/kobject_uevent.c:592 kobject_uevent+0x20/0x26 lib/kobject_uevent.c:641 device_add+0xad8/0x17a0 drivers/base/core.c:2110 netdev_register_kobject+0x183/0x3b0 net/core/net-sysfs.c:1746 register_netdevice+0x875/0xf10 net/core/dev.c:8723 veth_newlink+0x540/0x990 drivers/net/veth.c:1329 __rtnl_newlink+0x1086/0x16c0 net/core/rtnetlink.c:3196 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3254 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5223 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 __sys_sendto+0x262/0x380 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto net/socket.c:1960 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1960 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888091d14580 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 324 bytes inside of 512-byte region [ffff888091d14580, ffff888091d14780) The buggy address belongs to the page: page:ffffea0002474500 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0xffff888091d14580 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002874548 ffffea000293f2c8 ffff8880aa400a80 raw: ffff888091d14580 ffff888091d14080 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091d14580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091d14600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888091d14680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888091d14700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091d14780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================