------------[ cut here ]------------ hook not found, pf 3 num 0 WARNING: CPU: 1 PID: 31 at net/netfilter/core.c:480 __nf_unregister_net_hook+0x17c/0x4f0 net/netfilter/core.c:480 Modules linked in: CPU: 1 PID: 31 Comm: kworker/u4:3 Not tainted 5.12.0-syzkaller-14459-g322a3b843d7f #0 Hardware name: linux,dummy-virt (DT) Workqueue: netns cleanup_net pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) pc : __nf_unregister_net_hook+0x17c/0x4f0 net/netfilter/core.c:480 lr : __nf_unregister_net_hook+0x17c/0x4f0 net/netfilter/core.c:480 sp : ffff8000183c79e0 x29: ffff8000183c79e0 x28: 0000000000000003 x27: 0000000000000001 x26: ffff00000acc0f10 x25: 0000000000000007 x24: ffff00000d48ba1c x23: ffff800017132f20 x22: ffff00000acc0000 x21: 0000000000000001 x20: ffff00000fd76620 x19: ffff00000d48ba00 x18: ffff00006aaf1b48 x17: 0000000000000000 x16: 0000000000000007 x15: ffff00006aaf1b7c x14: 1ffff00003078e6a x13: 0000000000000001 x12: ffff60000d562784 x11: 1fffe0000d562783 x10: ffff60000d562783 x9 : dfff800000000000 x8 : ffff00006ab13c1b x7 : 0000000000000001 x6 : 00009ffff2a9d87d x5 : ffff00006ab13c18 x4 : 1fffe0000120f9d9 x3 : dfff800000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff00000907cec0 Call trace: __nf_unregister_net_hook+0x17c/0x4f0 net/netfilter/core.c:480 nf_unregister_net_hook net/netfilter/core.c:502 [inline] nf_unregister_net_hooks+0xd4/0x120 net/netfilter/core.c:576 arpt_unregister_table_pre_exit+0x6c/0x8c net/ipv4/netfilter/arp_tables.c:1565 arptable_filter_net_pre_exit+0x20/0x2c net/ipv4/netfilter/arptable_filter.c:57 ops_pre_exit_list net/core/net_namespace.c:165 [inline] cleanup_net+0x328/0x820 net/core/net_namespace.c:583 process_one_work+0x798/0x1764 kernel/workqueue.c:2275 worker_thread+0x3d4/0xcd0 kernel/workqueue.c:2421 kthread+0x320/0x3bc kernel/kthread.c:313 ret_from_fork+0x10/0x3c arch/arm64/kernel/entry.S:1006 irq event stamp: 102018 hardirqs last enabled at (102017): [] console_unlock+0x7f8/0xbf4 kernel/printk/printk.c:2668 hardirqs last disabled at (102018): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:241 softirqs last enabled at (101848): [] _stext+0x9e0/0x1084 softirqs last disabled at (101839): [] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (101839): [] invoke_softirq kernel/softirq.c:440 [inline] softirqs last disabled at (101839): [] __irq_exit_rcu+0x494/0x550 kernel/softirq.c:637 ---[ end trace b9d7845d21116d32 ]--- netdevsim netdevsim0 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 device hsr_slave_0 left promiscuous mode device hsr_slave_1 left promiscuous mode device veth1_macvtap left promiscuous mode device veth0_macvtap left promiscuous mode device veth1_vlan left promiscuous mode device veth0_vlan left promiscuous mode bond0 (unregistering): (slave bond_slave_1): Releasing backup interface bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond0 (unregistering): Released all slaves ================================================================== BUG: KASAN: use-after-free in hooks_validate+0x164/0x1ac net/netfilter/core.c:177 Read of size 4 at addr ffff00000a679048 by task kworker/u4:3/31 CPU: 1 PID: 31 Comm: kworker/u4:3 Tainted: G W 5.12.0-syzkaller-14459-g322a3b843d7f #0 Hardware name: linux,dummy-virt (DT) Workqueue: netns cleanup_net Call trace: ptrauth_strip_insn_pac arch/arm64/include/asm/pointer_auth.h:95 [inline] dump_backtrace+0x0/0x3e0 arch/arm64/kernel/stacktrace.c:133 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:215 __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x120/0x1a8 lib/dump_stack.c:120 print_address_description.constprop.0+0x2c/0x300 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x1ec/0x200 mm/kasan/report.c:436 __asan_report_load4_noabort+0x34/0x60 mm/kasan/report_generic.c:308 hooks_validate+0x164/0x1ac net/netfilter/core.c:177 __nf_hook_entries_try_shrink+0x1d4/0x2c4 net/netfilter/core.c:260 __nf_unregister_net_hook+0x240/0x4f0 net/netfilter/core.c:483 nf_unregister_net_hook+0xb8/0x100 net/netfilter/core.c:502 clusterip_net_exit+0x13c/0x204 net/ipv4/netfilter/ipt_CLUSTERIP.c:853 ops_exit_list+0x78/0x124 net/core/net_namespace.c:175 cleanup_net+0x3a4/0x820 net/core/net_namespace.c:595 process_one_work+0x798/0x1764 kernel/workqueue.c:2275 worker_thread+0x3d4/0xcd0 kernel/workqueue.c:2421 kthread+0x320/0x3bc kernel/kthread.c:313 ret_from_fork+0x10/0x3c arch/arm64/kernel/entry.S:1006 Allocated by task 3289: kasan_save_stack+0x28/0x60 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:428 [inline] ____kasan_kmalloc mm/kasan/common.c:507 [inline] __kasan_kmalloc+0x8c/0xb0 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:246 [inline] __kmalloc_node+0x234/0x590 mm/slub.c:4115 kmalloc_node include/linux/slab.h:579 [inline] __vmalloc_area_node mm/vmalloc.c:2781 [inline] __vmalloc_node_range+0x5cc/0x7f0 mm/vmalloc.c:2915 __vmalloc_node mm/vmalloc.c:2963 [inline] __vmalloc+0xd4/0x1a0 mm/vmalloc.c:2977 bpf_prog_alloc_no_stats+0x40/0x2e0 kernel/bpf/core.c:85 bpf_prog_alloc+0x24/0x170 kernel/bpf/core.c:119 bpf_prog_create_from_user+0x94/0x650 net/core/filter.c:1413 seccomp_prepare_filter kernel/seccomp.c:664 [inline] seccomp_prepare_user_filter kernel/seccomp.c:701 [inline] seccomp_set_mode_filter kernel/seccomp.c:1811 [inline] do_seccomp+0x5c4/0x1f30 kernel/seccomp.c:1931 prctl_set_seccomp+0x3c/0x70 kernel/seccomp.c:1984 __do_sys_prctl kernel/sys.c:2371 [inline] __se_sys_prctl kernel/sys.c:2289 [inline] __arm64_sys_prctl+0x9a4/0xfd0 kernel/sys.c:2289 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x6c/0x260 arch/arm64/kernel/syscall.c:52 el0_svc_common.constprop.0+0xc4/0x1e4 arch/arm64/kernel/syscall.c:145 do_el0_svc+0xa4/0xd0 arch/arm64/kernel/syscall.c:184 el0_svc+0x24/0x3c arch/arm64/kernel/entry-common.c:422 el0_sync_handler+0x1a4/0x1b0 arch/arm64/kernel/entry-common.c:438 el0_sync+0x18c/0x1c0 arch/arm64/kernel/entry.S:743 Freed by task 31: kasan_save_stack+0x28/0x60 mm/kasan/common.c:38 kasan_set_track+0x28/0x40 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x50 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xfc/0x150 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1581 [inline] slab_free_freelist_hook+0x140/0x264 mm/slub.c:1606 slab_free mm/slub.c:3166 [inline] kfree+0x154/0x7d0 mm/slub.c:4225 xt_unregister_table+0x1cc/0x2ec net/netfilter/x_tables.c:1501 __arpt_unregister_table+0x44/0x1b4 net/ipv4/netfilter/arp_tables.c:1488 arpt_unregister_table+0x30/0x40 net/ipv4/netfilter/arp_tables.c:1574 arptable_filter_net_exit+0x18/0x24 net/ipv4/netfilter/arptable_filter.c:62 ops_exit_list+0x78/0x124 net/core/net_namespace.c:175 cleanup_net+0x3a4/0x820 net/core/net_namespace.c:595 process_one_work+0x798/0x1764 kernel/workqueue.c:2275 worker_thread+0x3d4/0xcd0 kernel/workqueue.c:2421 kthread+0x320/0x3bc kernel/kthread.c:313 ret_from_fork+0x10/0x3c arch/arm64/kernel/entry.S:1006 The buggy address belongs to the object at ffff00000a679000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 72 bytes inside of 128-byte region [ffff00000a679000, ffff00000a679080) The buggy address belongs to the page: page:00000000695083cf refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4a679 flags: 0x1ffc00000000200(slab|node=0|zone=0|lastcpupid=0x7ff) raw: 01ffc00000000200 0000000000000000 0000000200000001 ffff000008802300 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff00000a678f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff00000a678f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff00000a679000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff00000a679080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff00000a679100: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================