================================================================== BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x5b7/0x980 include/trace/events/lock.h:13 Read of size 8 at addr ffff8801af54c550 by task syz-executor5/6683 CPU: 0 PID: 6683 Comm: syz-executor5 Not tainted 4.15.0+ #198 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+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 perf_trace_lock_acquire+0x5b7/0x980 include/trace/events/lock.h:13 trace_lock_acquire include/trace/events/lock.h:13 [inline] lock_acquire+0x394/0x580 kernel/locking/lockdep.c:3919 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x31/0x40 kernel/locking/spinlock.c:312 l2tp_session_register+0xe0/0xe20 net/l2tp/l2tp_core.c:322 pppol2tp_connect+0x134b/0x1dd0 net/l2tp/l2tp_ppp.c:761 SYSC_connect+0x213/0x4a0 net/socket.c:1621 SyS_connect+0x24/0x30 net/socket.c:1602 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 RIP: 0023:0xf7f9fc79 RSP: 002b:00000000f779b08c EFLAGS: 00000296 ORIG_RAX: 000000000000016a RAX: ffffffffffffffda RBX: 0000000000000014 RCX: 0000000020e71000 RDX: 0000000000000032 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6683: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3610 kmalloc include/linux/slab.h:499 [inline] kzalloc include/linux/slab.h:688 [inline] l2tp_tunnel_create+0x5e1/0x17f0 net/l2tp/l2tp_core.c:1554 pppol2tp_connect+0x14b7/0x1dd0 net/l2tp/l2tp_ppp.c:707 SYSC_connect+0x213/0x4a0 net/socket.c:1621 SyS_connect+0x24/0x30 net/socket.c:1602 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 Freed by task 4214: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3488 [inline] kfree+0xd6/0x260 mm/slab.c:3803 __rcu_reclaim kernel/rcu/rcu.h:167 [inline] rcu_do_batch kernel/rcu/tree.c:2674 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2933 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2900 [inline] rcu_process_callbacks+0xe94/0x17f0 kernel/rcu/tree.c:2917 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 The buggy address belongs to the object at ffff8801af54c500 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 80 bytes inside of 512-byte region [ffff8801af54c500, ffff8801af54c700) The buggy address belongs to the page: page:ffffea0006bd5300 count:1 mapcount:0 mapping:ffff8801af54c000 index:0xffff8801af54ca00 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801af54c000 ffff8801af54ca00 0000000100000005 raw: ffffea0006c14420 ffffea0006bd1ca0 ffff8801db000940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801af54c400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801af54c480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801af54c500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801af54c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801af54c600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================