bisecting fixing commit since aea8526edf59da3ff5306ca408e13d8f6ab89b34 building syzkaller on 1656845f45f284c574eb4f8bfe85dd7916a47a3a testing commit aea8526edf59da3ff5306ca408e13d8f6ab89b34 with gcc (GCC) 8.1.0 kernel signature: b92a92a932169d50dd9602328cce0bbdf561bfc3 run #0: crashed: KASAN: use-after-free Read in skb_release_data run #1: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #2: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #3: crashed: KASAN: use-after-free Read in skb_release_data run #4: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #5: crashed: KASAN: use-after-free Read in kfree_skb run #6: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #7: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #8: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #9: OK testing current HEAD a844dc4c544291470aa69edbe2434b040794e269 testing commit a844dc4c544291470aa69edbe2434b040794e269 with gcc (GCC) 8.1.0 kernel signature: 9c1810a17ba554c013d63bc3c18fab1b10892d52 run #0: crashed: general protection fault in skb_put run #1: crashed: general protection fault in skb_put run #2: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #3: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #4: crashed: KASAN: invalid-free in skb_free_head run #5: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #6: crashed: KASAN: use-after-free Read in skb_release_data run #7: crashed: general protection fault in skb_put run #8: crashed: KASAN: use-after-free Read in kfree_skb run #9: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr revisions tested: 2, total time: 32m2.655777846s (build: 16m12.534531764s, test: 15m18.888531023s) the crash still happens on HEAD commit msg: Linux 4.14.158 crash: KASAN: use-after-free Read in h5_rx_3wire_hdr Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum ================================================================== BUG: KASAN: use-after-free in h5_rx_3wire_hdr+0x2e5/0x350 drivers/bluetooth/hci_h5.c:407 Read of size 1 at addr ffff888083e25488 by task syz-executor.5/20017 CPU: 0 PID: 20017 Comm: syz-executor.5 Not tainted 4.14.158-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 Bluetooth: Invalid header checksum kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 h5_rx_3wire_hdr+0x2e5/0x350 drivers/bluetooth/hci_h5.c:407 h5_recv+0x246/0x410 drivers/bluetooth/hci_h5.c:532 hci_uart_tty_receive+0x1ce/0x460 drivers/bluetooth/hci_ldisc.c:616 Bluetooth: Invalid header checksum tiocsti drivers/tty/tty_io.c:2186 [inline] tty_ioctl+0x625/0x1260 drivers/tty/tty_io.c:2572 Bluetooth: Invalid header checksum vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 Bluetooth: Invalid header checksum SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459819 RSP: 002b:00007fe6ca68fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459819 RDX: 0000000020000080 RSI: 0000000000005412 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe6ca6906d4 R13: 00000000004c408a R14: 00000000004d7ff0 R15: 00000000ffffffff Bluetooth: Invalid header checksum Allocated by task 6901: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3696 __kmalloc_reserve.isra.36+0x2c/0xc0 net/core/skbuff.c:137 Bluetooth: Invalid header checksum __alloc_skb+0xc1/0x500 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:336 [inline] h5_rx_pkt_start+0xba/0x270 drivers/bluetooth/hci_h5.c:443 h5_recv+0x246/0x410 drivers/bluetooth/hci_h5.c:532 hci_uart_tty_receive+0x1ce/0x460 drivers/bluetooth/hci_ldisc.c:616 tty_ldisc_receive_buf+0xff/0x1b0 drivers/tty/tty_buffer.c:459 Bluetooth: Invalid header checksum tty_port_default_receive_buf+0x5f/0x90 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:475 [inline] flush_to_ldisc+0x197/0x390 drivers/tty/tty_buffer.c:527 process_one_work+0x79e/0x16c0 kernel/workqueue.c:2114 worker_thread+0xcc/0xee0 kernel/workqueue.c:2248 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 6901: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 skb_free_head+0x74/0x90 net/core/skbuff.c:554 skb_release_data+0x43b/0x790 net/core/skbuff.c:574 skb_release_all+0x3d/0x50 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb+0x8a/0x2b0 net/core/skbuff.c:663 h5_reset_rx+0x3d/0xf0 drivers/bluetooth/hci_h5.c:499 h5_rx_3wire_hdr+0x287/0x350 drivers/bluetooth/hci_h5.c:409 h5_recv+0x246/0x410 drivers/bluetooth/hci_h5.c:532 hci_uart_tty_receive+0x1ce/0x460 drivers/bluetooth/hci_ldisc.c:616 tty_ldisc_receive_buf+0xff/0x1b0 drivers/tty/tty_buffer.c:459 tty_port_default_receive_buf+0x5f/0x90 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:475 [inline] flush_to_ldisc+0x197/0x390 drivers/tty/tty_buffer.c:527 process_one_work+0x79e/0x16c0 kernel/workqueue.c:2114 worker_thread+0xcc/0xee0 kernel/workqueue.c:2248 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff888083e25480 which belongs to the cache kmalloc-8192 of size 8192 The buggy address is located 8 bytes inside of 8192-byte region [ffff888083e25480, ffff888083e27480) The buggy address belongs to the page: page:ffffea00020f8900 count:1 mapcount:0 mapping:ffff888083e25480 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff888083e25480 0000000000000000 0000000100000001 raw: ffffea000212be20 ffffea0002207b20 ffff8880aa802080 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888083e25380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888083e25400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888083e25480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888083e25500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888083e25580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum