================================================================== BUG: KASAN: slab-out-of-bounds in add_adv_patterns_monitor+0x91f/0xa90 net/bluetooth/mgmt.c:4266 Read of size 1 at addr ffff888022b970c9 by task syz-executor.5/11222 CPU: 0 PID: 11222 Comm: syz-executor.5 Not tainted 5.11.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 add_adv_patterns_monitor+0x91f/0xa90 net/bluetooth/mgmt.c:4266 hci_mgmt_cmd net/bluetooth/hci_sock.c:1603 [inline] hci_sock_sendmsg+0x1b9c/0x21d0 net/bluetooth/hci_sock.c:1738 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 sock_write_iter+0x289/0x3c0 net/socket.c:999 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x791/0xa30 fs/read_write.c:605 ksys_write+0x1ee/0x250 fs/read_write.c:658 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x465d99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff9eaf4b188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465d99 RDX: 0000000000000009 RSI: 0000000020000000 RDI: 000000000000000a RBP: 00000000004bcf27 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffdbd55d5df R14: 00007ff9eaf4b300 R15: 0000000000022000 Allocated by task 11222: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kmalloc include/linux/slab.h:557 [inline] hci_mgmt_cmd net/bluetooth/hci_sock.c:1508 [inline] hci_sock_sendmsg+0x9bc/0x21d0 net/bluetooth/hci_sock.c:1738 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 sock_write_iter+0x289/0x3c0 net/socket.c:999 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x791/0xa30 fs/read_write.c:605 ksys_write+0x1ee/0x250 fs/read_write.c:658 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888022b970c0 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 9 bytes inside of 16-byte region [ffff888022b970c0, ffff888022b970d0) The buggy address belongs to the page: page:00000000b8c1e670 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888022b979c0 pfn:0x22b97 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea00004d8f40 0000000500000005 ffff888010c41b40 raw: ffff888022b979c0 000000008080007f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888022b96f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888022b97000: 00 00 fc fc fb fb fc fc 00 00 fc fc 00 00 fc fc >ffff888022b97080: 00 00 fc fc fb fb fc fc 00 01 fc fc 00 00 fc fc ^ ffff888022b97100: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ffff888022b97180: 00 04 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ==================================================================