SELinux: unrecognized netlink message: protocol=0 nlmsg_type=16885 sclass=netlink_route_socket pig=8364 comm=syz-executor3 binder: 8288:8375 tried to acquire reference to desc 0, got 1 instead binder: 8288:8375 tried to acquire reference to desc 0, got 1 instead binder: 8288:8292 Release 1 refcount change on invalid ref 0 ret -22 ================================================================== BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xed/0x110 net/l2tp/l2tp_ppp.c:459 Read of size 4 at addr ffff8801cd878f00 by task syz-executor1/8376 CPU: 1 PID: 8376 Comm: syz-executor1 Not tainted 4.9.122-g54068d6 #78 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801a4a079b8 ffffffff81eb8829 ffffea0007361e00 ffff8801cd878f00 0000000000000000 ffff8801cd878f00 ffffffff83019be0 ffff8801a4a079f0 ffffffff8156b6be ffff8801cd878f00 0000000000000004 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x6c/0x234 mm/kasan/report.c:256 [] kasan_report_error mm/kasan/report.c:355 [inline] [] kasan_report.cold.6+0x242/0x2fe mm/kasan/report.c:412 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 [] pppol2tp_session_destruct+0xed/0x110 net/l2tp/l2tp_ppp.c:459 [] __sk_destruct+0x55/0x590 net/core/sock.c:1428 [] sk_destruct+0x63/0x80 net/core/sock.c:1463 [] __sk_free+0x4f/0x220 net/core/sock.c:1471 [] sk_free+0x2b/0x40 net/core/sock.c:1482 [] sock_put include/net/sock.h:1588 [inline] [] pppol2tp_release+0x239/0x2e0 net/l2tp/l2tp_ppp.c:501 [] sock_release+0x96/0x1c0 net/socket.c:600 [] sock_close+0x16/0x20 net/socket.c:1047 [] __fput+0x263/0x700 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x10c/0x180 kernel/task_work.c:116 [] get_signal+0x1133/0x1450 kernel/signal.c:2151 [] do_signal+0x87/0x19f0 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:157 [] prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:260 [inline] [] do_syscall_64+0x364/0x490 arch/x86/entry/common.c:287 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Allocated by task 8297: 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+0xc7/0xe0 mm/kasan/kasan.c:609 __kmalloc+0x11d/0x300 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] kzalloc include/linux/slab.h:636 [inline] l2tp_session_create+0x38/0x16f0 net/l2tp/l2tp_core.c:1843 pppol2tp_connect+0x10d7/0x18f0 net/l2tp/l2tp_ppp.c:718 SYSC_connect+0x1b8/0x300 net/socket.c:1563 SyS_connect+0x24/0x30 net/socket.c:1544 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb Freed by task 8297: 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+0xfb/0x310 mm/slub.c:3878 l2tp_session_free+0x166/0x200 net/l2tp/l2tp_core.c:1770 l2tp_session_dec_refcount_1 net/l2tp/l2tp_core.h:297 [inline] l2tp_tunnel_closeall+0x284/0x350 net/l2tp/l2tp_core.c:1373 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+0x6d/0x300 net/core/sock.c:2727 udp_lib_close+0x15/0x20 include/net/udp.h:203 inet_release+0xff/0x1d0 net/ipv4/af_inet.c:434 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:440 sock_release+0x96/0x1c0 net/socket.c:600 sock_close+0x16/0x20 net/socket.c:1047 __fput+0x263/0x700 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x10c/0x180 kernel/task_work.c:116 get_signal+0x1133/0x1450 kernel/signal.c:2151 do_signal+0x87/0x19f0 arch/x86/kernel/signal.c:807 exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:157 prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] syscall_return_slowpath arch/x86/entry/common.c:260 [inline] do_syscall_64+0x364/0x490 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_swapgs+0x5d/0xdb The buggy address belongs to the object at ffff8801cd878f00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8801cd878f00, ffff8801cd879100) The buggy address belongs to the page: page:ffffea0007361e00 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: ffff8801cd878e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cd878e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801cd878f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cd878f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cd879000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================