random: sshd: uninitialized urandom read (32 bytes read) audit: type=1400 audit(1548037026.547:8): avc: denied { map } for pid=1816 comm="syz-executor733" path="/root/syz-executor733390135" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 ================================================================== BUG: KASAN: use-after-free in xfrm6_tunnel_free_spi net/ipv6/xfrm6_tunnel.c:205 [inline] BUG: KASAN: use-after-free in xfrm6_tunnel_destroy+0x4e0/0x560 net/ipv6/xfrm6_tunnel.c:300 Read of size 8 at addr ffff8881cefe49f8 by task kworker/1:1/68 CPU: 1 PID: 68 Comm: kworker/1:1 Not tainted 4.14.94+ #12 Workqueue: events xfrm_state_gc_task Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x10e lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0x88/0x2a5 mm/kasan/report.c:393 Allocated by task 1823: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 __kmalloc+0x143/0x340 mm/slub.c:3760 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] ops_init+0xee/0x3e0 net/core/net_namespace.c:108 setup_net+0x22b/0x520 net/core/net_namespace.c:294 copy_net_ns+0x19b/0x440 net/core/net_namespace.c:418 create_new_namespaces+0x366/0x750 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xa5/0x1e0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2386 [inline] SyS_unshare+0x300/0x690 kernel/fork.c:2336 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 Freed by task 364: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kfree+0xf5/0x310 mm/slub.c:3897 ops_free net/core/net_namespace.c:132 [inline] ops_free_list.part.0+0x1f9/0x330 net/core/net_namespace.c:154 ops_free_list net/core/net_namespace.c:152 [inline] cleanup_net+0x466/0x860 net/core/net_namespace.c:487 process_one_work+0x7c6/0x14e0 kernel/workqueue.c:2114 worker_thread+0x5d7/0x1080 kernel/workqueue.c:2248 kthread+0x310/0x420 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402 The buggy address belongs to the object at ffff8881cefe4200 which belongs to the cache kmalloc-8192 of size 8192 The buggy address is located 2040 bytes inside of 8192-byte region [ffff8881cefe4200, ffff8881cefe6200) The buggy address belongs to the page: page:ffffea00073bf800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000008100(slab|head) raw: 4000000000008100 0000000000000000 0000000000000000 0000000100030003 raw: dead000000000100 dead000000000200 ffff8881da802400 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cefe4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cefe4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881cefe4980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881cefe4a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cefe4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================