RDX: 0000000020000000 RSI: 0000000000005423 RDI: 0000000000000004 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f676fb536d4 R13: 00000000004c1cbc R14: 00000000004d3fa8 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: 31472 Comm: syz-executor5 Not tainted 4.20.0+ #394 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.1+0x8b/0xe0 drivers/tty/tty_ldisc.c:453 tty_set_ldisc+0x2dc/0x6a0 drivers/tty/tty_ldisc.c:578 tiocsetd drivers/tty/tty_io.c:2321 [inline] tty_ioctl+0x39d/0x17d0 drivers/tty/tty_io.c:2581 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:0x4579b9 Code: fd b3 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 b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f676fb52c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f676fb52c90 RCX: 00000000004579b9 RDX: 0000000020000000 RSI: 0000000000005423 RDI: 0000000000000004 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f676fb536d4 R13: 00000000004c1cbc R14: 00000000004d3fa8 R15: 0000000000000005 Allocated by task 31472: 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:551 [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.1+0x8b/0xe0 drivers/tty/tty_ldisc.c:453 tty_set_ldisc+0x2dc/0x6a0 drivers/tty/tty_ldisc.c:578 tiocsetd drivers/tty/tty_io.c:2321 [inline] tty_ioctl+0x39d/0x17d0 drivers/tty/tty_io.c:2581 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 31472: 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.1+0x8b/0xe0 drivers/tty/tty_ldisc.c:453 tty_set_ldisc+0x2dc/0x6a0 drivers/tty/tty_ldisc.c:578 tiocsetd drivers/tty/tty_io.c:2321 [inline] tty_ioctl+0x39d/0x17d0 drivers/tty/tty_io.c:2581 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 ffff8880a0f08d80 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff8880a0f08d80, ffff8880a0f09180) The buggy address belongs to the page: page:ffffea000283c200 count:1 mapcount:0 mapping:ffff88812c3f0ac0 index:0xffff8880a0f08000 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002773088 ffffea0002a5b288 ffff88812c3f0ac0 raw: ffff8880a0f08000 ffff8880a0f08000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a0f08c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0f08d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a0f08d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a0f08e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0f08e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================