Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum ================================================================== BUG: KASAN: use-after-free in h5_rx_3wire_hdr+0x38c/0x3b0 drivers/bluetooth/hci_h5.c:444 Read of size 8 at addr ffff88809b3ed3d8 by task syz-executor.2/29580 CPU: 1 PID: 29580 Comm: syz-executor.2 Not tainted 4.19.114-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 h5_rx_3wire_hdr+0x38c/0x3b0 drivers/bluetooth/hci_h5.c:444 h5_recv+0x2d4/0x460 drivers/bluetooth/hci_h5.c:576 hci_uart_tty_receive+0x21d/0x520 drivers/bluetooth/hci_ldisc.c:620 tiocsti drivers/tty/tty_io.c:2194 [inline] tty_ioctl+0xe0a/0x1420 drivers/tty/tty_io.c:2580 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcda/0x12e0 fs/ioctl.c:688 netlink: 'syz-executor.4': attribute type 5 has an invalid length. ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c889 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f98896e3c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f98896e46d4 RCX: 000000000045c889 RDX: 0000000020000080 RSI: 0000000000005412 RDI: 0000000000000003 RBP: 000000000076bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000582 R14: 00000000004c81b7 R15: 000000000076bfac Allocated by task 22118: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 kmem_cache_alloc_node+0x148/0x730 mm/slab.c:3649 __alloc_skb+0xba/0x5b0 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:995 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline] h5_rx_pkt_start+0xcb/0x270 drivers/bluetooth/hci_h5.c:487 h5_recv+0x2d4/0x460 drivers/bluetooth/hci_h5.c:576 hci_uart_tty_receive+0x21d/0x520 drivers/bluetooth/hci_ldisc.c:620 tty_ldisc_receive_buf+0x14a/0x190 drivers/tty/tty_buffer.c:460 tty_port_default_receive_buf+0x78/0xa0 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:476 [inline] flush_to_ldisc+0x21d/0x390 drivers/tty/tty_buffer.c:528 process_one_work+0x91f/0x1640 kernel/workqueue.c:2155 worker_thread+0x96/0xe20 kernel/workqueue.c:2298 kthread+0x34a/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 22118: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 kfree_skbmem+0xc1/0x140 net/core/skbuff.c:586 __kfree_skb net/core/skbuff.c:646 [inline] kfree_skb net/core/skbuff.c:663 [inline] kfree_skb+0xe9/0x390 net/core/skbuff.c:657 h5_reset_rx+0x47/0x100 drivers/bluetooth/hci_h5.c:543 h5_rx_3wire_hdr+0x2ee/0x3b0 drivers/bluetooth/hci_h5.c:453 h5_recv+0x2d4/0x460 drivers/bluetooth/hci_h5.c:576 hci_uart_tty_receive+0x21d/0x520 drivers/bluetooth/hci_ldisc.c:620 tty_ldisc_receive_buf+0x14a/0x190 drivers/tty/tty_buffer.c:460 tty_port_default_receive_buf+0x78/0xa0 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:476 [inline] flush_to_ldisc+0x21d/0x390 drivers/tty/tty_buffer.c:528 process_one_work+0x91f/0x1640 kernel/workqueue.c:2155 worker_thread+0x96/0xe20 kernel/workqueue.c:2298 kthread+0x34a/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff88809b3ed300 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 216 bytes inside of 232-byte region [ffff88809b3ed300, ffff88809b3ed3e8) The buggy address belongs to the page: page:ffffea00026cfb40 count:1 mapcount:0 mapping:ffff8880a9fb5ac0 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00027b0ec8 ffffea0002a24388 ffff8880a9fb5ac0 raw: 0000000000000000 ffff88809b3ed080 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b3ed280: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88809b3ed300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809b3ed380: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ^ ffff88809b3ed400: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88809b3ed480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Bluetooth: Invalid header checksum Bluetooth: Invalid header checksum