<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net/ipv4/netfilter, branch v3.15.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>netfilter: ipv4: defrag: set local_df flag on defragmented skb</title>
<updated>2014-05-04T11:23:28+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2014-05-02T13:32:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=895162b1101b3ea5db08ca6822ae9672717efec0'/>
<id>895162b1101b3ea5db08ca6822ae9672717efec0</id>
<content type='text'>
else we may fail to forward skb even if original fragments do fit
outgoing link mtu:

1. remote sends 2k packets in two 1000 byte frags, DF set
2. we want to forward but only see '2k &gt; mtu and DF set'
3. we then send icmp error saying that outgoing link is 1500

But original sender never sent a packet that would not fit
the outgoing link.

Setting local_df makes outgoing path test size vs.
IPCB(skb)-&gt;frag_max_size, so we will still send the correct
error in case the largest original size did not fit
outgoing link mtu.

Reported-by: Maxime Bizon &lt;mbizon@freebox.fr&gt;
Suggested-by: Maxime Bizon &lt;mbizon@freebox.fr&gt;
Fixes: 5f2d04f1f9 (ipv4: fix path MTU discovery with connection tracking)
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
else we may fail to forward skb even if original fragments do fit
outgoing link mtu:

1. remote sends 2k packets in two 1000 byte frags, DF set
2. we want to forward but only see '2k &gt; mtu and DF set'
3. we then send icmp error saying that outgoing link is 1500

But original sender never sent a packet that would not fit
the outgoing link.

Setting local_df makes outgoing path test size vs.
IPCB(skb)-&gt;frag_max_size, so we will still send the correct
error in case the largest original size did not fit
outgoing link mtu.

Reported-by: Maxime Bizon &lt;mbizon@freebox.fr&gt;
Suggested-by: Maxime Bizon &lt;mbizon@freebox.fr&gt;
Fixes: 5f2d04f1f9 (ipv4: fix path MTU discovery with connection tracking)
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv4, fib: pass LOOPBACK_IFINDEX instead of 0 to flowi4_iif</title>
<updated>2014-04-16T19:05:11+00:00</updated>
<author>
<name>Cong Wang</name>
<email>cwang@twopensource.com</email>
</author>
<published>2014-04-15T23:25:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6a662719c9868b3d6c7d26b3a085f0cd3cc15e64'/>
<id>6a662719c9868b3d6c7d26b3a085f0cd3cc15e64</id>
<content type='text'>
As suggested by Julian:

	Simply, flowi4_iif must not contain 0, it does not
	look logical to ignore all ip rules with specified iif.

because in fib_rule_match() we do:

        if (rule-&gt;iifindex &amp;&amp; (rule-&gt;iifindex != fl-&gt;flowi_iif))
                goto out;

flowi4_iif should be LOOPBACK_IFINDEX by default.

We need to move LOOPBACK_IFINDEX to include/net/flow.h:

1) It is mostly used by flowi_iif

2) Fix the following compile error if we use it in flow.h
by the patches latter:

In file included from include/linux/netfilter.h:277:0,
                 from include/net/netns/netfilter.h:5,
                 from include/net/net_namespace.h:21,
                 from include/linux/netdevice.h:43,
                 from include/linux/icmpv6.h:12,
                 from include/linux/ipv6.h:61,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from init/do_mounts.c:32:
include/net/flow.h: In function ‘flowi4_init_output’:
include/net/flow.h:84:32: error: ‘LOOPBACK_IFINDEX’ undeclared (first use in this function)

Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As suggested by Julian:

	Simply, flowi4_iif must not contain 0, it does not
	look logical to ignore all ip rules with specified iif.

because in fib_rule_match() we do:

        if (rule-&gt;iifindex &amp;&amp; (rule-&gt;iifindex != fl-&gt;flowi_iif))
                goto out;

flowi4_iif should be LOOPBACK_IFINDEX by default.

We need to move LOOPBACK_IFINDEX to include/net/flow.h:

1) It is mostly used by flowi_iif

2) Fix the following compile error if we use it in flow.h
by the patches latter:

In file included from include/linux/netfilter.h:277:0,
                 from include/net/netns/netfilter.h:5,
                 from include/net/net_namespace.h:21,
                 from include/linux/netdevice.h:43,
                 from include/linux/icmpv6.h:12,
                 from include/linux/ipv6.h:61,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from init/do_mounts.c:32:
include/net/flow.h: In function ‘flowi4_init_output’:
include/net/flow.h:84:32: error: ‘LOOPBACK_IFINDEX’ undeclared (first use in this function)

Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: Can't fail and free after table replacement</title>
<updated>2014-04-05T15:46:22+00:00</updated>
<author>
<name>Thomas Graf</name>
<email>tgraf@suug.ch</email>
</author>
<published>2014-04-04T15:57:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c58dd2dd443c26d856a168db108a0cd11c285bf3'/>
<id>c58dd2dd443c26d856a168db108a0cd11c285bf3</id>
<content type='text'>
All xtables variants suffer from the defect that the copy_to_user()
to copy the counters to user memory may fail after the table has
already been exchanged and thus exposed. Return an error at this
point will result in freeing the already exposed table. Any
subsequent packet processing will result in a kernel panic.

