bisecting fixing commit since c7ecf3e3a71c216327980f26b1e895ce9b07ad31 building syzkaller on 25a0186eba20ef6f4f657039ff02eff52a838b1c testing commit c7ecf3e3a71c216327980f26b1e895ce9b07ad31 with gcc (GCC) 8.1.0 kernel signature: eb022454cc5cc21c2a9bbe74e7154ad37bef213730fd870d7ebb2f2ba208ed36 all runs: crashed: KASAN: slab-out-of-bounds Read in bacpy testing current HEAD 399849e4654ea496a6217ba4e5ee3d304c995ab4 testing commit 399849e4654ea496a6217ba4e5ee3d304c995ab4 with gcc (GCC) 8.1.0 kernel signature: e182ae44df44fa540b2bec285af340c40ab80674936f4b67604952baa9e3ffd0 all runs: crashed: KASAN: slab-out-of-bounds Read in bacpy revisions tested: 2, total time: 23m32.162372236s (build: 16m56.345533964s, test: 6m0.540001215s) the crash still happens on HEAD commit msg: Linux 4.19.131 crash: KASAN: slab-out-of-bounds Read in bacpy IPv6: ADDRCONF(NETDEV_CHANGE): vxcan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_hsr: link is not ready hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:373 [inline] BUG: KASAN: slab-out-of-bounds in bacpy+0xe/0x10 include/net/bluetooth/bluetooth.h:236 Read of size 6 at addr ffff888095e7ac08 by task kworker/u5:0/1204 CPU: 0 PID: 1204 Comm: kworker/u5:0 Not tainted 4.19.131-syzkaller #0 IPv6: ADDRCONF(NETDEV_UP): hsr0: link is not ready Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci0 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x23/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:373 [inline] bacpy+0xe/0x10 include/net/bluetooth/bluetooth.h:236 hci_extended_inquiry_result_evt net/bluetooth/hci_event.c:4163 [inline] hci_event_packet+0x3f83/0x978d net/bluetooth/hci_event.c:5845 8021q: adding VLAN 0 to HW filter on device batadv0 IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready 8021q: adding VLAN 0 to HW filter on device batadv0 hci_rx_work+0x363/0x8f0 net/bluetooth/hci_core.c:4359 process_one_work+0x830/0x1670 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x324/0x3e0 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 7495: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3703 __kmalloc_reserve.isra.41+0x2c/0xc0 net/core/skbuff.c:137 __alloc_skb+0xd7/0x580 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:180 [inline] vhci_write+0xa8/0x3f0 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x443/0x890 fs/read_write.c:487 vfs_write+0x150/0x4d0 fs/read_write.c:549 ksys_write+0x103/0x260 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x6e/0xb0 fs/read_write.c:608 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3670: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 skb_free_head+0x74/0x90 net/core/skbuff.c:554 skb_release_data+0x50e/0x790 net/core/skbuff.c:574 skb_release_all+0x3d/0x50 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] consume_skb+0x91/0x270 net/core/skbuff.c:705 skb_free_datagram+0x12/0xc0 net/core/datagram.c:329 unix_dgram_recvmsg+0x78e/0xe90 net/unix/af_unix.c:2203 sock_recvmsg_nosec net/socket.c:795 [inline] sock_recvmsg+0xb7/0xf0 net/socket.c:802 ___sys_recvmsg+0x219/0x500 net/socket.c:2277 __sys_recvmsg+0xd6/0x180 net/socket.c:2326 __do_sys_recvmsg net/socket.c:2336 [inline] __se_sys_recvmsg net/socket.c:2333 [inline] __x64_sys_recvmsg+0x73/0xb0 net/socket.c:2333 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888095e7aa00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes to the right of 512-byte region [ffff888095e7aa00, ffff888095e7ac00) The buggy address belongs to the page: page:ffffea0002579e80 count:1 mapcount:0 mapping:ffff88812c29c940 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea0002530a48 ffffea0002991f48 ffff88812c29c940 raw: 0000000000000000 ffff888095e7a000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888095e7ab00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888095e7ab80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888095e7ac00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888095e7ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888095e7ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================