================================================================== 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 ffff88809c6ac484 by task syz-executor.2/2116 CPU: 1 PID: 2116 Comm: syz-executor.2 Not tainted 5.3.0-rc5+ #178 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:0x459879 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:00007fc2713edc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459879 RDX: 000000000000000e RSI: 0000000020000040 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc2713ee6d4 R13: 00000000004bfd6a R14: 00000000004d1b70 R15: 00000000ffffffff Allocated by task 1079: 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] nlmsg_new include/net/netlink.h:888 [inline] inet6_ifa_notify net/ipv6/addrconf.c:5352 [inline] __ipv6_ifa_notify+0x15e/0xa70 net/ipv6/addrconf.c:5962 addrconf_ifdown+0x82c/0x1220 net/ipv6/addrconf.c:3822 addrconf_notify+0x5db/0x23b0 net/ipv6/addrconf.c:3633 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] __dev_notify_flags+0x1e9/0x2c0 net/core/dev.c:7613 dev_change_flags+0x10d/0x170 net/core/dev.c:7649 devinet_ioctl+0x13fb/0x1c90 net/ipv4/devinet.c:1137 inet_ioctl+0x1f4/0x340 net/ipv4/af_inet.c:957 sock_do_ioctl+0xd8/0x2f0 net/socket.c:1038 sock_ioctl+0x3ed/0x780 net/socket.c:1189 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1079: 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/0xb80 net/netlink/af_netlink.c:1512 netlink_broadcast net/netlink/af_netlink.c:1534 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0x93/0x1c0 net/netlink/af_netlink.c:2520 rtnl_notify+0xc5/0xf0 net/core/rtnetlink.c:737 inet6_ifa_notify net/ipv6/addrconf.c:5363 [inline] __ipv6_ifa_notify+0x1b8/0xa70 net/ipv6/addrconf.c:5962 addrconf_ifdown+0x82c/0x1220 net/ipv6/addrconf.c:3822 addrconf_notify+0x5db/0x23b0 net/ipv6/addrconf.c:3633 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] __dev_notify_flags+0x1e9/0x2c0 net/core/dev.c:7613 dev_change_flags+0x10d/0x170 net/core/dev.c:7649 devinet_ioctl+0x13fb/0x1c90 net/ipv4/devinet.c:1137 inet_ioctl+0x1f4/0x340 net/ipv4/af_inet.c:957 sock_do_ioctl+0xd8/0x2f0 net/socket.c:1038 sock_ioctl+0x3ed/0x780 net/socket.c:1189 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 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 ffff88809c6ac340 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 324 bytes inside of 512-byte region [ffff88809c6ac340, ffff88809c6ac540) The buggy address belongs to the page: page:ffffea000271ab00 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0xffff88809c6acd40 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000183f288 ffffea0002350988 ffff8880aa400a80 raw: ffff88809c6acd40 ffff88809c6ac0c0 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809c6ac380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809c6ac400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809c6ac480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809c6ac500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88809c6ac580: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================