We can't copy the counters before exposing the new tables as we
want provide the counter state after the old table has been
unhooked. Therefore convert this into a silent error.

Cc: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All xtables variants suffer from the defect that the copy_to_user()
to copy the counters to user memory may fail after the table has
already been exchanged and thus exposed. Return an error at this
point will result in freeing the already exposed table. Any
subsequent packet processing will result in a kernel panic.

We can't copy the counters before exposing the new tables as we
want provide the counter state after the old table has been
unhooked. Therefore convert this into a silent error.

Cc: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches</title>
<updated>2014-02-14T10:37:36+00:00</updated>
<author>
<name>FX Le Bail</name>
<email>fx.lebail@yahoo.com</email>
</author>
<published>2014-02-11T14:49:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2b7a79bae2dc0327af2352e1d1793b9d752648aa'/>
<id>2b7a79bae2dc0327af2352e1d1793b9d752648aa</id>
<content type='text'>
The solution was found by Patrick in 2.4 kernel sources.

Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Francois-Xavier Le Bail &lt;fx.lebail@yahoo.com&gt;
Acked-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The solution was found by Patrick in 2.4 kernel sources.

Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Francois-Xavier Le Bail &lt;fx.lebail@yahoo.com&gt;
Acked-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_tables: add reject module for NFPROTO_INET</title>
<updated>2014-02-06T08:44:18+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2014-02-05T15:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=05513e9e33dbded8124567466a444d32173eecc6'/>
<id>05513e9e33dbded8124567466a444d32173eecc6</id>
<content type='text'>
Add a reject module for NFPROTO_INET. It does nothing but dispatch
to the AF-specific modules based on the hook family.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a reject module for NFPROTO_INET. It does nothing but dispatch
to the AF-specific modules based on the hook family.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nft_reject: split up reject module into IPv4 and IPv6 specifc parts</title>
<updated>2014-02-06T08:44:10+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2014-02-05T15:03:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cc4723ca316742891954efa346298e7c747c0d17'/>
<id>cc4723ca316742891954efa346298e7c747c0d17</id>
<content type='text'>
Currently the nft_reject module depends on symbols from ipv6. This is
wrong since no generic module should force IPv6 support to be loaded.
Split up the module into AF-specific and a generic part.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the nft_reject module depends on symbols from ipv6. This is
wrong since no generic module should force IPv6 support to be loaded.
Split up the module into AF-specific and a generic part.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_nat_h323: fix crash in nf_ct_unlink_expect_report()</title>
<updated>2014-02-05T16:46:05+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2014-02-03T12:07:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=829d9315c46a2be57a8fb40c89aeb7db61513d96'/>
<id>829d9315c46a2be57a8fb40c89aeb7db61513d96</id>
<content type='text'>
Similar bug fixed in SIP module in 3f509c6 ("netfilter: nf_nat_sip: fix
incorrect handling of EBUSY for RTCP expectation").

BUG: unable to handle kernel paging request at 00100104
IP: [&lt;f8214f07&gt;] nf_ct_unlink_expect_report+0x57/0xf0 [nf_conntrack]
...
Call Trace:
  [&lt;c0244bd8&gt;] ? del_timer+0x48/0x70
  [&lt;f8215687&gt;] nf_ct_remove_expectations+0x47/0x60 [nf_conntrack]
  [&lt;f8211c99&gt;] nf_ct_delete_from_lists+0x59/0x90 [nf_conntrack]
  [&lt;f8212e5e&gt;] death_by_timeout+0x14e/0x1c0 [nf_conntrack]
  [&lt;f8212d10&gt;] ? nf_conntrack_set_hashsize+0x190/0x190 [nf_conntrack]
  [&lt;c024442d&gt;] call_timer_fn+0x1d/0x80
  [&lt;c024461e&gt;] run_timer_softirq+0x18e/0x1a0
  [&lt;f8212d10&gt;] ? nf_conntrack_set_hashsize+0x190/0x190 [nf_conntrack]
  [&lt;c023e6f3&gt;] __do_softirq+0xa3/0x170
  [&lt;c023e650&gt;] ? __local_bh_enable+0x70/0x70
  &lt;IRQ&gt;
  [&lt;c023e587&gt;] ? irq_exit+0x67/0xa0
  [&lt;c0202af6&gt;] ? do_IRQ+0x46/0xb0
  [&lt;c027ad05&gt;] ? clockevents_notify+0x35/0x110
  [&lt;c066ac6c&gt;] ? common_interrupt+0x2c/0x40
  [&lt;c056e3c1&gt;] ? cpuidle_enter_state+0x41/0xf0
  [&lt;c056e6fb&gt;] ? cpuidle_idle_call+0x8b/0x100
  [&lt;c02085f8&gt;] ? arch_cpu_idle+0x8/0x30
  [&lt;c027314b&gt;] ? cpu_idle_loop+0x4b/0x140
  [&lt;c0273258&gt;] ? cpu_startup_entry+0x18/0x20
  [&lt;c066056d&gt;] ? rest_init+0x5d/0x70
  [&lt;c0813ac8&gt;] ? start_kernel+0x2ec/0x2f2
  [&lt;c081364f&gt;] ? repair_env_string+0x5b/0x5b
  [&lt;c0813269&gt;] ? i386_start_kernel+0x33/0x35

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar bug fixed in SIP module in 3f509c6 ("netfilter: nf_nat_sip: fix
incorrect handling of EBUSY for RTCP expectation").

BUG: unable to handle kernel paging request at 00100104
IP: [&lt;f8214f07&gt;] nf_ct_unlink_expect_report+0x57/0xf0 [nf_conntrack]
...
Call Trace:
  [&lt;c0244bd8&gt;] ? del_timer+0x48/0x70
  [&lt;f8215687&gt;] nf_ct_remove_expectations+0x47/0x60 [nf_conntrack]
  [&lt;f8211c99&gt;] nf_ct_delete_from_lists+0x59/0x90 [nf_conntrack]
  [&lt;f8212e5e&gt;] death_by_timeout+0x14e/0x1c0 [nf_conntrack]
  [&lt;f8212d10&gt;] ? nf_conntrack_set_hashsize+0x190/0x190 [nf_conntrack]
  [&lt;c024442d&gt;] call_timer_fn+0x1d/0x80
  [&lt;c024461e&gt;] run_timer_softirq+0x18e/0x1a0
  [&lt;f8212d10&gt;] ? nf_conntrack_set_hashsize+0x190/0x190 [nf_conntrack]
  [&lt;c023e6f3&gt;] __do_softirq+0xa3/0x170
  [&lt;c023e650&gt;] ? __local_bh_enable+0x70/0x70
  &lt;IRQ&gt;
  [&lt;c023e587&gt;] ? irq_exit+0x67/0xa0
  [&lt;c0202af6&gt;] ? do_IRQ+0x46/0xb0
  [&lt;c027ad05&gt;] ? clockevents_notify+0x35/0x110
  [&lt;c066ac6c&gt;] ? common_interrupt+0x2c/0x40
  [&lt;c056e3c1&gt;] ? cpuidle_enter_state+0x41/0xf0
  [&lt;c056e6fb&gt;] ? cpuidle_idle_call+0x8b/0x100
  [&lt;c02085f8&gt;] ? arch_cpu_idle+0x8/0x30
  [&lt;c027314b&gt;] ? cpu_idle_loop+0x4b/0x140
  [&lt;c0273258&gt;] ? cpu_startup_entry+0x18/0x20
  [&lt;c066056d&gt;] ? rest_init+0x5d/0x70
  [&lt;c0813ac8&gt;] ? start_kernel+0x2ec/0x2f2
  [&lt;c081364f&gt;] ? repair_env_string+0x5b/0x5b
  [&lt;c0813269&gt;] ? i386_start_kernel+0x33/0x35

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_tables: fix error path in the init functions</title>
<updated>2014-01-09T22:25:48+00:00</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-01-09T19:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cf4dfa85395ebe2769267a072b39e48301669842'/>
<id>cf4dfa85395ebe2769267a072b39e48301669842</id>
<content type='text'>
We have to unregister chain type if this fails to register netns.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have to unregister chain type if this fails to register netns.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_tables: rename nft_do_chain_pktinfo() to nft_do_chain()</title>
<updated>2014-01-09T19:17:16+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2014-01-09T18:42:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3876d22dba62ebf6582f33e1ef2160eeb95e1129'/>
<id>3876d22dba62ebf6582f33e1ef2160eeb95e1129</id>
<content type='text'>
We don't encode argument types into function names and since besides
nft_do_chain() there are only AF-specific versions, there is no risk
of confusion.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't encode argument types into function names and since besides
nft_do_chain() there are only AF-specific versions, there is no risk
of confusion.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_tables: minor nf_chain_type cleanups</title>
<updated>2014-01-09T19:17:15+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2014-01-09T18:42:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fa2c1de0bbd98985f7f930205de97ae0d3e86c16'/>
<id>fa2c1de0bbd98985f7f930205de97ae0d3e86c16</id>
<content type='text'>
Minor nf_chain_type cleanups:

- reorder struct to plug a hoe
- rename struct module member to "owner" for consistency
- rename nf_hookfn array to "hooks" for consistency
- reorder initializers for better readability

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Minor nf_chain_type cleanups:

- reorder struct to plug a hoe
- rename struct module member to "owner" for consistency
- rename nf_hookfn array to "hooks" for consistency
- reorder initializers for better readability

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
