linux/net/netfilter
Pablo Neira Ayuso 6a42cefb25 netfilter: nft_chain_nat: inet family is missing module ownership
Set owner to THIS_MODULE, otherwise the nft_chain_nat module might be
removed while there are still inet/nat chains in place.

[  117.942096] BUG: unable to handle page fault for address: ffffffffa0d5e040
[  117.942101] #PF: supervisor read access in kernel mode
[  117.942103] #PF: error_code(0x0000) - not-present page
[  117.942106] PGD 200c067 P4D 200c067 PUD 200d063 PMD 3dc909067 PTE 0
[  117.942113] Oops: 0000 [#1] PREEMPT SMP PTI
[  117.942118] CPU: 3 PID: 27 Comm: kworker/3:0 Not tainted 5.6.0-rc3+ #348
[  117.942133] Workqueue: events nf_tables_trans_destroy_work [nf_tables]
[  117.942145] RIP: 0010:nf_tables_chain_destroy.isra.0+0x94/0x15a [nf_tables]
[  117.942149] Code: f6 45 54 01 0f 84 d1 00 00 00 80 3b 05 74 44 48 8b 75 e8 48 c7 c7 72 be de a0 e8 56 e6 2d e0 48 8b 45 e8 48 c7 c7 7f be de a0 <48> 8b 30 e8 43 e6 2d e0 48 8b 45 e8 48 8b 40 10 48 85 c0 74 5b 8b
[  117.942152] RSP: 0018:ffffc9000015be10 EFLAGS: 00010292
[  117.942155] RAX: ffffffffa0d5e040 RBX: ffff88840be87fc2 RCX: 0000000000000007
[  117.942158] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffffffffa0debe7f
[  117.942160] RBP: ffff888403b54b50 R08: 0000000000001482 R09: 0000000000000004
[  117.942162] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8883eda7e540
[  117.942164] R13: dead000000000122 R14: dead000000000100 R15: ffff888403b3db80
[  117.942167] FS:  0000000000000000(0000) GS:ffff88840e4c0000(0000) knlGS:0000000000000000
[  117.942169] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  117.942172] CR2: ffffffffa0d5e040 CR3: 00000003e4c52002 CR4: 00000000001606e0
[  117.942174] Call Trace:
[  117.942188]  nf_tables_trans_destroy_work.cold+0xd/0x12 [nf_tables]
[  117.942196]  process_one_work+0x1d6/0x3b0
[  117.942200]  worker_thread+0x45/0x3c0
[  117.942203]  ? process_one_work+0x3b0/0x3b0
[  117.942210]  kthread+0x112/0x130
[  117.942214]  ? kthread_create_worker_on_cpu+0x40/0x40
[  117.942221]  ret_from_fork+0x35/0x40

nf_tables_chain_destroy() crashes on module_put() because the module is
gone.

