__alloc_pages include/linux/gfp.h:473 [inline] __alloc_pages_node include/linux/gfp.h:486 [inline] kmem_getpages mm/slab.c:1409 [inline] cache_grow_begin+0x91/0x8c0 mm/slab.c:2677 ================================================================== cache_alloc_refill mm/slab.c:3044 [inline] ____cache_alloc mm/slab.c:3127 [inline] slab_alloc_node mm/slab.c:3322 [inline] kmem_cache_alloc_node_trace+0x670/0x740 mm/slab.c:3661 BUG: KASAN: double-free or invalid-free in x25_asy_free+0x37/0x140 drivers/net/wan/x25_asy.c:111 __do_kmalloc_node mm/slab.c:3683 [inline] __kmalloc_node+0x3c/0x70 mm/slab.c:3691 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0x65/0xf0 mm/util.c:416 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] alloc_netdev_mqs+0x17b/0xfe0 net/core/dev.c:8949 x25_asy_alloc drivers/net/wan/x25_asy.c:83 [inline] x25_asy_open_tty+0x551/0x7e7 drivers/net/wan/x25_asy.c:556 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 tty_compat_ioctl+0x89/0x540 drivers/tty/tty_io.c:2800 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline] __ia32_compat_sys_ioctl+0x20e/0x630 fs/compat_ioctl.c:998 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f28a49 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000ffe3b24c EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000005423 RDX: 0000000020000080 RSI: 00000000080d6d40 RDI: 00000000080ecf84 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 CPU: 1 PID: 7937 Comm: syz-executor002 Not tainted 4.20.0 #290 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.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_invalid_free+0x64/0xa0 mm/kasan/report.c:336 __kasan_slab_free+0x13a/0x150 mm/kasan/kasan.c:501 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 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 tty_compat_ioctl+0x89/0x540 drivers/tty/tty_io.c:2800 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline] __ia32_compat_sys_ioctl+0x20e/0x630 fs/compat_ioctl.c:998 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f28a49 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000ffe3b24c EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000005423 RDX: 0000000020000080 RSI: 00000000080d6d40 RDI: 00000000080ecf84 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7937: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3722 [inline] __kmalloc+0x15b/0x770 mm/slab.c:3731 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 tty_compat_ioctl+0x89/0x540 drivers/tty/tty_io.c:2800 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline] __ia32_compat_sys_ioctl+0x20e/0x630 fs/compat_ioctl.c:998 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 7937: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 x25_asy: x25_asy_alloc(): register_netdev() failure 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 x25_asy: x25_asy_alloc(): register_netdev() failure 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 tty_compat_ioctl+0x89/0x540 drivers/tty/tty_io.c:2800 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline] __ia32_compat_sys_ioctl+0x20e/0x630 fs/compat_ioctl.c:998 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 x25_asy: x25_asy_alloc(): register_netdev() failure The buggy address belongs to the object at ffff8881ba69edc0 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff8881ba69edc0, ffff8881ba69f1c0) The buggy address belongs to the page: page:ffffea0006e9a780 count:1 mapcount:0 mapping:ffff8881da800ac0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0006e92688 ffffea0006e92f88 ffff8881da800ac0 x25_asy: x25_asy_alloc(): register_netdev() failure raw: 0000000000000000 ffff8881ba69e040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881ba69ec80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 ffff8881ba69ed00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc CPU: 0 PID: 7951 Comm: syz-executor002 Not tainted 4.20.0 #290 >ffff8881ba69ed80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ^ Call Trace: ffff8881ba69ee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d3/0x2c6 lib/dump_stack.c:113 ffff8881ba69ee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x17 lib/fault-inject.c:149