RDX: 0000000020000080 RSI: 0000000000005423 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb602ab06d4 R13: 00000000004c2040 R14: 00000000004d4270 R15: 0000000000000005 ================================================================== BUG: KASAN: double-free or invalid-free in x25_asy_free+0x37/0x140 drivers/net/wan/x25_asy.c:111 CPU: 0 PID: 9998 Comm: syz-executor2 Not tainted 4.20.0+ #176 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+0x1d3/0x2c6 lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff mm/kasan/report.c:187 kasan_report_invalid_free+0x64/0xa0 mm/kasan/report.c:278 __kasan_slab_free+0x13a/0x150 mm/kasan/common.c:423 kasan_slab_free+0xe/0x10 mm/kasan/common.c:452 __cache_free mm/slab.c:3485 [inline] kfree+0xcf/0x230 mm/slab.c:3804 x25_asy_free+0x37/0x140 drivers/net/wan/x25_asy.c:111 x25_asy_open_tty+0x6ad/0x7e7 drivers/net/wan/x25_asy.c:572 tty_ldisc_open.isra.0+0x8b/0xe0 drivers/tty/tty_ldisc.c:460 tty_set_ldisc+0x2d3/0x6a0 drivers/tty/tty_ldisc.c:587 tiocsetd drivers/tty/tty_io.c:2323 [inline] tty_ioctl+0x39d/0x17d0 drivers/tty/tty_io.c:2583 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/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+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457ec9 Code: 6d 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 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fb602aafc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fb602aafc90 RCX: 0000000000457ec9 RDX: 0000000020000080 RSI: 0000000000005423 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb602ab06d4 R13: 00000000004c2040 R14: 00000000004d4270 R15: 0000000000000005 Allocated by task 9998: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] kasan_kmalloc+0xcb/0xd0 mm/kasan/common.c:482 __do_kmalloc mm/slab.c:3709 [inline] __kmalloc+0x15d/0x760 mm/slab.c:3718 kmalloc include/linux/slab.h:550 [inline] x25_asy_open drivers/net/wan/x25_asy.c:465 [inline] x25_asy_open_tty+0x32a/0x7e7 drivers/net/wan/x25_asy.c:570 tty_ldisc_open.isra.0+0x8b/0xe0 drivers/tty/tty_ldisc.c:460 tty_set_ldisc+0x2d3/0x6a0 drivers/tty/tty_ldisc.c:587 tiocsetd drivers/tty/tty_io.c:2323 [inline] tty_ioctl+0x39d/0x17d0 drivers/tty/tty_io.c:2583 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/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+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9998: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:444 kasan_slab_free+0xe/0x10 mm/kasan/common.c:452 __cache_free mm/slab.c:3485 [inline] kfree+0xcf/0x230 mm/slab.c:3804 x25_asy_open drivers/net/wan/x25_asy.c:489 [inline] x25_asy_open_tty+0x6a0/0x7e7 drivers/net/wan/x25_asy.c:570 tty_ldisc_open.isra.0+0x8b/0xe0 drivers/tty/tty_ldisc.c:460 tty_set_ldisc+0x2d3/0x6a0 drivers/tty/tty_ldisc.c:587 tiocsetd drivers/tty/tty_io.c:2323 [inline] tty_ioctl+0x39d/0x17d0 drivers/tty/tty_io.c:2583 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/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+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888095920040 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff888095920040, ffff888095920440) The buggy address belongs to the page: page:ffffea0002564800 count:1 mapcount:0 mapping:ffff88812c3f0ac0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00028cfe88 ffffea00025dbf08 ffff88812c3f0ac0 raw: 0000000000000000 ffff888095920040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809591ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809591ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888095920000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888095920080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888095920100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================