Fixes: d164385ec5 ("netfilter: nat: add inet family nat support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-03-06 18:00:43 +01:00
..
ipset netfilter: ipset: Fix forceadd evaluation path 2020-02-22 12:13:45 +01:00
ipvs ipvs: fix spelling mistake "to" -> "too" 2020-01-24 08:12:06 +01:00
core.c
Kconfig
Makefile nf_tables: Add set type for arbitrary concatenation of ranges 2020-01-27 08:54:30 +01:00
nf_conncount.c
nf_conntrack_acct.c
nf_conntrack_amanda.c
nf_conntrack_broadcast.c
nf_conntrack_core.c netfilter: conntrack: allow insertion of clashing entries 2020-02-17 10:55:14 +01:00
nf_conntrack_ecache.c
nf_conntrack_expect.c
nf_conntrack_extend.c
nf_conntrack_ftp.c
nf_conntrack_h323_asn1.c
nf_conntrack_h323_main.c
nf_conntrack_h323_types.c
nf_conntrack_helper.c
nf_conntrack_irc.c
nf_conntrack_labels.c
nf_conntrack_netbios_ns.c
nf_conntrack_netlink.c
nf_conntrack_pptp.c
nf_conntrack_proto_dccp.c netfilter: conntrack: dccp, sctp: handle null timeout argument 2020-01-08 23:31:22 +01:00
nf_conntrack_proto_generic.c
nf_conntrack_proto_gre.c
nf_conntrack_proto_icmp.c
nf_conntrack_proto_icmpv6.c
nf_conntrack_proto_sctp.c netfilter: conntrack: sctp: use distinct states for new SCTP connections 2020-01-24 18:26:53 +01:00
nf_conntrack_proto_tcp.c
nf_conntrack_proto_udp.c netfilter: conntrack: allow insertion of clashing entries 2020-02-17 10:55:14 +01:00
nf_conntrack_proto.c
nf_conntrack_sane.c
nf_conntrack_seqadj.c
nf_conntrack_sip.c
nf_conntrack_snmp.c
nf_conntrack_standalone.c netfilter: nf_conntrack: ct_cpu_seq_next should increase position index 2020-03-04 02:27:18 +01:00
nf_conntrack_tftp.c
nf_conntrack_timeout.c
nf_conntrack_timestamp.c
nf_dup_netdev.c
nf_flow_table_core.c netfilter: flowtable: Fix missing flush hardware on table free 2020-01-31 19:31:41 +01:00
nf_flow_table_inet.c
nf_flow_table_ip.c netfilter: flowtable: refresh flow if hardware offload fails 2020-01-16 15:51:52 +01:00
nf_flow_table_offload.c netfilter: flowtable: skip offload setup if disabled 2020-02-07 15:53:32 +01:00
nf_internals.h
nf_log_common.c
nf_log_netdev.c
nf_log.c
nf_nat_amanda.c
nf_nat_core.c
nf_nat_ftp.c
nf_nat_helper.c
nf_nat_irc.c
nf_nat_masquerade.c
nf_nat_proto.c netfilter: nat: fix ICMP header corruption on ICMP errors 2020-01-16 15:08:25 +01:00
nf_nat_redirect.c
nf_nat_sip.c
nf_nat_tftp.c
nf_queue.c
nf_sockopt.c
nf_synproxy_core.c netfilter: synproxy: synproxy_cpu_seq_next should increase position index 2020-03-04 02:27:18 +01:00
nf_tables_api.c netfilter: nf_tables: fix infinite loop when expr is not available 2020-03-05 12:56:33 +01:00
nf_tables_core.c
nf_tables_offload.c netfilter: nf_tables_offload: fix check the chain offload flag 2020-01-24 20:54:11 +01:00
nf_tables_set_core.c nf_tables: Add set type for arbitrary concatenation of ranges 2020-01-27 08:54:30 +01:00
nf_tables_trace.c
nfnetlink_acct.c
nfnetlink_cthelper.c netfilter: cthelper: add missing attribute validation for cthelper 2020-03-04 02:28:08 +01:00
nfnetlink_cttimeout.c
nfnetlink_log.c
nfnetlink_osf.c
nfnetlink_queue.c net: netfilter: use skb_list_walk_safe helper for gso segments 2020-01-14 11:48:41 -08:00
nfnetlink.c netfilter: nf_tables: autoload modules from the abort path 2020-01-24 20:54:29 +01:00
nft_bitwise.c netfilter: bitwise: add support for shifts. 2020-01-16 15:52:02 +01:00
nft_byteorder.c
nft_chain_filter.c
nft_chain_nat.c netfilter: nft_chain_nat: inet family is missing module ownership 2020-03-06 18:00:43 +01:00
nft_chain_route.c
nft_cmp.c
nft_compat.c
nft_connlimit.c
nft_counter.c
nft_ct.c
nft_dup_netdev.c
nft_dynset.c netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attribute 2020-01-27 08:54:30 +01:00
nft_exthdr.c
nft_fib_inet.c
nft_fib_netdev.c
nft_fib.c
nft_flow_offload.c netfilter: nft_flow_offload: fix underflow in flowtable reference counter 2020-01-05 10:06:22 +01:00
nft_fwd_netdev.c
nft_hash.c
nft_immediate.c
nft_limit.c
nft_log.c
nft_lookup.c
nft_masq.c
nft_meta.c netfilter: nft_meta: add support for slave device ifindex matching 2019-12-26 17:41:34 +01:00
nft_nat.c
nft_numgen.c
nft_objref.c
nft_osf.c netfilter: nft_osf: add missing check for DREG attribute 2020-01-18 21:18:41 +01:00
nft_payload.c netfilter: nft_payload: add missing attribute validation for payload csum flags 2020-03-04 02:28:17 +01:00
nft_queue.c
nft_quota.c
nft_range.c
nft_redir.c
nft_reject_inet.c
nft_reject.c
nft_rt.c
nft_set_bitmap.c netfilter: nf_tables: white-space fixes. 2020-01-16 15:51:55 +01:00
nft_set_hash.c netfilter: nf_tables: white-space fixes. 2020-01-16 15:51:55 +01:00
nft_set_pipapo.c nft_set_pipapo: Actually fetch key data in nft_pipapo_remove() 2020-02-26 14:33:09 +01:00
nft_set_rbtree.c netfilter: nf_tables: Support for sets with multiple ranged fields 2020-01-27 08:54:30 +01:00
nft_socket.c
nft_synproxy.c
nft_tproxy.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf 2019-12-26 13:11:40 -08:00
nft_tunnel.c netfilter: nft_tunnel: add missing attribute validation for tunnels 2020-03-04 02:28:25 +01:00
nft_xfrm.c
utils.c
x_tables.c netfilter: x_tables: xt_mttg_seq_next should increase position index 2020-03-04 02:27:18 +01:00
xt_addrtype.c
xt_AUDIT.c
xt_bpf.c
xt_cgroup.c
xt_CHECKSUM.c
xt_CLASSIFY.c
xt_cluster.c
xt_comment.c
xt_connbytes.c
xt_connlabel.c
xt_connlimit.c
xt_connmark.c
xt_CONNSECMARK.c
xt_conntrack.c
xt_cpu.c
xt_CT.c
xt_dccp.c
xt_devgroup.c
xt_dscp.c
xt_DSCP.c
xt_ecn.c
xt_esp.c
xt_hashlimit.c netfilter: xt_hashlimit: unregister proc file before releasing mutex 2020-02-26 23:25:07 +01:00
xt_helper.c
xt_hl.c
xt_HL.c
xt_HMARK.c
xt_IDLETIMER.c
xt_ipcomp.c
xt_iprange.c
xt_ipvs.c
xt_l2tp.c
xt_LED.c
xt_length.c
xt_limit.c
xt_LOG.c
xt_mac.c
xt_mark.c
xt_MASQUERADE.c
xt_multiport.c
xt_nat.c
xt_NETMAP.c
xt_nfacct.c
xt_NFLOG.c
xt_NFQUEUE.c
xt_osf.c
xt_owner.c
xt_physdev.c
xt_pkttype.c
xt_policy.c
xt_quota.c
xt_rateest.c
xt_RATEEST.c
xt_realm.c
xt_recent.c netfilter: xt_recent: recent_seq_next should increase position index 2020-03-04 02:27:18 +01:00
xt_REDIRECT.c
xt_repldata.h
xt_sctp.c
xt_SECMARK.c
xt_set.c
xt_socket.c
xt_state.c
xt_statistic.c
xt_string.c
xt_tcpmss.c
xt_TCPMSS.c
xt_TCPOPTSTRIP.c
xt_tcpudp.c
xt_TEE.c
xt_time.c
xt_TPROXY.c
xt_TRACE.c
xt_u32.c