================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 Read of size 8 at addr ffff8801c7bfc4a0 by task syz-executor2/12022 CPU: 0 PID: 12022 Comm: syz-executor2 Not tainted 4.9.77-g033d019 #14 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c7a87650 ffffffff81d941c9 ffffea00071efe00 ffff8801c7bfc4a0 0000000000000000 ffff8801c7bfc4a0 ffff8801c7bfc4a0 ffff8801c7a87688 ffffffff8153db93 ffff8801c7bfc4a0 0000000000000008 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x73/0x280 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x275/0x360 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __raw_spin_lock_bh include/linux/spinlock_api_smp.h:137 [inline] [] _raw_spin_lock_bh+0x3a/0x50 kernel/locking/spinlock.c:175 [] spin_lock_bh include/linux/spinlock.h:307 [inline] [] lock_sock_nested+0x43/0x120 net/core/sock.c:2503 [] lock_sock include/net/sock.h:1404 [inline] [] pppol2tp_release+0x50/0x2e0 net/l2tp/l2tp_ppp.c:476 [] sock_release+0x8d/0x1e0 net/socket.c:599 [] sock_close+0x16/0x20 net/socket.c:1046 [] __fput+0x28c/0x6e0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x115/0x190 kernel/task_work.c:116 [] exit_task_work include/linux/task_work.h:21 [inline] [] do_exit+0x7e7/0x2a40 kernel/exit.c:833 [] do_group_exit+0x108/0x320 kernel/exit.c:937 [] get_signal+0x4d4/0x14e0 kernel/signal.c:2317 [] do_signal+0x87/0x1a00 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:156 [] prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] [] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 [] entry_SYSCALL_64_fastpath+0xe6/0xe8 Allocated by task 12032: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:609 __kmalloc+0x11d/0x310 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] sk_prot_alloc+0x101/0x2a0 net/core/sock.c:1338 sk_alloc+0x3a/0x3a0 net/core/sock.c:1394 pppol2tp_create+0x33/0x1f0 net/l2tp/l2tp_ppp.c:534 pppox_create+0xf1/0x200 drivers/net/ppp/pppox.c:121 __sock_create+0x3ab/0x640 net/socket.c:1182 sock_create net/socket.c:1222 [inline] SYSC_socket net/socket.c:1252 [inline] SyS_socket+0xf0/0x1b0 net/socket.c:1232 entry_SYSCALL_64_fastpath+0x29/0xe8 Freed by task 12022: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:582 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0x103/0x300 mm/slub.c:3878 sk_prot_free net/core/sock.c:1377 [inline] __sk_destruct+0x47f/0x570 net/core/sock.c:1455 sk_destruct+0x47/0x80 net/core/sock.c:1463 __sk_free+0x57/0x230 net/core/sock.c:1471 sk_free+0x23/0x30 net/core/sock.c:1482 sock_put include/net/sock.h:1588 [inline] pppol2tp_session_sock_put+0x5a/0x70 net/l2tp/l2tp_ppp.c:271 l2tp_tunnel_closeall+0x254/0x3a0 net/l2tp/l2tp_core.c:1371 l2tp_udp_encap_destroy+0x87/0xe0 net/l2tp/l2tp_core.c:1394 udpv6_destroy_sock+0xb1/0xd0 net/ipv6/udp.c:1336 sk_common_release+0x6b/0x2f0 net/core/sock.c:2727 udp_lib_close+0x15/0x20 include/net/udp.h:203 inet_release+0xfa/0x1d0 net/ipv4/af_inet.c:434 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:437 sock_release+0x8d/0x1e0 net/socket.c:599 sock_close+0x16/0x20 net/socket.c:1046 __fput+0x28c/0x6e0 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x115/0x190 kernel/task_work.c:116 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0xfc/0x120 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 entry_SYSCALL_64_fastpath+0xe6/0xe8 The buggy address belongs to the object at ffff8801c7bfc400 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff8801c7bfc400, ffff8801c7bfcc00) The buggy address belongs to the page: page:ffffea00071efe00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000004080(slab|head) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c7bfc380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c7bfc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c7bfc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c7bfc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c7bfc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================