================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 kernel/locking/lockdep.c:3310 Read of size 8 at addr ffff8801cf6c12f8 by task syz-executor1/17692 CPU: 1 PID: 17692 Comm: syz-executor1 Not tainted 4.16.0-rc3+ #336 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/0x24d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23b/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __lock_acquire+0x3d4d/0x3e00 kernel/locking/lockdep.c:3310 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __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+0x1345/0x1dd0 net/l2tp/l2tp_ppp.c:761 SYSC_connect+0x213/0x4a0 net/socket.c:1639 SyS_connect+0x24/0x30 net/socket.c:1620 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453d69 RSP: 002b:00007f04d56abc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f04d56ac6d4 RCX: 0000000000453d69 RDX: 000000000000002e RSI: 0000000020e92000 RDI: 000000000000001e RBP: 000000000072bf58 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000005c R14: 00000000006f0940 R15: 0000000000000001 Allocated by task 17692: 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:552 kmem_cache_alloc_trace+0x136/0x740 mm/slab.c:3607 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] l2tp_tunnel_create+0x5e1/0x17f0 net/l2tp/l2tp_core.c:1545 pppol2tp_connect+0x14b1/0x1dd0 net/l2tp/l2tp_ppp.c:707 SYSC_connect+0x213/0x4a0 net/socket.c:1639 SyS_connect+0x24/0x30 net/socket.c:1620 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 9246: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kfree+0xd9/0x260 mm/slab.c:3800 __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 ffff8801cf6c12c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 56 bytes inside of 512-byte region [ffff8801cf6c12c0, ffff8801cf6c14c0) The buggy address belongs to the page: page:ffffea00073db040 count:1 mapcount:0 mapping:ffff8801cf6c1040 index:0xffff8801cf6c1a40 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cf6c1040 ffff8801cf6c1a40 0000000100000002 raw: ffffea000738f3a0 ffffea0006fe9520 ffff8801dac00940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cf6c1180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cf6c1200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801cf6c1280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8801cf6c1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cf6c1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================