netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 nf 0/2] netfilter: iptables: Fix null-ptr-deref in ip6?table_nat_table_init().
@ 2024-07-25 19:28 Kuniyuki Iwashima
  2024-07-25 19:28 ` [PATCH v1 nf 1/2] netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init() Kuniyuki Iwashima
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kuniyuki Iwashima @ 2024-07-25 19:28 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik
  Cc: Florian Westphal, Kuniyuki Iwashima, Kuniyuki Iwashima,
	netfilter-devel, coreteam, netdev

We had a report that iptables-restore sometimes triggered null-ptr-deref
at boot time.

The problem is that iptable_nat_table_init() is exposed to user space too
early and accesses net->gen->ptr[iptable_nat_net_ops.id] before allocated.

Patch 1 fixes the issue in iptable_nat, and patch 2 applies the same fix
to ip6table_nat.


Kuniyuki Iwashima (2):
  netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init().
  netfilter: iptables: Fix potential null-ptr-deref in
    ip6table_nat_table_init().

 net/ipv4/netfilter/iptable_nat.c  | 18 ++++++++++--------
 net/ipv6/netfilter/ip6table_nat.c | 14 +++++++++-----
 2 files changed, 19 insertions(+), 13 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-31 21:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 19:28 [PATCH v1 nf 0/2] netfilter: iptables: Fix null-ptr-deref in ip6?table_nat_table_init() Kuniyuki Iwashima
2024-07-25 19:28 ` [PATCH v1 nf 1/2] netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init() Kuniyuki Iwashima
2024-07-25 19:28 ` [PATCH v1 nf 2/2] netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init() Kuniyuki Iwashima
2024-07-26  1:16 ` [PATCH v1 nf 0/2] netfilter: iptables: Fix null-ptr-deref in ip6?table_nat_table_init() Florian Westphal
2024-07-31 21:55 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).