================================================================== BUG: KASAN: use-after-free in n_tty_check_throttle drivers/tty/n_tty.c:266 [inline] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 drivers/tty/n_tty.c:1761 Read of size 1 at addr ffff88801280025e by task syz-executor.0/12571 CPU: 1 PID: 12571 Comm: syz-executor.0 Not tainted 5.5.0-rc6-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132 n_tty_check_throttle drivers/tty/n_tty.c:266 [inline] n_tty_receive_buf_common+0x270f/0x2b70 drivers/tty/n_tty.c:1761 n_tty_receive_buf2+0x34/0x40 drivers/tty/n_tty.c:1777 tty_ldisc_receive_buf+0xad/0x1c0 drivers/tty/tty_buffer.c:461 paste_selection+0x1ff/0x460 drivers/tty/vt/selection.c:372 tioclinux+0x133/0x480 drivers/tty/vt/vt.c:3044 vt_ioctl+0x1a41/0x26d0 drivers/tty/vt/vt_ioctl.c:364 tty_ioctl+0xa37/0x14f0 drivers/tty/tty_io.c:2660 vfs_ioctl fs/ioctl.c:47 [inline] file_ioctl fs/ioctl.c:545 [inline] do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732 ksys_ioctl+0xab/0xd0 fs/ioctl.c:749 __do_sys_ioctl fs/ioctl.c:756 [inline] __se_sys_ioctl fs/ioctl.c:754 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45af49 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:00007fa27a906c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045af49 RDX: 0000000020000140 RSI: 000000000000541c RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa27a9076d4 R13: 00000000004c64de R14: 00000000004ddde0 R15: 00000000ffffffff The buggy address belongs to the object at ffff888012800000 which belongs to the cache kmalloc-4M of size 4194304 The buggy address is located 606 bytes inside of 4194304-byte region [ffff888012800000, ffff888012c00000) The buggy address belongs to the page: page:ffffea00004a0000 refcount:1 mapcount:0 mapping:ffff8880aa40c1c0 index:0x0 compound_mapcount: 0 raw: 00fffe0000010200 ffffea0002640008 ffffea00004f0008 ffff8880aa40c1c0 raw: 0000000000000000 ffff888012800000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888012800100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888012800180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888012800200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888012800280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888012800300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================