* [PATCH 0/3] netfilter fixes for net
@ 2013-06-17 19:34 Pablo Neira Ayuso
2013-06-17 23:14 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2013-06-17 19:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains Netfilter fixes. They are targeted to the
TCP option targets, that have receive some scrinity in the last week. The
changes are:
* Fix TCPOPTSTRIP, it stopped working in the forward chain as tcp_hdr
uses skb->transport_header, and we cannot use that in the forwarding
case, from myself.
* Fix default IPv6 MSS in TCPMSS in case of absence of TCP MSS options,
from Phil Oester.
* Fix missing fragmentation handling again in TCPMSS, from Phil Oester.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
Thanks!
----------------------------------------------------------------
The following changes since commit a8241c63517ec0b900695daa9003cddc41c536a1:
ipvs: info leak in __ip_vs_get_dest_entries() (2013-06-10 14:53:00 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
for you to fetch changes up to b396966c4688522863572927cb30aa874b3ec504:
netfilter: xt_TCPMSS: Fix missing fragmentation handling (2013-06-12 11:06:19 +0200)
----------------------------------------------------------------
Pablo Neira Ayuso (1):
netfilter: xt_TCPOPTSTRIP: don't use tcp_hdr()
Phil Oester (2):
netfilter: xt_TCPMSS: Fix IPv6 default MSS too
netfilter: xt_TCPMSS: Fix missing fragmentation handling
net/netfilter/xt_TCPMSS.c | 25 ++++++++++++++++++-------
net/netfilter/xt_TCPOPTSTRIP.c | 6 ++++--
2 files changed, 22 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] netfilter fixes for net
2013-06-17 19:34 Pablo Neira Ayuso
@ 2013-06-17 23:14 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2013-06-17 23:14 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon, 17 Jun 2013 21:34:36 +0200
> The following patchset contains Netfilter fixes. They are targeted to the
> TCP option targets, that have receive some scrinity in the last week. The
> changes are:
>
> * Fix TCPOPTSTRIP, it stopped working in the forward chain as tcp_hdr
> uses skb->transport_header, and we cannot use that in the forwarding
> case, from myself.
>
> * Fix default IPv6 MSS in TCPMSS in case of absence of TCP MSS options,
> from Phil Oester.
>
> * Fix missing fragmentation handling again in TCPMSS, from Phil Oester.
>
> You can pull these changes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
Pulled, thanks Pablo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] netfilter fixes for net
@ 2013-10-23 9:15 Pablo Neira Ayuso
2013-10-23 20:56 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2013-10-23 9:15 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains three netfilter fixes for your net
tree, they are:
* A couple of fixes to resolve info leak to userspace due to uninitialized
memory area in ulogd, from Mathias Krause.
* Fix instruction ordering issues that may lead to the access of
uninitialized data in x_tables. The problem involves the table update
(producer) and the main packet matching (consumer) routines. Detected in
SMP ARMv7, from Will Deacon.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
Thanks!
----------------------------------------------------------------
The following changes since commit c31eeaced22ce8bd61268a3c595d542bb38c0a4f:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2013-10-01 12:58:48 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
for you to fetch changes up to b416c144f46af1a30ddfa4e4319a8f077381ad63:
netfilter: x_tables: fix ordering of jumpstack allocation and table update (2013-10-22 10:11:29 +0200)
----------------------------------------------------------------
Mathias Krause (2):
netfilter: ebt_ulog: fix info leaks
netfilter: ipt_ULOG: fix info leaks
Will Deacon (1):
netfilter: x_tables: fix ordering of jumpstack allocation and table update
net/bridge/netfilter/ebt_ulog.c | 9 +++------
net/ipv4/netfilter/arp_tables.c | 5 +++++
net/ipv4/netfilter/ip_tables.c | 5 +++++
net/ipv4/netfilter/ipt_ULOG.c | 7 +------
net/ipv6/netfilter/ip6_tables.c | 5 +++++
net/netfilter/x_tables.c | 7 ++++++-
6 files changed, 25 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] netfilter fixes for net
2013-10-23 9:15 [PATCH 0/3] netfilter " Pablo Neira Ayuso
@ 2013-10-23 20:56 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2013-10-23 20:56 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed, 23 Oct 2013 11:15:21 +0200
> The following patchset contains three netfilter fixes for your net
> tree, they are:
>
> * A couple of fixes to resolve info leak to userspace due to uninitialized
> memory area in ulogd, from Mathias Krause.
>
> * Fix instruction ordering issues that may lead to the access of
> uninitialized data in x_tables. The problem involves the table update
> (producer) and the main packet matching (consumer) routines. Detected in
> SMP ARMv7, from Will Deacon.
>
> You can pull these changes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
Pulled, thanks Pablo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2013-12-07 23:13 Pablo Neira Ayuso
2013-12-10 1:43 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2013-12-07 23:13 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains three Netfilter fixes for your net tree,
they are:
* fix incorrect comparison in the new netnet hash ipset type, from
Dave Jones.
* fix splat in hashlimit due to missing removal of the content of its
proc entry in netnamespaces, from Sergey Popovich.
* fix missing rule flushing operation by table in nf_tables. Table
flushing was already discussed back in October but this got lost and
no patch has hit the tree to address this issue so far, from me.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
Thanks!
----------------------------------------------------------------
The following changes since commit 2c7a9dc1641664173211c4ebc5db510a08684c46:
be2net: Avoid programming permenant MAC by BE3-R VFs (2013-11-23 15:11:07 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
for you to fetch changes up to cf9dc09d0949f0b5953fb08caa10bba0dc7ee71f:
netfilter: nf_tables: fix missing rules flushing per table (2013-12-07 22:55:48 +0100)
----------------------------------------------------------------
Dave Jones (1):
netfilter: ipset: fix incorret comparison in hash_netnet4_data_equal()
Pablo Neira Ayuso (1):
netfilter: nf_tables: fix missing rules flushing per table
Sergey Popovich (1):
netfilter: xt_hashlimit: fix proc entry leak in netns destroy path
net/netfilter/ipset/ip_set_hash_netnet.c | 2 +-
net/netfilter/nf_tables_api.c | 46 +++++++++++++++++++++---------
net/netfilter/xt_hashlimit.c | 25 +++++++---------
3 files changed, 45 insertions(+), 28 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2013-12-07 23:13 Pablo Neira Ayuso
@ 2013-12-10 1:43 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2013-12-10 1:43 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Sun, 8 Dec 2013 00:13:27 +0100
> The following patchset contains three Netfilter fixes for your net tree,
> they are:
>
> * fix incorrect comparison in the new netnet hash ipset type, from
> Dave Jones.
>
> * fix splat in hashlimit due to missing removal of the content of its
> proc entry in netnamespaces, from Sergey Popovich.
>
> * fix missing rule flushing operation by table in nf_tables. Table
> flushing was already discussed back in October but this got lost and
> no patch has hit the tree to address this issue so far, from me.
>
> You can pull these changes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
Pulled, thanks Pablo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2014-04-14 22:43 Pablo Neira Ayuso
2014-04-14 23:00 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2014-04-14 22:43 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains three Netfilter fixes for your net tree,
they are:
* Fix missing generation sequence initialization which results in a splat
if lockdep is enabled, it was introduced in the recent works to improve
nf_conntrack scalability, from Andrey Vagin.
* Don't flush the GRE keymap list in nf_conntrack when the pptp helper is
disabled otherwise this crashes due to a double release, from Andrey
Vagin.
* Fix nf_tables cmp fast in big endian, from Patrick McHardy.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thanks!
----------------------------------------------------------------
The following changes since commit 6859e7df6d9045a461412777e63bd8cef12f9705:
netdev: remove potentially harmful checks (2014-04-07 15:52:07 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
for you to fetch changes up to b855d416dc17061ebb271ea7ef1201d100531770:
netfilter: nf_tables: fix nft_cmp_fast failure on big endian for size < 4 (2014-04-14 10:38:02 +0200)
----------------------------------------------------------------
Andrey Vagin (2):
netfilter: nf_conntrack: flush net_gre->keymap_list only from gre helper
netfilter: nf_conntrack: initialize net.ct.generation
Patrick McHardy (1):
netfilter: nf_tables: fix nft_cmp_fast failure on big endian for size < 4
include/linux/netfilter/nf_conntrack_proto_gre.h | 1 -
include/net/netfilter/nf_tables_core.h | 10 ++++++++++
net/netfilter/nf_conntrack_core.c | 1 +
net/netfilter/nf_conntrack_pptp.c | 20 +-------------------
net/netfilter/nf_conntrack_proto_gre.c | 3 +--
net/netfilter/nf_tables_core.c | 3 +--
net/netfilter/nft_cmp.c | 2 +-
7 files changed, 15 insertions(+), 25 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2014-04-14 22:43 Pablo Neira Ayuso
@ 2014-04-14 23:00 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2014-04-14 23:00 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Tue, 15 Apr 2014 00:43:32 +0200
> The following patchset contains three Netfilter fixes for your net tree,
> they are:
>
> * Fix missing generation sequence initialization which results in a splat
> if lockdep is enabled, it was introduced in the recent works to improve
> nf_conntrack scalability, from Andrey Vagin.
>
> * Don't flush the GRE keymap list in nf_conntrack when the pptp helper is
> disabled otherwise this crashes due to a double release, from Andrey
> Vagin.
>
> * Fix nf_tables cmp fast in big endian, from Patrick McHardy.
Pulled, thanks a lot Pablo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2015-05-22 10:34 Pablo Neira Ayuso
2015-05-22 18:33 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2015-05-22 10:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contain Netfilter fixes for your net tree, they are:
1) Fix a race in nfnetlink_log and nfnetlink_queue that can lead to a crash.
This problem is due to wrong order in the per-net registration and netlink
socket events. Patch from Francesco Ruggeri.
2) Make sure that counters that userspace pass us are higher than 0 in all the
x_tables frontends. Discovered via Trinity, patch from Dave Jones.
3) Revert a patch for br_netfilter to rely on the conntrack status bits. This
breaks stateless IPv6 NAT transformations. Patch from Florian Westphal.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thanks!
----------------------------------------------------------------
The following changes since commit 13c3ed6a92724d8c8cb148a14b0ae190ddfe7413:
vxlan: correct typo in call to unregister_netdevice_queue (2015-05-18 16:57:09 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
for you to fetch changes up to faecbb45ebefb20260ad4a631e011e93c896cb73:
Revert "netfilter: bridge: query conntrack about skb dnat" (2015-05-20 13:51:25 +0200)
----------------------------------------------------------------
Dave Jones (1):
netfilter: ensure number of counters is >0 in do_replace()
Florian Westphal (1):
Revert "netfilter: bridge: query conntrack about skb dnat"
Francesco Ruggeri (1):
netfilter: nfnetlink_{log,queue}: Register pernet in first place
include/linux/skbuff.h | 1 +
net/bridge/br_netfilter.c | 27 +++++++++------------------
net/bridge/netfilter/ebtables.c | 4 ++++
net/ipv4/netfilter/arp_tables.c | 6 ++++++
net/ipv4/netfilter/ip_tables.c | 6 ++++++
net/ipv6/netfilter/ip6_tables.c | 6 ++++++
net/netfilter/nfnetlink_log.c | 19 ++++++++++---------
net/netfilter/nfnetlink_queue_core.c | 18 +++++++++---------
8 files changed, 51 insertions(+), 36 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2015-05-22 10:34 Pablo Neira Ayuso
@ 2015-05-22 18:33 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2015-05-22 18:33 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Fri, 22 May 2015 12:34:03 +0200
> The following patchset contain Netfilter fixes for your net tree, they are:
>
> 1) Fix a race in nfnetlink_log and nfnetlink_queue that can lead to a crash.
> This problem is due to wrong order in the per-net registration and netlink
> socket events. Patch from Francesco Ruggeri.
>
> 2) Make sure that counters that userspace pass us are higher than 0 in all the
> x_tables frontends. Discovered via Trinity, patch from Dave Jones.
>
> 3) Revert a patch for br_netfilter to rely on the conntrack status bits. This
> breaks stateless IPv6 NAT transformations. Patch from Florian Westphal.
>
> You can pull these changes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Pulled, thanks Pablo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2015-11-04 14:00 Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 1/3] netfilter: xt_TEE: fix NULL dereference Pablo Neira Ayuso
` (3 more replies)
0 siblings, 4 replies; 24+ messages in thread
From: Pablo Neira Ayuso @ 2015-11-04 14:00 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains Netfilter fixes for your net tree,
they are:
1) Fix crash when TEE target is used with no --oif, from Eric Dumazet.
2) Oneliner to fix a crash on the redirect traffic to localhost
infrastructure when interface has not yet an address, from
Munehisa Kamata.
3) Oneliner not to request module all the time from nfnetlink due to
wrong type value, from Florian Westphal.
I'll make sure these patches 1 and 2 hit -stable.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thanks!
----------------------------------------------------------------
The following changes since commit 104eb270e665f4fcd8cb8c8ab4c4d4538c604e92:
net: sun4i-emac: Properly free resources on probe failure and remove (2015-10-21 19:47:45 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD
for you to fetch changes up to dbc3617f4c1f9fcbe63612048cb9583fea1e11ab:
netfilter: nfnetlink: don't probe module if it exists (2015-10-28 03:40:50 +0100)
----------------------------------------------------------------
Eric Dumazet (1):
netfilter: xt_TEE: fix NULL dereference
Florian Westphal (1):
netfilter: nfnetlink: don't probe module if it exists
Munehisa Kamata (1):
netfilter: nf_nat_redirect: add missing NULL pointer check
net/netfilter/nf_nat_redirect.c | 2 +-
net/netfilter/nfnetlink.c | 2 +-
net/netfilter/xt_TEE.c | 6 ++++--
3 files changed, 6 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/3] netfilter: xt_TEE: fix NULL dereference
2015-11-04 14:00 [PATCH 0/3] Netfilter fixes for net Pablo Neira Ayuso
@ 2015-11-04 14:00 ` Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 2/3] netfilter: nf_nat_redirect: add missing NULL pointer check Pablo Neira Ayuso
` (2 subsequent siblings)
3 siblings, 0 replies; 24+ messages in thread
From: Pablo Neira Ayuso @ 2015-11-04 14:00 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
From: Eric Dumazet <edumazet@google.com>
iptables -I INPUT ... -j TEE --gateway 10.1.2.3
<crash> because --oif was not specified
tee_tg_check() sets ->priv pointer to NULL in this case.
Fixes: bbde9fc1824a ("netfilter: factor out packet duplication for IPv4/IPv6")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/xt_TEE.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c
index fd980aa..c5fdea1 100644
--- a/net/netfilter/xt_TEE.c
+++ b/net/netfilter/xt_TEE.c
@@ -31,8 +31,9 @@ static unsigned int
tee_tg4(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct xt_tee_tginfo *info = par->targinfo;
+ int oif = info->priv ? info->priv->oif : 0;
- nf_dup_ipv4(skb, par->hooknum, &info->gw.in, info->priv->oif);
+ nf_dup_ipv4(skb, par->hooknum, &info->gw.in, oif);
return XT_CONTINUE;
}
@@ -42,8 +43,9 @@ static unsigned int
tee_tg6(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct xt_tee_tginfo *info = par->targinfo;
+ int oif = info->priv ? info->priv->oif : 0;
- nf_dup_ipv6(skb, par->hooknum, &info->gw.in6, info->priv->oif);
+ nf_dup_ipv6(skb, par->hooknum, &info->gw.in6, oif);
return XT_CONTINUE;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/3] netfilter: nf_nat_redirect: add missing NULL pointer check
2015-11-04 14:00 [PATCH 0/3] Netfilter fixes for net Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 1/3] netfilter: xt_TEE: fix NULL dereference Pablo Neira Ayuso
@ 2015-11-04 14:00 ` Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 3/3] netfilter: nfnetlink: don't probe module if it exists Pablo Neira Ayuso
2015-11-05 1:55 ` [PATCH 0/3] Netfilter fixes for net David Miller
3 siblings, 0 replies; 24+ messages in thread
From: Pablo Neira Ayuso @ 2015-11-04 14:00 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
From: Munehisa Kamata <kamatam@amazon.com>
Commit 8b13eddfdf04cbfa561725cfc42d6868fe896f56 ("netfilter: refactor NAT
redirect IPv4 to use it from nf_tables") has introduced a trivial logic
change which can result in the following crash.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: [<ffffffffa033002d>] nf_nat_redirect_ipv4+0x2d/0xa0 [nf_nat_redirect]
PGD 3ba662067 PUD 3ba661067 PMD 0
Oops: 0000 [#1] SMP
Modules linked in: ipv6(E) xt_REDIRECT(E) nf_nat_redirect(E) xt_tcpudp(E) iptable_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) nf_nat(E) nf_conntrack(E) ip_tables(E) x_tables(E) binfmt_misc(E) xfs(E) libcrc32c(E) evbug(E) evdev(E) psmouse(E) i2c_piix4(E) i2c_core(E) acpi_cpufreq(E) button(E) ext4(E) crc16(E) jbd2(E) mbcache(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E)
CPU: 0 PID: 2536 Comm: ip Tainted: G E 4.1.7-15.23.amzn1.x86_64 #1
Hardware name: Xen HVM domU, BIOS 4.2.amazon 05/06/2015
task: ffff8800eb438000 ti: ffff8803ba664000 task.ti: ffff8803ba664000
[...]
Call Trace:
<IRQ>
[<ffffffffa0334065>] redirect_tg4+0x15/0x20 [xt_REDIRECT]
[<ffffffffa02e2e99>] ipt_do_table+0x2b9/0x5e1 [ip_tables]
[<ffffffffa0328045>] iptable_nat_do_chain+0x25/0x30 [iptable_nat]
[<ffffffffa031777d>] nf_nat_ipv4_fn+0x13d/0x1f0 [nf_nat_ipv4]
[<ffffffffa0328020>] ? iptable_nat_ipv4_fn+0x20/0x20 [iptable_nat]
[<ffffffffa031785e>] nf_nat_ipv4_in+0x2e/0x90 [nf_nat_ipv4]
[<ffffffffa03280a5>] iptable_nat_ipv4_in+0x15/0x20 [iptable_nat]
[<ffffffff81449137>] nf_iterate+0x57/0x80
[<ffffffff814491f7>] nf_hook_slow+0x97/0x100
[<ffffffff814504d4>] ip_rcv+0x314/0x400
unsigned int
nf_nat_redirect_ipv4(struct sk_buff *skb,
...
{
...
rcu_read_lock();
indev = __in_dev_get_rcu(skb->dev);
if (indev != NULL) {
ifa = indev->ifa_list;
newdst = ifa->ifa_local; <---
}
rcu_read_unlock();
...
}
Before the commit, 'ifa' had been always checked before access. After the
commit, however, it could be accessed even if it's NULL. Interestingly,
this was once fixed in 2003.
http://marc.info/?l=netfilter-devel&m=106668497403047&w=2
In addition to the original one, we have seen the crash when packets that
need to be redirected somehow arrive on an interface which hasn't been
yet fully configured.
This change just reverts the logic to the old behavior to avoid the crash.
Fixes: 8b13eddfdf04 ("netfilter: refactor NAT redirect IPv4 to use it from nf_tables")
Signed-off-by: Munehisa Kamata <kamatam@amazon.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_nat_redirect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_nat_redirect.c b/net/netfilter/nf_nat_redirect.c
index 97b75f9..d438698 100644
--- a/net/netfilter/nf_nat_redirect.c
+++ b/net/netfilter/nf_nat_redirect.c
@@ -55,7 +55,7 @@ nf_nat_redirect_ipv4(struct sk_buff *skb,
rcu_read_lock();
indev = __in_dev_get_rcu(skb->dev);
- if (indev != NULL) {
+ if (indev && indev->ifa_list) {
ifa = indev->ifa_list;
newdst = ifa->ifa_local;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/3] netfilter: nfnetlink: don't probe module if it exists
2015-11-04 14:00 [PATCH 0/3] Netfilter fixes for net Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 1/3] netfilter: xt_TEE: fix NULL dereference Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 2/3] netfilter: nf_nat_redirect: add missing NULL pointer check Pablo Neira Ayuso
@ 2015-11-04 14:00 ` Pablo Neira Ayuso
2015-11-05 1:55 ` [PATCH 0/3] Netfilter fixes for net David Miller
3 siblings, 0 replies; 24+ messages in thread
From: Pablo Neira Ayuso @ 2015-11-04 14:00 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
From: Florian Westphal <fw@strlen.de>
nfnetlink_bind request_module()s all the time as nfnetlink_get_subsys()
shifts the argument by 8 to obtain the subsys id.
So using type instead of type << 8 always returns NULL.
Fixes: 03292745b02d11 ("netlink: add nlk->netlink_bind hook for module auto-loading")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nfnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 70277b1..27b93da 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -492,7 +492,7 @@ static int nfnetlink_bind(struct net *net, int group)
type = nfnl_group2type[group];
rcu_read_lock();
- ss = nfnetlink_get_subsys(type);
+ ss = nfnetlink_get_subsys(type << 8);
rcu_read_unlock();
if (!ss)
request_module("nfnetlink-subsys-%d", type);
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2015-11-04 14:00 [PATCH 0/3] Netfilter fixes for net Pablo Neira Ayuso
` (2 preceding siblings ...)
2015-11-04 14:00 ` [PATCH 3/3] netfilter: nfnetlink: don't probe module if it exists Pablo Neira Ayuso
@ 2015-11-05 1:55 ` David Miller
3 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2015-11-05 1:55 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed, 4 Nov 2015 15:00:35 +0100
> The following patchset contains Netfilter fixes for your net tree,
> they are:
>
> 1) Fix crash when TEE target is used with no --oif, from Eric Dumazet.
>
> 2) Oneliner to fix a crash on the redirect traffic to localhost
> infrastructure when interface has not yet an address, from
> Munehisa Kamata.
>
> 3) Oneliner not to request module all the time from nfnetlink due to
> wrong type value, from Florian Westphal.
>
> I'll make sure these patches 1 and 2 hit -stable.
Pulled.
Since net-next got merged, and I fast-forwarded net to Linus's
tree, there were some minor conflicts.
Please double check my work.
Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2016-04-13 22:54 Pablo Neira Ayuso
2016-04-14 1:51 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-13 22:54 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains Netfilter fixes for your net tree. More
specifically, they are:
1) Fix missing filter table per-netns registration in arptables, from
Florian Westphal.
2) Resolve out of bound access when parsing TCP options in
nf_conntrack_tcp, patch from Jozsef Kadlecsik.
3) Prefer NFPROTO_BRIDGE extensions over NFPROTO_UNSPEC in ebtables,
this resolves conflict between xt_limit and ebt_limit, from Phil Sutter.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thanks!
----------------------------------------------------------------
The following changes since commit 0a1a37b6d62e6864a77a82e925217c720f91f963:
net: add the AF_KCM entries to family name tables (2016-04-06 16:59:01 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD
for you to fetch changes up to bcf4934288402be3464110109a4dae3bd6fb3e93:
netfilter: ebtables: Fix extension lookup with identical name (2016-04-13 01:16:57 +0200)
----------------------------------------------------------------
Florian Westphal (1):
netfilter: arp_tables: register table in initns
Jozsef Kadlecsik (1):
netfilter: nf_conntrack_tcp: Fix stack out of bounds when parsing TCP options
Phil Sutter (1):
netfilter: ebtables: Fix extension lookup with identical name
net/bridge/netfilter/ebtables.c | 6 +++++-
net/ipv4/netfilter/arptable_filter.c | 6 ++++++
net/netfilter/nf_conntrack_proto_tcp.c | 4 ++++
3 files changed, 15 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2016-04-13 22:54 Pablo Neira Ayuso
@ 2016-04-14 1:51 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2016-04-14 1:51 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Thu, 14 Apr 2016 00:54:51 +0200
> The following patchset contains Netfilter fixes for your net tree. More
> specifically, they are:
>
> 1) Fix missing filter table per-netns registration in arptables, from
> Florian Westphal.
>
> 2) Resolve out of bound access when parsing TCP options in
> nf_conntrack_tcp, patch from Jozsef Kadlecsik.
>
> 3) Prefer NFPROTO_BRIDGE extensions over NFPROTO_UNSPEC in ebtables,
> this resolves conflict between xt_limit and ebt_limit, from Phil Sutter.
>
> You can pull these changes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Pulled, thanks Pablo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2016-05-09 19:52 Pablo Neira Ayuso
2016-05-10 4:50 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2016-05-09 19:52 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contain Netfilter simple fixes for your net tree,
two one-liner and one two-liner:
1) Oneliner to fix missing spinlock definition that triggers
'BUG: spinlock bad magic on CPU#' when spinlock debugging is enabled,
from Florian Westphal.
2) Fix missing workqueue cancelation on IDLETIMER removal,
from Liping Zhang.
3) Fix insufficient validation of netlink of NFACCT_QUOTA in
nfnetlink_acct, from Phil Turnbull.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thanks!
----------------------------------------------------------------
The following changes since commit f28f20da704d399fb1e4d8838ffd697a357d9cc8:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2016-04-26 16:25:51 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD
for you to fetch changes up to eda3fc50daa93b08774a18d51883c5a5d8d85e15:
netfilter: nfnetlink_acct: validate NFACCT_QUOTA parameter (2016-05-05 16:47:08 +0200)
----------------------------------------------------------------
Florian Westphal (1):
netfilter: conntrack: init all_locks to avoid debug warning
Liping Zhang (1):
netfilter: IDLETIMER: fix race condition when destroy the target
Phil Turnbull (1):
netfilter: nfnetlink_acct: validate NFACCT_QUOTA parameter
net/netfilter/nf_conntrack_core.c | 2 +-
net/netfilter/nfnetlink_acct.c | 2 ++
net/netfilter/xt_IDLETIMER.c | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2016-05-09 19:52 Pablo Neira Ayuso
@ 2016-05-10 4:50 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2016-05-10 4:50 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon, 9 May 2016 21:52:00 +0200
> The following patchset contain Netfilter simple fixes for your net tree,
> two one-liner and one two-liner:
>
> 1) Oneliner to fix missing spinlock definition that triggers
> 'BUG: spinlock bad magic on CPU#' when spinlock debugging is enabled,
> from Florian Westphal.
>
> 2) Fix missing workqueue cancelation on IDLETIMER removal,
> from Liping Zhang.
>
> 3) Fix insufficient validation of netlink of NFACCT_QUOTA in
> nfnetlink_acct, from Phil Turnbull.
Pulled, thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2018-01-05 15:08 Pablo Neira Ayuso
2018-01-05 15:33 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2018-01-05 15:08 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains Netfilter fixes for your net tree,
they are:
1) Fix chain filtering when dumping rules via nf_tables_dump_rules().
2) Fix accidental change in NF_CT_STATE_UNTRACKED_BIT through uapi,
introduced when removing the untracked conntrack object, from
Florian Westphal.
3) Fix potential nul-dereference when releasing dump filter in
nf_tables_dump_obj_done(), patch from Hangbin Liu.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thanks!
----------------------------------------------------------------
The following changes since commit b4681c2829e24943aadd1a7bb3a30d41d0a20050:
ipv4: Fix use-after-free when flushing FIB tables (2017-12-20 15:12:39 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD
for you to fetch changes up to 8bea728dce8972e534e6b99fd550f7b5cc3864e8:
netfilter: nf_tables: fix potential NULL-ptr deref in nf_tables_dump_obj_done() (2017-12-26 17:16:47 +0100)
----------------------------------------------------------------
Florian Westphal (1):
netfilter: uapi: correct UNTRACKED conntrack state bit number
Hangbin Liu (1):
netfilter: nf_tables: fix potential NULL-ptr deref in nf_tables_dump_obj_done()
Pablo Neira Ayuso (1):
netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()
include/uapi/linux/netfilter/nf_conntrack_common.h | 2 +-
net/netfilter/nf_tables_api.c | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2018-01-05 15:08 Pablo Neira Ayuso
@ 2018-01-05 15:33 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2018-01-05 15:33 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Fri, 5 Jan 2018 16:08:22 +0100
> The following patchset contains Netfilter fixes for your net tree,
> they are:
>
> 1) Fix chain filtering when dumping rules via nf_tables_dump_rules().
>
> 2) Fix accidental change in NF_CT_STATE_UNTRACKED_BIT through uapi,
> introduced when removing the untracked conntrack object, from
> Florian Westphal.
>
> 3) Fix potential nul-dereference when releasing dump filter in
> nf_tables_dump_obj_done(), patch from Hangbin Liu.
>
> You can pull these changes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Pulled, thanks Pablo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2019-06-17 22:42 Pablo Neira Ayuso
0 siblings, 0 replies; 24+ messages in thread
From: Pablo Neira Ayuso @ 2019-06-17 22:42 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
1) Module autoload for masquerade and redirection does not work.
2) Leak in unqueued packets in nf_ct_frag6_queue(). Ignore duplicated
fragments, pretend they are placed into the queue. Patches from
Guillaume Nault.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thanks!
----------------------------------------------------------------
The following changes since commit 100f6d8e09905c59be45b6316f8f369c0be1b2d8:
net: correct zerocopy refcnt with udp MSG_MORE (2019-05-30 15:54:04 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD
for you to fetch changes up to 8a3dca632538c550930ce8bafa8c906b130d35cf:
netfilter: ipv6: nf_defrag: accept duplicate fragments again (2019-06-07 14:49:01 +0200)
----------------------------------------------------------------
Guillaume Nault (2):
netfilter: ipv6: nf_defrag: fix leakage of unqueued fragments
netfilter: ipv6: nf_defrag: accept duplicate fragments again
Pablo Neira Ayuso (1):
netfilter: nf_tables: fix module autoload with inet family
net/ipv6/netfilter/nf_conntrack_reasm.c | 22 ++++++++++++----------
net/netfilter/nft_masq.c | 3 +--
net/netfilter/nft_redir.c | 3 +--
3 files changed, 14 insertions(+), 14 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] Netfilter fixes for net
@ 2020-05-27 22:40 Pablo Neira Ayuso
2020-05-28 17:54 ` David Miller
0 siblings, 1 reply; 24+ messages in thread
From: Pablo Neira Ayuso @ 2020-05-27 22:40 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev, kuba
Hi,
The following patchset contains Netfilter fixes for net:
1) Uninitialized when used in __nf_conntrack_update(), from
Nathan Chancellor.
2) Comparison of unsigned expression in nf_confirm_cthelper().
3) Remove 'const' type qualifier with no effect.
This batch is addressing fallout from the previous pull request.
Please, pull this updates from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Thank you.
----------------------------------------------------------------
The following changes since commit a4976a3ef844c510ae9120290b23e9f3f47d6bce:
crypto: chelsio/chtls: properly set tp->lsndtime (2020-05-26 23:24:00 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD
for you to fetch changes up to 4946ea5c1237036155c3b3a24f049fd5f849f8f6:
netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build (2020-05-27 13:39:08 +0200)
----------------------------------------------------------------
Nathan Chancellor (1):
netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update
Pablo Neira Ayuso (2):
netfilter: conntrack: comparison of unsigned in cthelper confirmation
netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build
include/linux/netfilter/nf_conntrack_pptp.h | 2 +-
net/netfilter/nf_conntrack_core.c | 8 ++++----
net/netfilter/nf_conntrack_pptp.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/3] Netfilter fixes for net
2020-05-27 22:40 Pablo Neira Ayuso
@ 2020-05-28 17:54 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2020-05-28 17:54 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev, kuba
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Thu, 28 May 2020 00:40:15 +0200
> The following patchset contains Netfilter fixes for net:
>
> 1) Uninitialized when used in __nf_conntrack_update(), from
> Nathan Chancellor.
>
> 2) Comparison of unsigned expression in nf_confirm_cthelper().
>
> 3) Remove 'const' type qualifier with no effect.
>
> This batch is addressing fallout from the previous pull request.
>
> Please, pull this updates from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
Pulled, thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2020-05-28 17:54 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 14:00 [PATCH 0/3] Netfilter fixes for net Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 1/3] netfilter: xt_TEE: fix NULL dereference Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 2/3] netfilter: nf_nat_redirect: add missing NULL pointer check Pablo Neira Ayuso
2015-11-04 14:00 ` [PATCH 3/3] netfilter: nfnetlink: don't probe module if it exists Pablo Neira Ayuso
2015-11-05 1:55 ` [PATCH 0/3] Netfilter fixes for net David Miller
-- strict thread matches above, loose matches on Subject: below --
2020-05-27 22:40 Pablo Neira Ayuso
2020-05-28 17:54 ` David Miller
2019-06-17 22:42 Pablo Neira Ayuso
2018-01-05 15:08 Pablo Neira Ayuso
2018-01-05 15:33 ` David Miller
2016-05-09 19:52 Pablo Neira Ayuso
2016-05-10 4:50 ` David Miller
2016-04-13 22:54 Pablo Neira Ayuso
2016-04-14 1:51 ` David Miller
2015-05-22 10:34 Pablo Neira Ayuso
2015-05-22 18:33 ` David Miller
2014-04-14 22:43 Pablo Neira Ayuso
2014-04-14 23:00 ` David Miller
2013-12-07 23:13 Pablo Neira Ayuso
2013-12-10 1:43 ` David Miller
2013-10-23 9:15 [PATCH 0/3] netfilter " Pablo Neira Ayuso
2013-10-23 20:56 ` David Miller
2013-06-17 19:34 Pablo Neira Ayuso
2013-06-17 23:14 ` David Miller
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).