<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter, branch v3.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-01-30T17:42:08Z</updated>
<entry>
<title>netfilter: nf_tables: fix leaks in error path of nf_tables_newchain()</title>
<updated>2015-01-30T17:42:08Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2015-01-29T18:08:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5553c19ff9058136e7082c0b1f4268e705ea538'/>
<id>urn:sha1:f5553c19ff9058136e7082c0b1f4268e705ea538</id>
<content type='text'>
Release statistics and module refcount on memory allocation problems.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>ipvs: rerouting to local clients is not needed anymore</title>
<updated>2015-01-30T01:05:55Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2014-12-18T20:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=579eb62ac35845686a7c4286c0a820b4eb1f96aa'/>
<id>urn:sha1:579eb62ac35845686a7c4286c0a820b4eb1f96aa</id>
<content type='text'>
commit f5a41847acc5 ("ipvs: move ip_route_me_harder for ICMP")
from 2.6.37 introduced ip_route_me_harder() call for responses to
local clients, so that we can provide valid rt_src after SNAT.
It was used by TCP to provide valid daddr for ip_send_reply().
After commit 0a5ebb8000c5 ("ipv4: Pass explicit daddr arg to
ip_send_reply()." from 3.0 this rerouting is not needed anymore
and should be avoided, especially in LOCAL_IN.

Fixes 3.12.33 crash in xfrm reported by Florian Wiessner:
"3.12.33 - BUG xfrm_selector_match+0x25/0x2f6"

Reported-by: Smart Weblications GmbH - Florian Wiessner &lt;f.wiessner@smart-weblications.de&gt;
Tested-by: Smart Weblications GmbH - Florian Wiessner &lt;f.wiessner@smart-weblications.de&gt;
Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: disable preemption when restoring chain counters</title>
<updated>2015-01-26T10:50:02Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2015-01-21T17:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8781f70a5b210a1b08cff8ce05895ebcec18d83'/>
<id>urn:sha1:e8781f70a5b210a1b08cff8ce05895ebcec18d83</id>
<content type='text'>
With CONFIG_DEBUG_PREEMPT=y

[22144.496057] BUG: using smp_processor_id() in preemptible [00000000] code: iptables-compat/10406
[22144.496061] caller is debug_smp_processor_id+0x17/0x1b
[22144.496065] CPU: 2 PID: 10406 Comm: iptables-compat Not tainted 3.19.0-rc4+ #
[...]
[22144.496092] Call Trace:
[22144.496098]  [&lt;ffffffff8145b9fa&gt;] dump_stack+0x4f/0x7b
[22144.496104]  [&lt;ffffffff81244f52&gt;] check_preemption_disabled+0xd6/0xe8
[22144.496110]  [&lt;ffffffff81244f90&gt;] debug_smp_processor_id+0x17/0x1b
[22144.496120]  [&lt;ffffffffa07c557e&gt;] nft_stats_alloc+0x94/0xc7 [nf_tables]
[22144.496130]  [&lt;ffffffffa07c73d2&gt;] nf_tables_newchain+0x471/0x6d8 [nf_tables]
[22144.496140]  [&lt;ffffffffa07c5ef6&gt;] ? nft_trans_alloc+0x18/0x34 [nf_tables]
[22144.496154]  [&lt;ffffffffa063c8da&gt;] nfnetlink_rcv_batch+0x2b4/0x457 [nfnetlink]

Reported-by: Andreas Schultz &lt;aschultz@tpip.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: validate hooks in NAT expressions</title>
<updated>2015-01-19T13:52:39Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2015-01-14T14:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75e8d06d4308436055d1a78a2c02bf6328ba724d'/>
<id>urn:sha1:75e8d06d4308436055d1a78a2c02bf6328ba724d</id>
<content type='text'>
The user can crash the kernel if it uses any of the existing NAT
expressions from the wrong hook, so add some code to validate this
when loading the rule.

This patch introduces nft_chain_validate_hooks() which is based on
an existing function in the bridge version of the reject expression.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf</title>
<updated>2015-01-12T05:14:49Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-01-12T05:14:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bd822180446558dd13f6124f09fa3e80850dcaa'/>
<id>urn:sha1:2bd822180446558dd13f6124f09fa3e80850dcaa</id>
<content type='text'>
Pablo Neira Ayuso says:

====================
netfilter/ipvs fixes for net

The following patchset contains netfilter/ipvs fixes, they are:

1) Small fix for the FTP helper in IPVS, a diff variable may be left
   unset when CONFIG_IP_VS_IPV6 is set. Patch from Dan Carpenter.

