================================================================== BUG: KASAN: user-memory-access in memset include/linux/string.h:329 [inline] BUG: KASAN: user-memory-access in bitmap_zero include/linux/bitmap.h:197 [inline] BUG: KASAN: user-memory-access in n_tty_set_termios+0xee/0xcb0 drivers/tty/n_tty.c:1786 Write of size 512 at addr 0000000000001060 by task syz-executor2/26892 CPU: 1 PID: 26892 Comm: syz-executor2 Not tainted 4.14.71+ #8 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 kasan_report_error mm/kasan/report.c:349 [inline] kasan_report.cold.6+0x6d/0x2dd mm/kasan/report.c:409 memset+0x1f/0x40 mm/kasan/kasan.c:285 memset include/linux/string.h:329 [inline] bitmap_zero include/linux/bitmap.h:197 [inline] n_tty_set_termios+0xee/0xcb0 drivers/tty/n_tty.c:1786 tty_set_termios+0x5fd/0x860 drivers/tty/tty_ioctl.c:340 set_termios+0x2bf/0x440 drivers/tty/tty_ioctl.c:413 tty_mode_ioctl+0x4a1/0x920 drivers/tty/tty_ioctl.c:746 n_tty_ioctl_helper+0x3f/0x350 drivers/tty/tty_ioctl.c:939 n_tty_ioctl+0x43/0x2e0 drivers/tty/n_tty.c:2452 tty_ioctl+0x551/0x13e0 drivers/tty/tty_io.c:2654 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x1a0/0x1030 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7e/0xb0 fs/ioctl.c:692 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457679 RSP: 002b:00007f141dc39c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f141dc3a6d4 RCX: 0000000000457679 RDX: 0000000020000040 RSI: 0000000000005403 RDI: 0000000000000005 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004d19c0 R14: 00000000004c0f13 R15: 0000000000000000 ================================================================== pts pts165: tty_release: tty->count(2) != (#fd's(1) + #kopen's(0))