Skip to content

netfilter: iptables: Fix null-ptr-deref in ip6?table_nat_table_init().

Kuniyuki Iwashima netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init().net/ipv4/netfilter/iptable_nat.c+10 -80 replies
2/2netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init().net/ipv6/netfilter/ip6table_nat.c+9 -50 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFlorian Westphal
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 nf 0/2] netfilter: iptables: Fix null-ptr-deref in ip6?table_nat_table_init().

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(-)
Signature · 1 line
2.30.2