bisecting fixing commit since aea8526edf59da3ff5306ca408e13d8f6ab89b34 building syzkaller on 1656845f45f284c574eb4f8bfe85dd7916a47a3a testing commit aea8526edf59da3ff5306ca408e13d8f6ab89b34 with gcc (GCC) 8.1.0 kernel signature: af5270aff0c090adb961964b9c315594d9b4f5ef7673902ff8066f363af265e1 run #0: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #1: crashed: KASAN: use-after-free Read in h5_reset_rx run #2: crashed: KASAN: use-after-free Read in skb_release_data 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 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: general protection fault in skb_put run #9: crashed: general protection fault in skb_put testing current HEAD b850307b279cbd12ab8c654d1a3dfe55319cc475 testing commit b850307b279cbd12ab8c654d1a3dfe55319cc475 with gcc (GCC) 8.1.0 kernel signature: 2bd35af0e9953a438e72fcdb34e4c037cd703ffc32d6970c7936f5816f17579d run #0: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr 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: general protection fault in skb_put run #4: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr run #5: crashed: KASAN: use-after-free Read in h5_rx_3wire_hdr 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_reset_rx run #9: OK revisions tested: 2, total time: 33m42.281311373s (build: 16m16.82917131s, test: 16m47.154644166s) the crash still happens on HEAD commit msg: Linux 4.14.184 crash: KASAN: use-after-free Read in h5_reset_rx Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:183 [inline] BUG: KASAN: use-after-free in atomic_read arch/x86/include/asm/atomic.h:27 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:42 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:952 [inline] BUG: KASAN: use-after-free in kfree_skb+0x25d/0x2b0 net/core/skbuff.c:659 Read of size 4 at addr ffff88808be63724 by task kworker/u4:9/17012 CPU: 1 PID: 17012 Comm: kworker/u4:9 Not tainted 4.14.184-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_load4_noabort+0x14/0x20 mm/kasan/report.c:429 __read_once_size include/linux/compiler.h:183 [inline] atomic_read arch/x86/include/asm/atomic.h:27 [inline] refcount_read include/linux/refcount.h:42 [inline] skb_unref include/linux/skbuff.h:952 [inline] kfree_skb+0x25d/0x2b0 net/core/skbuff.c:659 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:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 17012: 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:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 26054: 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+0x46/0xbb The buggy address belongs to the object at ffff88808be63640 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 228 bytes inside of 232-byte region [ffff88808be63640, ffff88808be63728) The buggy address belongs to the page: page:ffffea00022f98c0 count:1 mapcount:0 mapping:ffff88808be63000 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff88808be63000 0000000000000000 000000010000000c raw: ffffea00025b47a0 ffffea00024a7c60 ffff8880a9e10900 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808be63600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88808be63680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808be63700: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808be63780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808be63800: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ==================================================================