audit: type=1400 audit(1565582768.905:152): avc: denied { write } for pid=8941 comm="syz-executor.1" path="socket:[21238]" dev="sockfs" ino=21238 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_fib_lookup_socket permissive=1 ================================================================== BUG: KASAN: use-after-free in ____bpf_clone_redirect net/core/filter.c:1768 [inline] BUG: KASAN: use-after-free in bpf_clone_redirect+0x2a7/0x2b0 net/core/filter.c:1759 Read of size 8 at addr ffff8881c9207090 by task syz-executor.0/8967 CPU: 1 PID: 8967 Comm: syz-executor.0 Not tainted 4.14.138+ #30 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316 ____bpf_clone_redirect net/core/filter.c:1768 [inline] bpf_clone_redirect+0x2a7/0x2b0 net/core/filter.c:1759 ___bpf_prog_run+0x2478/0x5510 kernel/bpf/core.c:1033 Allocated by task 7576: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc.part.0+0x53/0xc0 mm/kasan/common.c:495 slab_post_alloc_hook mm/slab.h:439 [inline] slab_alloc_node mm/slub.c:2758 [inline] slab_alloc mm/slub.c:2766 [inline] kmem_cache_alloc+0xd2/0x2e0 mm/slub.c:2771 kmem_cache_alloc_node include/linux/slab.h:361 [inline] __alloc_skb+0xea/0x5c0 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:980 [inline] kobject_uevent_env+0x6d7/0xc60 lib/kobject_uevent.c:479 device_add+0x9e7/0x13a0 drivers/base/core.c:1856 netdev_register_kobject+0x121/0x31c net/core/net-sysfs.c:1599 register_netdevice+0x83d/0xc90 net/core/dev.c:7668 register_netdev+0x17/0x30 net/core/dev.c:7785 ip6_tnl_init_net+0x414/0x6d0 net/ipv6/ip6_tunnel.c:2246 ops_init+0xad/0x3f0 net/core/net_namespace.c:118 setup_net+0x259/0x550 net/core/net_namespace.c:295 copy_net_ns+0x195/0x480 net/core/net_namespace.c:419 audit: type=1400 audit(1565582769.035:153): avc: denied { connect } for pid=8941 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_fib_lookup_socket permissive=1 create_new_namespaces+0x373/0x760 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xa5/0x1e0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2417 [inline] SyS_unshare+0x34e/0x6c0 kernel/fork.c:2367 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff Freed by task 7576: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x164/0x210 mm/kasan/common.c:457 slab_free_hook mm/slub.c:1403 [inline] slab_free_freelist_hook mm/slub.c:1430 [inline] slab_free mm/slub.c:3005 [inline] kmem_cache_free+0xcb/0x340 mm/slub.c:3021 kfree_skbmem net/core/skbuff.c:586 [inline] kfree_skbmem+0xa0/0x110 net/core/skbuff.c:580 __kfree_skb net/core/skbuff.c:646 [inline] consume_skb+0xe4/0x360 net/core/skbuff.c:705 netlink_broadcast_filtered+0x2c0/0xa00 net/netlink/af_netlink.c:1488 kobject_uevent_env+0x81f/0xc60 lib/kobject_uevent.c:495 device_add+0x9e7/0x13a0 drivers/base/core.c:1856 netdev_register_kobject+0x121/0x31c net/core/net-sysfs.c:1599 register_netdevice+0x83d/0xc90 net/core/dev.c:7668 register_netdev+0x17/0x30 net/core/dev.c:7785 ip6_tnl_init_net+0x414/0x6d0 net/ipv6/ip6_tunnel.c:2246 ops_init+0xad/0x3f0 net/core/net_namespace.c:118 setup_net+0x259/0x550 net/core/net_namespace.c:295 copy_net_ns+0x195/0x480 net/core/net_namespace.c:419 create_new_namespaces+0x373/0x760 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xa5/0x1e0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2417 [inline] SyS_unshare+0x34e/0x6c0 kernel/fork.c:2367 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff The buggy address belongs to the object at ffff8881c9207000 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 144 bytes inside of 224-byte region [ffff8881c9207000, ffff8881c92070e0) The buggy address belongs to the page: page:ffffea00072481c0 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000200(slab) raw: 4000000000000200 0000000000000000 0000000000000000 00000001800c000c raw: dead000000000100 dead000000000200 ffff8881dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c9206f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881c9207000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c9207080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8881c9207100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881c9207180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================