================================================================== 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 ffff888091ad2c88 by task kworker/u4:2/29 CPU: 1 PID: 29 Comm: kworker/u4:2 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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:756 [inline] RIP: 0010:kfree+0x239/0x2c0 mm/slab.c:3757 Code: 55 7e 0f 85 20 fe ff ff e8 b4 e0 53 ff e9 16 fe ff ff e8 9a 83 cb ff 48 83 3d 72 91 46 07 00 0f 84 85 00 00 00 48 89 df 57 9d <0f> 1f 44 00 00 5b 41 5c 41 5d 41 5e 5d c3 e8 74 83 cb ff 48 83 3d RSP: 0018:ffff8880a9abfa98 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: 0000000000000286 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000286 RBP: ffff8880a9abfab8 R08: 1ffffffff14ef13e R09: fffffbfff14ef13f R10: fffffbfff14ef13e R11: ffffffff8a7789f7 R12: ffff888091ad2c80 R13: ffff8880aa402540 R14: ffffffff81981361 R15: dffffc0000000000 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 Allocated by task 19605: 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 29: 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 ffff888091ad2c80 which belongs to the cache kmalloc-32k of size 32768 The buggy address is located 8 bytes inside of 32768-byte region [ffff888091ad2c80, ffff888091adac80) The buggy address belongs to the page: page:ffffea000246b400 refcount:1 mapcount:0 mapping:ffff8880aa402540 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000249a808 ffffea000229fc08 ffff8880aa402540 raw: 0000000000000000 ffff888091ad2c80 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091ad2b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888091ad2c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888091ad2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888091ad2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091ad2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================