bisecting fixing commit since aea8526edf59da3ff5306ca408e13d8f6ab89b34 building syzkaller on 1656845f45f284c574eb4f8bfe85dd7916a47a3a testing commit aea8526edf59da3ff5306ca408e13d8f6ab89b34 with gcc (GCC) 8.1.0 kernel signature: 6cb9b293ac9a38d029e949f3a66c1634320606c512bdf22cc6436b6479fc906a 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_reset_rx run #3: crashed: general protection fault in skb_put run #4: crashed: KASAN: use-after-free Read in skb_release_data run #5: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #6: crashed: general protection fault in skb_put 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: crashed: KASAN: use-after-free Read in skb_release_data testing current HEAD 12cd844a39ed16aa183a820a54fe6f9a0bb4cd14 testing commit 12cd844a39ed16aa183a820a54fe6f9a0bb4cd14 with gcc (GCC) 8.1.0 kernel signature: 01be2d91089369690e111dc20725d958433ef14cb2b3b3ef47907c57b4aec323 run #0: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #1: crashed: KASAN: use-after-free Read in skb_release_data run #2: crashed: KASAN: use-after-free Read in h5_reset_rx run #3: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #4: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #5: crashed: KASAN: use-after-free Read in h5_reset_rx run #6: crashed: general protection fault in skb_put run #7: crashed: KASAN: use-after-free Read in skb_release_data run #8: crashed: general protection fault in skb_put run #9: crashed: KASAN: use-after-free Read in skb_release_head_state revisions tested: 2, total time: 32m12.511055636s (build: 17m55.777458654s, test: 13m30.925729022s) the crash still happens on HEAD commit msg: Linux 4.14.173 crash: KASAN: use-after-free Read in skb_release_head_state Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum ================================================================== BUG: KASAN: use-after-free in skb_dst_drop include/net/dst.h:297 [inline] BUG: KASAN: use-after-free in skb_release_head_state+0x1b2/0x1f0 net/core/skbuff.c:612 Read of size 8 at addr ffff8880966a4a98 by task kworker/u4:0/5 CPU: 1 PID: 5 Comm: kworker/u4:0 Not tainted 4.14.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc 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 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 skb_dst_drop include/net/dst.h:297 [inline] skb_release_head_state+0x1b2/0x1f0 net/core/skbuff.c:612 skb_release_all+0xd/0x50 net/core/skbuff.c:629 __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 Allocated by task 5: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc_node+0x144/0x790 mm/slab.c:3642 __alloc_skb+0x92/0x500 net/core/skbuff.c:193 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 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 25465: 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] kmem_cache_free+0x80/0x2d0 mm/slab.c:3758 kfree_skbmem+0x88/0xf0 net/core/skbuff.c:586 __kfree_skb net/core/skbuff.c:646 [inline] kfree_skb+0x92/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 tiocsti drivers/tty/tty_io.c:2186 [inline] tty_ioctl+0x625/0x1260 drivers/tty/tty_io.c:2572 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 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 The buggy address belongs to the object at ffff8880966a4a40 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 88 bytes inside of 232-byte region [ffff8880966a4a40, ffff8880966a4b28) The buggy address belongs to the page: page:ffffea000259a900 count:1 mapcount:0 mapping:ffff8880966a4040 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff8880966a4040 0000000000000000 000000010000000c raw: ffffea000264e260 ffffea000248cda0 ffff88821b720540 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880966a4980: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ffff8880966a4a00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880966a4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880966a4b00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff8880966a4b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum