<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter, branch v3.18</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.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-11-25T19:14:51Z</updated>
<entry>
<title>Revert "netfilter: conntrack: fix race in __nf_conntrack_confirm against get_next_corpse"</title>
<updated>2014-11-25T19:14:51Z</updated>
<author>
<name>Pablo Neira</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-11-25T18:54:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43612d7c04f1a4f5e60104143918fcdf018b66ee'/>
<id>urn:sha1:43612d7c04f1a4f5e60104143918fcdf018b66ee</id>
<content type='text'>
This reverts commit 5195c14c8b27cc0b18220ddbf0e5ad3328a04187.

If the conntrack clashes with an existing one, it is left out of
the unconfirmed list, thus, crashing when dropping the packet and
releasing the conntrack since golden rule is that conntracks are
always placed in any of the existing lists for traceability reasons.

Reported-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=88841
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink: fix insufficient validation in nfnetlink_bind</title>
<updated>2014-11-17T11:01:13Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-11-14T17:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97840cb67ff5ac8add836684f011fd838518d698'/>
<id>urn:sha1:97840cb67ff5ac8add836684f011fd838518d698</id>
<content type='text'>
Make sure the netlink group exists, otherwise you can trigger an out
of bound array memory access from the netlink_bind() path. This splat
can only be triggered only by superuser.

[  180.203600] UBSan: Undefined behaviour in ../net/netfilter/nfnetlink.c:467:28
[  180.204249] index 9 is out of range for type 'int [9]'
[  180.204697] CPU: 0 PID: 1771 Comm: trinity-main Not tainted 3.18.0-rc4-mm1+ #122
[  180.205365] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org
+04/01/2014
[  180.206498]  0000000000000018 0000000000000000 0000000000000009 ffff88007bdf7da8
[  180.207220]  ffffffff82b0ef5f 0000000000000092 ffffffff845ae2e0 ffff88007bdf7db8
[  180.207887]  ffffffff8199e489 ffff88007bdf7e18 ffffffff8199ea22 0000003900000000
[  180.208639] Call Trace:
[  180.208857] dump_stack (lib/dump_stack.c:52)
[  180.209370] ubsan_epilogue (lib/ubsan.c:174)
[  180.209849] __ubsan_handle_out_of_bounds (lib/ubsan.c:400)
[  180.210512] nfnetlink_bind (net/netfilter/nfnetlink.c:467)
[  180.210986] netlink_bind (net/netlink/af_netlink.c:1483)
[  180.211495] SYSC_bind (net/socket.c:1541)

Moreover, define the missing nf_tables and nf_acct multicast groups too.

Reported-by: Andrey Ryabinin &lt;a.ryabinin@samsung.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: fix race in __nf_conntrack_confirm against get_next_corpse</title>
<updated>2014-11-14T16:43:05Z</updated>
<author>
<name>bill bonaparte</name>
<email>programme110@gmail.com</email>
</author>
<published>2014-11-06T13:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5195c14c8b27cc0b18220ddbf0e5ad3328a04187'/>
<id>urn:sha1:5195c14c8b27cc0b18220ddbf0e5ad3328a04187</id>
<content type='text'>
After removal of the central spinlock nf_conntrack_lock, in
commit 93bb0ceb75be2 ("netfilter: conntrack: remove central
spinlock nf_conntrack_lock"), it is possible to race against
get_next_corpse().

The race is against the get_next_corpse() cleanup on
the "unconfirmed" list (a per-cpu list with seperate locking),
which set the DYING bit.

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.

While at this, fix coding style of the comment that has been
updated.

Fixes: 93bb0ceb75be2 ("netfilter: conntrack: remove central spinlock nf_conntrack_lock")
Reported-by: bill bonaparte &lt;programme110@gmail.com&gt;
Signed-off-by: bill bonaparte &lt;programme110@gmail.com&gt;
Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: restore synchronous object release from commit/abort</title>
<updated>2014-11-12T11:06:24Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-11-10T20:14:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b326dd37b94e29bf6a15940f4fa66aa21a678ab1'/>
<id>urn:sha1:b326dd37b94e29bf6a15940f4fa66aa21a678ab1</id>
<content type='text'>
The existing xtables matches and targets, when used from nft_compat, may
sleep from the destroy path, ie. when removing rules. Since the objects
are released via call_rcu from softirq context, this results in lockdep
splats and possible lockups that may be hard to reproduce.

Patrick also indicated that delayed object release via call_rcu can
cause us problems in the ordering of event notifications when anonymous
sets are in place.

So, this patch restores the synchronous object release from the commit
and abort paths. This includes a call to synchronize_rcu() to make sure
that no packets are walking on the objects that are going to be
released. This is slowier though, but it's simple and it resolves the
aforementioned problems.

This is a partial revert of c7c32e7 ("netfilter: nf_tables: defer all
object release via rcu") that was introduced in 3.16 to speed up
interaction with userspace.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nft_compat: use the match-&gt;table to validate dependencies</title>
<updated>2014-11-12T11:06:24Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-11-10T18:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=afefb6f928ed42d5db452ee9251ce6de62673c67'/>
<id>urn:sha1:afefb6f928ed42d5db452ee9251ce6de62673c67</id>
<content type='text'>
Instead of the match-&gt;name, which is of course not relevant.

Fixes: f3f5dde ("netfilter: nft_compat: validate chain type in match/target")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nft_compat: relax chain type validation</title>
<updated>2014-11-12T11:06:24Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-11-10T19:53:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c918687f5e3962375a19de6ded3c1be85ebdbcd6'/>
<id>urn:sha1:c918687f5e3962375a19de6ded3c1be85ebdbcd6</id>
<content type='text'>
Check for nat chain dependency only, which is the one that can
actually crash the kernel. Don't care if mangle, filter and security
specific match and targets are used out of their scope, they are
harmless.

This restores iptables-compat with mangle specific match/target when
used out of the OUTPUT chain, that are actually emulated through filter
chains, which broke when performing strict validation.

Fixes: f3f5dde ("netfilter: nft_compat: validate chain type in match/target")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nft_compat: use current net namespace</title>
<updated>2014-11-12T11:06:24Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-11-07T17:48:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2daf1b4d18e3add229d1a3b5c554331d99ac6c7e'/>
<id>urn:sha1:2daf1b4d18e3add229d1a3b5c554331d99ac6c7e</id>
<content type='text'>
Instead of init_net when using xtables over nftables compat.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>ipvs: Keep skb-&gt;sk when allocating headroom on tunnel xmit</title>
<updated>2014-11-12T02:03:04Z</updated>
<author>
<name>Calvin Owens</name>
<email>calvinowens@fb.com</email>
</author>
<published>2014-11-05T00:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50656d9df63d69ce399c8be62d4473b039dac36a'/>
<id>urn:sha1:50656d9df63d69ce399c8be62d4473b039dac36a</id>
<content type='text'>
ip_vs_prepare_tunneled_skb() ignores -&gt;sk when allocating a new
skb, either unconditionally setting -&gt;sk to NULL or allowing
the uninitialized -&gt;sk from a newly allocated skb to leak through
to the caller.

This patch properly copies -&gt;sk and increments its reference count.

Signed-off-by: Calvin Owens &lt;calvinowens@fb.com&gt;
Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>netfilter: ipset: small potential read beyond the end of buffer</title>
<updated>2014-11-11T12:46:37Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-11-10T16:11:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2196937e12b1b4ba139806d132647e1651d655df'/>
<id>urn:sha1:2196937e12b1b4ba139806d132647e1651d655df</id>
<content type='text'>
We could be reading 8 bytes into a 4 byte buffer here.  It seems
harmless but adding a check is the right thing to do and it silences a
static checker warning.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Jozsef Kadlecsik &lt;kadlec@blackhole.kfki.hu&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>ipvs: Avoid null-pointer deref in debug code</title>
<updated>2014-10-28T00:48:31Z</updated>
<author>
<name>Alex Gartrell</name>
<email>agartrell@fb.com</email>
</author>
<published>2014-10-06T15:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d53666b40007b55204ee8890618da79a20c9940'/>
<id>urn:sha1:3d53666b40007b55204ee8890618da79a20c9940</id>
<content type='text'>
Use daddr instead of reaching into dest.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Alex Gartrell &lt;agartrell@fb.com&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
</feed>
