GS:   sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000
GDTR:                           limit=0x0000ffff, base=0x0000000000000000
LDTR: sel=0x0000, attr=0x00082, limit=0x0000ffff, base=0x0000000000000000
==================================================================
IDTR:                           limit=0x0000ffff, base=0x0000000000000000
BUG: KASAN: use-after-free in xfrm6_tunnel_free_spi net/ipv6/xfrm6_tunnel.c:208 [inline]
BUG: KASAN: use-after-free in xfrm6_tunnel_destroy+0x4e4/0x560 net/ipv6/xfrm6_tunnel.c:303
Read of size 8 at addr ffff88804c425080 by task kworker/1:5/7994

CPU: 1 PID: 7994 Comm: kworker/1:5 Not tainted 4.14.229-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events xfrm_state_gc_task
TR:   sel=0x0000, attr=0x0008b, limit=0x0000ffff, base=0x0000000000000000
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
EFER =     0x0000000000000000  PAT = 0x0007040600070406
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 xfrm6_tunnel_free_spi net/ipv6/xfrm6_tunnel.c:208 [inline]
 xfrm6_tunnel_destroy+0x4e4/0x560 net/ipv6/xfrm6_tunnel.c:303
 xfrm_state_gc_destroy net/xfrm/xfrm_state.c:449 [inline]
 xfrm_state_gc_task+0x4ad/0x7e0 net/xfrm/xfrm_state.c:472
DebugCtl = 0x0000000000000000  DebugExceptions = 0x0000000000000000
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
Interruptibility = 00000000  ActivityState = 00000000
*** Host State ***
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
RIP = 0xffffffff811601fe  RSP = 0xffff88804ba579b8
 kthread+0x30d/0x420 kernel/kthread.c:232
CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

FSBase=00007f6768169700 GSBase=ffff8880ba400000 TRBase=fffffe0000003000
Allocated by task 7967:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15a/0x400 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 ops_init+0xeb/0x3e0 net/core/net_namespace.c:108
GDTBase=fffffe0000001000 IDTBase=fffffe0000000000
 setup_net+0x22f/0x530 net/core/net_namespace.c:295
 copy_net_ns+0x19b/0x440 net/core/net_namespace.c:419
 create_new_namespaces+0x375/0x720 kernel/nsproxy.c:107
 unshare_nsproxy_namespaces+0xa1/0x1d0 kernel/nsproxy.c:206
CR0=0000000080050033 CR3=00000000b04a5000 CR4=00000000001426f0
 SYSC_unshare kernel/fork.c:2412 [inline]
 SyS_unshare+0x308/0x7f0 kernel/fork.c:2362
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 34:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 ops_free+0x182/0x2a0 net/core/net_namespace.c:132
Sysenter RSP=fffffe0000003000 CS:RIP=0010:ffffffff87401690
 ops_free_list net/core/net_namespace.c:154 [inline]
 ops_free_list net/core/net_namespace.c:148 [inline]
 cleanup_net+0x464/0x840 net/core/net_namespace.c:488
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

The buggy address belongs to the object at ffff88804c425080
 which belongs to the cache kmalloc-8192 of size 8192
The buggy address is located 0 bytes inside of
 8192-byte region [ffff88804c425080, ffff88804c427080)
The buggy address belongs to the page:
EFER = 0x0000000000000d01  PAT = 0x0407050600070106
page:ffffea0001310900 count:1 mapcount:0 mapping:ffff88804c425080 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff88804c425080 0000000000000000 0000000100000001
raw: ffffea0001310720 ffffea0001311220 ffff88813fe09080 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88804c424f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
*** Control State ***
 ffff88804c425000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88804c425080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88804c425100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
PinBased=0000003f CPUBased=b6a1edfa SecondaryExec=000000e3
 ffff88804c425180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================