2) Fix nf_tables port NAT in little endian archs, patch from leroy
   christophe.

3) Fix race condition between conntrack confirmation and flush from
   userspace. This is the second reincarnation to resolve this problem.

4) Make sure inner messages in the batch come with the nfnetlink header.

5) Relax strict check from nfnetlink_bind() that may break old userspace
   applications using all 1s group mask.

6) Schedule removal of chains once no sets and rules refer to them in
   the new nf_tables ruleset flush command. Reported by Asbjoern Sloth
   Toennesen.

Note that this batch comes later than usual because of the short
winter holidays.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: fix flush ruleset chain dependencies</title>
<updated>2015-01-06T21:27:48Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2015-01-04T14:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2f18db0c68fec96631c10cad9384c196e9008ac'/>
<id>urn:sha1:a2f18db0c68fec96631c10cad9384c196e9008ac</id>
<content type='text'>
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.

[  353.373791] ------------[ cut here ]------------
[  353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[  353.373896] invalid opcode: 0000 [#1] SMP
[  353.373942] Modules linked in: intel_powerclamp uas iwldvm iwlwifi
[  353.374017] CPU: 0 PID: 6445 Comm: 31c3.nft Not tainted 3.18.0 #98
[  353.374069] Hardware name: LENOVO 5129CTO/5129CTO, BIOS 6QET47WW (1.17 ) 07/14/2010
[...]
[  353.375018] Call Trace:
[  353.375046]  [&lt;ffffffff81964c31&gt;] ? nf_tables_commit+0x381/0x540
[  353.375101]  [&lt;ffffffff81949118&gt;] nfnetlink_rcv+0x3d8/0x4b0
[  353.375150]  [&lt;ffffffff81943fc5&gt;] netlink_unicast+0x105/0x1a0
[  353.375200]  [&lt;ffffffff8194438e&gt;] netlink_sendmsg+0x32e/0x790
[  353.375253]  [&lt;ffffffff818f398e&gt;] sock_sendmsg+0x8e/0xc0
[  353.375300]  [&lt;ffffffff818f36b9&gt;] ? move_addr_to_kernel.part.20+0x19/0x70
[  353.375357]  [&lt;ffffffff818f44f9&gt;] ? move_addr_to_kernel+0x19/0x30
[  353.375410]  [&lt;ffffffff819016d2&gt;] ? verify_iovec+0x42/0xd0
[  353.375459]  [&lt;ffffffff818f3e10&gt;] ___sys_sendmsg+0x3f0/0x400
[  353.375510]  [&lt;ffffffff810615fa&gt;] ? native_sched_clock+0x2a/0x90
[  353.375563]  [&lt;ffffffff81176697&gt;] ? acct_account_cputime+0x17/0x20
[  353.375616]  [&lt;ffffffff8110dc78&gt;] ? account_user_time+0x88/0xa0
[  353.375667]  [&lt;ffffffff818f4bbd&gt;] __sys_sendmsg+0x3d/0x80
[  353.375719]  [&lt;ffffffff81b184f4&gt;] ? int_check_syscall_exit_work+0x34/0x3d
[  353.375776]  [&lt;ffffffff818f4c0d&gt;] SyS_sendmsg+0xd/0x20
[  353.375823]  [&lt;ffffffff81b1826d&gt;] system_call_fastpath+0x16/0x1b

Release objects in this order: rules -&gt; sets -&gt; chains -&gt; tables, to
make sure no references to chains are held anymore.

Reported-by: Asbjoern Sloth Toennesen &lt;asbjorn@asbjorn.biz&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink: relax strict multicast group check from netlink_bind</title>
<updated>2015-01-06T21:27:47Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2015-01-04T14:20:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62924af247e95de7041a6d6f2d06cdd05152e2dc'/>
<id>urn:sha1:62924af247e95de7041a6d6f2d06cdd05152e2dc</id>
<content type='text'>
Relax the checking that was introduced in 97840cb ("netfilter:
nfnetlink: fix insufficient validation in nfnetlink_bind") when the
subscription bitmask is used. Existing userspace code code may request
to listen to all of the existing netlink groups by setting an all to one
subscription group bitmask. Netlink already validates subscription via
setsockopt() for us.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink: validate nfnetlink header from batch</title>
<updated>2015-01-06T21:27:46Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2015-01-04T14:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ea2aa8b7dba9e99544c4187cc298face254569f'/>
<id>urn:sha1:9ea2aa8b7dba9e99544c4187cc298face254569f</id>
<content type='text'>
Make sure there is enough room for the nfnetlink header in the
netlink messages that are part of the batch. There is a similar
check in netlink_rcv_skb().

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: fix race between confirmation and flush</title>
<updated>2015-01-06T21:27:45Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-11-24T23:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ca3f5e974f2b4b7f711589f4abff920db36637a'/>
<id>urn:sha1:8ca3f5e974f2b4b7f711589f4abff920db36637a</id>
<content type='text'>
Commit 5195c14c8b27c ("netfilter: conntrack: fix race in
__nf_conntrack_confirm against get_next_corpse") aimed to resolve the
race condition between the confirmation (packet path) and the flush
command (from control plane). However, it introduced a crash when
several packets race to add a new conntrack, which seems easier to
reproduce when nf_queue is in place.

Fix this race, in __nf_conntrack_confirm(), by removing the CT
from unconfirmed list before checking the DYING bit. In case
race occured, re-add the CT to the dying list

This patch also changes the verdict from NF_ACCEPT to NF_DROP when
we lose race. Basically, the confirmation happens for the first packet
that we see in a flow. If you just invoked conntrack -F once (which
should be the common case), then this is likely to be the first packet
of the flow (unless you already called flush anytime soon in the past).
This should be hard to trigger, but better drop this packet, otherwise
we leave things in inconsistent state since the destination will likely
reply to this packet, but it will find no conntrack, unless the origin
retransmits.

The change of the verdict has been discussed in:
https://www.marc.info/?l=linux-netdev&amp;m=141588039530056&amp;w=2

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netlink/genetlink: pass network namespace to bind/unbind</title>
<updated>2014-12-27T08:07:50Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-12-23T20:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=023e2cfa36c31b0ad28c159a1bb0d61ff57334c8'/>
<id>urn:sha1:023e2cfa36c31b0ad28c159a1bb0d61ff57334c8</id>
<content type='text'>
Netlink families can exist in multiple namespaces, and for the most
part multicast subscriptions are per network namespace. Thus it only
makes sense to have bind/unbind notifications per network namespace.

To achieve this, pass the network namespace of a given client socket
to the bind/unbind functions.

Also do this in generic netlink, and there also make sure that any
bind for multicast groups that only exist in init_net is rejected.
This isn't really a problem if it is accepted since a client in a
different namespace will never receive any notifications from such
a group, but it can confuse the family if not rejected (it's also
possible to silently (without telling the family) accept it, but it
would also have to be ignored on unbind so families that take any
kind of action on bind/unbind won't do unnecessary work for invalid
clients like that.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
