================================================================== BUG: KASAN: slab-out-of-bounds in tcp_probe_timer net/ipv4/tcp_timer.c:360 [inline] BUG: KASAN: slab-out-of-bounds in tcp_write_timer_handler+0x8c6/0x8d0 net/ipv4/tcp_timer.c:596 Read of size 4 at addr ffff8880a769e610 by task syz-executor.2/25259 CPU: 1 PID: 25259 Comm: syz-executor.2 Not tainted 5.3.0-rc5+ #173 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:612 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 tcp_probe_timer net/ipv4/tcp_timer.c:360 [inline] tcp_write_timer_handler+0x8c6/0x8d0 net/ipv4/tcp_timer.c:596 tcp_write_timer+0xa8/0x1e0 net/ipv4/tcp_timer.c:612 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers kernel/time/timer.c:1685 [inline] __run_timers kernel/time/timer.c:1653 [inline] run_timer_softirq+0x697/0x17a0 kernel/time/timer.c:1698 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:537 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1095 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] RIP: 0010:console_unlock+0xbc7/0xf10 kernel/printk/printk.c:2471 Code: d2 88 48 c1 e8 03 42 80 3c 30 00 0f 85 e4 02 00 00 48 83 3d 9a 31 77 07 00 0f 84 91 01 00 00 e8 af af 16 00 48 8b 7d 98 57 9d <0f> 1f 44 00 00 e9 6d ff ff ff e8 9a af 16 00 48 8b 7d 08 c7 05 1c RSP: 0018:ffff88808ff0f608 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: 0000000000000200 RCX: ffffc9000a36f000 RDX: 0000000000040000 RSI: ffffffff815bc181 RDI: 0000000000000246 RBP: ffff88808ff0f690 R08: ffff888053a0c6c0 R09: fffffbfff134af30 R10: fffffbfff134af2f R11: ffffffff89a5797f R12: 0000000000000000 R13: ffffffff84334800 R14: dffffc0000000000 R15: ffffffff893ca1d0 vprintk_emit+0x2a0/0x700 kernel/printk/printk.c:1986 vprintk_default+0x28/0x30 kernel/printk/printk.c:2013 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:386 printk+0xba/0xed kernel/printk/printk.c:2046 kobject_uevent_env+0xe2/0x101d lib/kobject_uevent.c:476 kobject_uevent+0x20/0x26 lib/kobject_uevent.c:641 tty_register_device_attr+0x4a4/0x740 drivers/tty/tty_io.c:3165 tty_port_register_device_attr drivers/tty/tty_port.c:134 [inline] tty_port_register_device+0x3e/0x50 drivers/tty/tty_port.c:111 rfcomm_dev_add net/bluetooth/rfcomm/tty.c:330 [inline] __rfcomm_create_dev net/bluetooth/rfcomm/tty.c:425 [inline] rfcomm_create_dev net/bluetooth/rfcomm/tty.c:486 [inline] rfcomm_dev_ioctl+0x15ff/0x1b80 net/bluetooth/rfcomm/tty.c:588 rfcomm_sock_ioctl+0x90/0xb0 net/bluetooth/rfcomm/sock.c:902 sock_do_ioctl+0xd8/0x2f0 net/socket.c:1038 sock_ioctl+0x3ed/0x780 net/socket.c:1189 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459879 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f29d9f1dc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459879 RDX: 0000000020000100 RSI: 00000000400452c8 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f29d9f1e6d4 R13: 00000000004c1fee R14: 00000000004d53f8 R15: 00000000ffffffff Allocated by task 4168: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:460 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:501 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3622 kmalloc_node include/linux/slab.h:595 [inline] kvmalloc_node+0x68/0x100 mm/util.c:459 kvmalloc include/linux/mm.h:670 [inline] seq_buf_alloc fs/seq_file.c:32 [inline] seq_read+0x817/0x1110 fs/seq_file.c:204 kernfs_fop_read+0xed/0x560 fs/kernfs/file.c:251 __vfs_read+0x8a/0x110 fs/read_write.c:425 vfs_read+0x1f0/0x440 fs/read_write.c:461 ksys_read+0x14f/0x290 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read fs/read_write.c:595 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:595 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4168: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:449 kasan_slab_free+0xe/0x10 mm/kasan/common.c:457 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 kvfree+0x61/0x70 mm/util.c:488 seq_release+0x54/0x80 fs/seq_file.c:360 kernfs_fop_release+0xf7/0x1a0 fs/kernfs/file.c:780 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x5a9/0x6a0 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a769ea40 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1072 bytes to the left of 4096-byte region [ffff8880a769ea40, ffff8880a769fa40) The buggy address belongs to the page: page:ffffea00029da780 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00027e4108 ffffea0002866588 ffff8880aa402000 raw: 0000000000000000 ffff8880a769ea40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a769e500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a769e580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a769e600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a769e680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a769e700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================