netlink: 4608 bytes leftover after parsing attributes in process `syz-executor.0'. ================================================================== BUG: KASAN: use-after-free in n_tty_receive_char_inline drivers/tty/n_tty.c:1411 [inline] BUG: KASAN: use-after-free in n_tty_receive_buf_standard drivers/tty/n_tty.c:1583 [inline] BUG: KASAN: use-after-free in __receive_buf drivers/tty/n_tty.c:1646 [inline] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x1feb/0x2410 drivers/tty/n_tty.c:1742 Read of size 1 at addr ffff88805e2597fb by task syz-executor.3/10297 CPU: 1 PID: 10297 Comm: syz-executor.3 Not tainted 4.14.158-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 n_tty_receive_char_inline drivers/tty/n_tty.c:1411 [inline] n_tty_receive_buf_standard drivers/tty/n_tty.c:1583 [inline] __receive_buf drivers/tty/n_tty.c:1646 [inline] n_tty_receive_buf_common+0x1feb/0x2410 drivers/tty/n_tty.c:1742 n_tty_receive_buf2+0x34/0x40 drivers/tty/n_tty.c:1777 tty_ldisc_receive_buf+0xa5/0x1a0 drivers/tty/tty_buffer.c:455 paste_selection+0x1e6/0x3f2 drivers/tty/vt/selection.c:360 tioclinux+0x10e/0x400 drivers/tty/vt/vt.c:2696 vt_ioctl+0x180c/0x2170 drivers/tty/vt/vt_ioctl.c:364 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45a6f9 RSP: 002b:00007f41a7687c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a6f9 RDX: 0000000020000100 RSI: 000000000000541c RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f41a76886d4 R13: 00000000004c5a4c R14: 00000000004dbd18 R15: 00000000ffffffff Allocated by task 10297: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x7a0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] set_selection+0x79a/0xe30 drivers/tty/vt/selection.c:295 tioclinux+0xf7/0x400 drivers/tty/vt/vt.c:2692 vt_ioctl+0x180c/0x2170 drivers/tty/vt/vt_ioctl.c:364 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 10316: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 set_selection+0x7b7/0xe30 drivers/tty/vt/selection.c:301 tioclinux+0xf7/0x400 drivers/tty/vt/vt.c:2692 vt_ioctl+0x180c/0x2170 drivers/tty/vt/vt_ioctl.c:364 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88805e259600 which belongs to the cache kmalloc-8192 of size 8192 The buggy address is located 507 bytes inside of 8192-byte region [ffff88805e259600, ffff88805e25b600) The buggy address belongs to the page: page:ffffea0001789600 count:1 mapcount:0 mapping:ffff88805e259600 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88805e259600 0000000000000000 0000000100000001 raw: ffffea0001481420 ffffea000178a920 ffff8880aa802080 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805e259680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805e259700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88805e259780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805e259800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805e259880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== kauditd_printk_skb: 346 callbacks suppressed audit: type=1400 audit(1575973380.937:2368): avc: denied { map } for pid=6951 comm="login" path="/bin/login" dev="sda1" ino=1472 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 ptrace attach of "/root/syz-executor.4"[10330] was attempted by "/root/syz-executor.4"[10332] audit: type=1400 audit(1575973380.937:2369): avc: denied { map } for pid=6951 comm="login" path="/bin/login" dev="sda1" ino=1472 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1575973380.937:2370): avc: denied { map } for pid=6951 comm="login" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 netlink: 4608 bytes leftover after parsing attributes in process `syz-executor.0'. audit: type=1400 audit(1575973380.937:2371): avc: denied { map } for pid=6951 comm="login" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1575973380.937:2372): avc: denied { map } for pid=6951 comm="login" path="/etc/ld.so.cache" dev="sda1" ino=2251 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1575973380.937:2373): avc: denied { map } for pid=6951 comm="login" path="/lib/x86_64-linux-gnu/libpam.so.0.83.0" dev="sda1" ino=2694 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1575973380.937:2374): avc: denied { map } for pid=6951 comm="login" path="/lib/x86_64-linux-gnu/libpam.so.0.83.0" dev="sda1" ino=2694 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1