bisecting fixing commit since 3c8c23092588a23bf1856a64f58c37f477a413be building syzkaller on 8bdd5343e64460868dd1318257a39f1e7fd89471 testing commit 3c8c23092588a23bf1856a64f58c37f477a413be compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 74308f6e7c297dd671bb23b464d9b5c120bbbab17642473cd5d4f04caf42078f all runs: crashed: KASAN: slab-out-of-bounds Read in hci_le_meta_evt testing current HEAD e34184f53363f6bb873c2fe0ce1a08ed7d16e94a testing commit e34184f53363f6bb873c2fe0ce1a08ed7d16e94a compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 041918fb11c6ea55325026c3d828596d952f23d84211150852352a4ab3d57192 all runs: crashed: KASAN: slab-out-of-bounds Read in hci_le_meta_evt revisions tested: 2, total time: 31m55.228418357s (build: 23m52.464225895s, test: 7m22.653242181s) the crash still happens on HEAD commit msg: Linux 4.19.210 crash: KASAN: slab-out-of-bounds Read in hci_le_meta_evt Bluetooth: hci3: Dropping invalid advertising data Bluetooth: hci0: Dropping invalid advertising data Bluetooth: hci0: Dropping invalid advertising data Bluetooth: hci3: Dropping invalid advertising data ================================================================== BUG: KASAN: slab-out-of-bounds in hci_le_adv_report_evt net/bluetooth/hci_event.c:5394 [inline] BUG: KASAN: slab-out-of-bounds in hci_le_meta_evt+0x3071/0x3e40 net/bluetooth/hci_event.c:5694 Bluetooth: hci5: Dropping invalid advertising data Read of size 1 at addr ffff8880a1e9754a by task kworker/u5:8/8486 CPU: 1 PID: 8486 Comm: kworker/u5:8 Not tainted 4.19.210-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci3 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x226 lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 Bluetooth: hci2: Dropping invalid advertising data kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 hci_le_adv_report_evt net/bluetooth/hci_event.c:5394 [inline] hci_le_meta_evt+0x3071/0x3e40 net/bluetooth/hci_event.c:5694 Bluetooth: hci5: Dropping invalid advertising data hci_event_packet+0x29fa/0x68e0 net/bluetooth/hci_event.c:5959 Bluetooth: hci2: Dropping invalid advertising data Bluetooth: hci4: Dropping invalid advertising data hci_rx_work+0x385/0xa70 net/bluetooth/hci_core.c:4380 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 Bluetooth: hci4: Dropping invalid advertising data kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 10215: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 Bluetooth: hci0: Dropping invalid advertising data kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3703 __kmalloc_reserve.isra.9+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/0x3e0 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 Bluetooth: hci0: Dropping invalid advertising data __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 Bluetooth: hci0: Dropping invalid advertising data entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 587: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 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:563 skb_release_data+0x513/0x760 net/core/skbuff.c:583 skb_release_all+0x3d/0x50 net/core/skbuff.c:640 __kfree_skb net/core/skbuff.c:654 [inline] consume_skb+0x93/0x270 net/core/skbuff.c:714 netlink_broadcast_filtered+0x28e/0x900 net/netlink/af_netlink.c:1522 netlink_broadcast+0xe/0x10 net/netlink/af_netlink.c:1544 nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x10c/0x140 net/netlink/af_netlink.c:2500 rtnl_notify+0x86/0xe0 net/core/rtnetlink.c:736 inet_netconf_notify_devconf+0xd3/0x150 net/ipv4/devinet.c:1927 __devinet_sysctl_unregister.isra.9+0x75/0xa0 net/ipv4/devinet.c:2371 Bluetooth: hci1: Dropping invalid advertising data devinet_sysctl_unregister+0x8d/0xe0 net/ipv4/devinet.c:2395 inetdev_destroy net/ipv4/devinet.c:317 [inline] inetdev_event+0x822/0xda0 net/ipv4/devinet.c:1545 notifier_call_chain+0x8a/0x160 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x11/0x20 kernel/notifier.c:401 call_netdevice_notifiers_info+0x28/0x60 net/core/dev.c:1744 call_netdevice_notifiers net/core/dev.c:1762 [inline] rollback_registered_many+0x5ca/0xbe0 net/core/dev.c:8196 unregister_netdevice_many+0x3e/0x1f0 net/core/dev.c:9324 default_device_exit_batch+0x2e4/0x3d0 net/core/dev.c:9795 ops_exit_list.isra.0+0xd3/0x120 net/core/net_namespace.c:156 Bluetooth: hci1: Dropping invalid advertising data cleanup_net+0x368/0x850 net/core/net_namespace.c:554 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880a1e97340 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 10 bytes to the right of 512-byte region [ffff8880a1e97340, ffff8880a1e97540) The buggy address belongs to the page: page:ffffea000287a5c0 count:1 mapcount:0 mapping:ffff88813bff6940 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00028ee148 ffffea00026f4a08 ffff88813bff6940 raw: 0000000000000000 ffff8880a1e970c0 0000000100000006 0000000000000000 Bluetooth: hci1: Dropping invalid advertising data page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a1e97400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a1e97480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a1e97500: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8880a1e97580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a1e97600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================