================================================================== BUG: KASAN: use-after-free in rht_key_hashfn include/linux/rhashtable.h:159 [inline] BUG: KASAN: use-after-free in __rhashtable_lookup include/linux/rhashtable.h:603 [inline] BUG: KASAN: use-after-free in rhashtable_lookup include/linux/rhashtable.h:645 [inline] BUG: KASAN: use-after-free in rhashtable_lookup_fast include/linux/rhashtable.h:671 [inline] BUG: KASAN: use-after-free in ila_lookup_wildcards net/ipv6/ila/ila_xlat.c:133 [inline] BUG: KASAN: use-after-free in ila_xlat_addr net/ipv6/ila/ila_xlat.c:650 [inline] BUG: KASAN: use-after-free in ila_nf_input+0xcdb/0xe30 net/ipv6/ila/ila_xlat.c:191 Read of size 4 at addr ffff888061de3448 by task kworker/u4:1/21 CPU: 1 PID: 21 Comm: kworker/u4:1 Not tainted 5.3.0+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:618 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 rht_key_hashfn include/linux/rhashtable.h:159 [inline] __rhashtable_lookup include/linux/rhashtable.h:603 [inline] rhashtable_lookup include/linux/rhashtable.h:645 [inline] rhashtable_lookup_fast include/linux/rhashtable.h:671 [inline] ila_lookup_wildcards net/ipv6/ila/ila_xlat.c:133 [inline] ila_xlat_addr net/ipv6/ila/ila_xlat.c:650 [inline] ila_nf_input+0xcdb/0xe30 net/ipv6/ila/ila_xlat.c:191 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline] nf_hook_slow+0xbc/0x1e0 net/netfilter/core.c:512 nf_hook include/linux/netfilter.h:260 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] ipv6_rcv+0x25d/0x420 net/ipv6/ip6_input.c:274 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:5010 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5124 process_backlog+0x206/0x750 net/core/dev.c:5955 napi_poll net/core/dev.c:6392 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6460 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:nf_hook_entry_head+0x130/0x1c0 net/netfilter/core.c:290 Code: e8 b5 1b a0 fb 44 89 e6 bf 04 00 00 00 e8 28 1d a0 fb 41 83 fc 04 77 7a e8 9d 1b a0 fb 4f 8d ac e6 10 0f 00 00 e9 12 ff ff ff 8b 1b a0 fb 44 89 e6 bf 04 00 00 00 e8 fe 1c a0 fb 41 83 fc 04 RSP: 0018:ffff8880a9a0faf0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 000000000000000a RCX: ffffffff85d272ba RDX: 000000000000000a RSI: 000000000000000a RDI: 0000000000000005 RBP: ffff8880a9a0fb10 R08: ffff8880a9a00580 R09: fffffbfff14ef12e R10: fffffbfff14ef12d R11: ffffffff8a77896f R12: 0000000000000000 R13: 0000000000000000 R14: ffff88806a082340 R15: dffffc0000000000 __nf_unregister_net_hook+0x84/0x480 net/netfilter/core.c:392 nf_unregister_net_hook+0x5e/0xb0 net/netfilter/core.c:431 nf_unregister_net_hooks+0x3d/0x60 net/netfilter/core.c:499 ila_xlat_exit_net+0x23f/0x352 net/ipv6/ila/ila_xlat.c:629 ila_exit_net+0x16/0x20 net/ipv6/ila/ila_main.c:76 ops_exit_list.isra.0+0xaa/0x150 net/core/net_namespace.c:172 cleanup_net+0x4e2/0xa60 net/core/net_namespace.c:594 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 25694: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:493 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:466 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:507 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3622 kmalloc_node include/linux/slab.h:595 [inline] kvmalloc_node+0xbd/0x100 mm/util.c:459 kvmalloc include/linux/mm.h:670 [inline] kvzalloc include/linux/mm.h:678 [inline] bucket_table_alloc+0x90/0x480 lib/rhashtable.c:175 rhashtable_init+0x3f4/0x7b0 lib/rhashtable.c:1054 ila_xlat_init_net+0x1df/0x2f0 net/ipv6/ila/ila_xlat.c:615 ila_init_net+0x16/0x20 net/ipv6/ila/ila_main.c:64 ops_init+0xb3/0x420 net/core/net_namespace.c:137 setup_net+0x2cc/0x880 net/core/net_namespace.c:334 copy_net_ns+0x290/0x41f net/core/net_namespace.c:475 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:202 ksys_unshare+0x444/0x980 kernel/fork.c:2823 __do_sys_unshare kernel/fork.c:2891 [inline] __se_sys_unshare kernel/fork.c:2889 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2889 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 21: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:455 kasan_slab_free+0xe/0x10 mm/kasan/common.c:463 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 kvfree+0x61/0x70 mm/util.c:488 bucket_table_free+0x69/0x150 lib/rhashtable.c:105 rhashtable_free_and_destroy+0x162/0x8b0 lib/rhashtable.c:1152 ila_xlat_exit_net+0x1a4/0x352 net/ipv6/ila/ila_xlat.c:624 ila_exit_net+0x16/0x20 net/ipv6/ila/ila_main.c:76 ops_exit_list.isra.0+0xaa/0x150 net/core/net_namespace.c:172 cleanup_net+0x4e2/0xa60 net/core/net_namespace.c:594 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff888061de3440 which belongs to the cache kmalloc-32k of size 32768 The buggy address is located 8 bytes inside of 32768-byte region [ffff888061de3440, ffff888061deb440) The buggy address belongs to the page: page:ffffea0001877800 refcount:1 mapcount:0 mapping:ffff8880aa402540 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00013c1008 ffffea00018bac08 ffff8880aa402540 raw: 0000000000000000 ffff888061de3440 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888061de3300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888061de3380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888061de3400: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888061de3480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888061de3500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================