<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter, branch v3.2.41</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/netfilter?h=v3.2.41</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/netfilter?h=v3.2.41'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-12-06T11:20:10Z</updated>
<entry>
<title>netfilter: Validate the sequence number of dataless ACK packets as well</title>
<updated>2012-12-06T11:20:10Z</updated>
<author>
<name>Jozsef Kadlecsik</name>
<email>kadlec@blackhole.kfki.hu</email>
</author>
<published>2012-08-31T09:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=58fd4b237523afd2a925ccc664d35f0334da4ffd'/>
<id>urn:sha1:58fd4b237523afd2a925ccc664d35f0334da4ffd</id>
<content type='text'>
commit 4a70bbfaef0361d27272629d1a250a937edcafe4 upstream.

We spare nothing by not validating the sequence number of dataless
ACK packets and enabling it makes harder off-path attacks.

See: "Reflection scan: an Off-Path Attack on TCP" by Jan Wrobel,
http://arxiv.org/abs/1201.2074

Signed-off-by: Jozsef Kadlecsik &lt;kadlec@blackhole.kfki.hu&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>netfilter: Mark SYN/ACK packets as invalid from original direction</title>
<updated>2012-12-06T11:20:10Z</updated>
<author>
<name>Jozsef Kadlecsik</name>
<email>kadlec@blackhole.kfki.hu</email>
</author>
<published>2012-08-31T09:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b5ce3e0d724f18d39ca996164baef3011ff3c409'/>
<id>urn:sha1:b5ce3e0d724f18d39ca996164baef3011ff3c409</id>
<content type='text'>
commit 64f509ce71b08d037998e93dd51180c19b2f464c upstream.

Clients should not send such packets. By accepting them, we open
up a hole by wich ephemeral ports can be discovered in an off-path
attack.

See: "Reflection scan: an Off-Path Attack on TCP" by Jan Wrobel,
http://arxiv.org/abs/1201.2074

Signed-off-by: Jozsef Kadlecsik &lt;kadlec@blackhole.kfki.hu&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_conntrack: fix racy timer handling with reliable events</title>
<updated>2012-10-30T23:27:08Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2012-08-29T16:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cc1b75d796ad050c83c95733c4220aaa04fa1304'/>
<id>urn:sha1:cc1b75d796ad050c83c95733c4220aaa04fa1304</id>
<content type='text'>
commit 5b423f6a40a0327f9d40bc8b97ce9be266f74368 upstream.

Existing code assumes that del_timer returns true for alive conntrack
entries. However, this is not true if reliable events are enabled.
In that case, del_timer may return true for entries that were
just inserted in the dying list. Note that packets / ctnetlink may
hold references to conntrack entries that were just inserted to such
list.

This patch fixes the issue by adding an independent timer for
event delivery. This increases the size of the ecache extension.
Still we can revisit this later and use variable size extensions
to allocate this area on demand.

Tested-by: Oliver Smith &lt;olipro@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Acked-by: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>netfilter: xt_limit: have r-&gt;cost != 0 case work</title>
<updated>2012-10-17T02:50:09Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@inai.de</email>
</author>
<published>2012-09-21T22:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c06493eb505b0fe5fb96f22dcb6777f8fcd2d3c6'/>
<id>urn:sha1:c06493eb505b0fe5fb96f22dcb6777f8fcd2d3c6</id>
<content type='text'>
commit 82e6bfe2fbc4d48852114c4f979137cd5bf1d1a8 upstream.

Commit v2.6.19-rc1~1272^2~41 tells us that r-&gt;cost != 0 can happen when
a running state is saved to userspace and then reinstated from there.

Make sure that private xt_limit area is initialized with correct values.
Otherwise, random matchings due to use of uninitialized memory.

Signed-off-by: Jan Engelhardt &lt;jengelh@inai.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>netfilter: limit, hashlimit: avoid duplicated inline</title>
<updated>2012-10-17T02:50:08Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2012-05-07T10:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a39c34fada77c490ddb0a8b206cdc8ccf4135e0'/>
<id>urn:sha1:8a39c34fada77c490ddb0a8b206cdc8ccf4135e0</id>
<content type='text'>
commit 7a909ac70f6b0823d9f23a43f19598d4b57ac901 upstream.

credit_cap can be set to credit, which avoids inlining user2credits
twice. Also, remove inline keyword and let compiler decide.

old:
    684     192       0     876     36c net/netfilter/xt_limit.o
   4927     344      32    5303    14b7 net/netfilter/xt_hashlimit.o
now:
    668     192       0     860     35c net/netfilter/xt_limit.o
   4793     344      32    5169    1431 net/netfilter/xt_hashlimit.o

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_ct_expect: fix possible access to uninitialized timer</title>
<updated>2012-10-17T02:50:06Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2012-08-16T00:25:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9245074996e2eb1f9f592e8d0108949b16542a86'/>
<id>urn:sha1:9245074996e2eb1f9f592e8d0108949b16542a86</id>
<content type='text'>
commit 2614f86490122bf51eb7c12ec73927f1900f4e7d upstream.

In __nf_ct_expect_check, the function refresh_timer returns 1
if a matching expectation is found and its timer is successfully
refreshed. This results in nf_ct_expect_related returning 0.
Note that at this point:

- the passed expectation is not inserted in the expectation table
  and its timer was not initialized, since we have refreshed one
  matching/existing expectation.

- nf_ct_expect_alloc uses kmem_cache_alloc, so the expectation
  timer is in some undefined state just after the allocation,
  until it is appropriately initialized.

This can be a problem for the SIP helper during the expectation
addition:

 ...
 if (nf_ct_expect_related(rtp_exp) == 0) {
         if (nf_ct_expect_related(rtcp_exp) != 0)
                 nf_ct_unexpect_related(rtp_exp);
 ...

Note that nf_ct_expect_related(rtp_exp) may return 0 for the timer refresh
case that is detailed above. Then, if nf_ct_unexpect_related(rtcp_exp)
returns != 0, nf_ct_unexpect_related(rtp_exp) is called, which does:

 spin_lock_bh(&amp;nf_conntrack_lock);
 if (del_timer(&amp;exp-&gt;timeout)) {
         nf_ct_unlink_expect(exp);
         nf_ct_expect_put(exp);
 }
 spin_unlock_bh(&amp;nf_conntrack_lock);

Note that del_timer always returns false if the timer has been
initialized.  However, the timer was not initialized since setup_timer
was not called, therefore, the expectation timer remains in some
undefined state. If I'm not missing anything, this may lead to the
removal an unexistent expectation.

To fix this, the optimization that allows refreshing an expectation
is removed. Now nf_conntrack_expect_related looks more consistent
to me since it always add the expectation in case that it returns
success.

Thanks to Patrick McHardy for participating in the discussion of
this patch.

I think this may be the source of the problem described by:
http://marc.info/?l=netfilter-devel&amp;m=134073514719421&amp;w=2

Reported-by: Rafal Fitt &lt;rafalf@aplusc.com.pl&gt;
Acked-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)</title>
<updated>2012-09-19T14:04:54Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-08-15T11:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9b2a14018c8a62cf910e10efb4b24787549de5c4'/>
<id>urn:sha1:9b2a14018c8a62cf910e10efb4b24787549de5c4</id>
<content type='text'>
[ Upstream commit 2d8a041b7bfe1097af21441cb77d6af95f4f4680 ]

If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing the structure to
__ip_vs_get_timeouts() to avoid the info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Wensong Zhang &lt;wensong@linux-vs.org&gt;
Cc: Simon Horman &lt;horms@verge.net.au&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>ipvs: fix matching of fwmark templates during scheduling</title>
<updated>2012-03-01T00:31:19Z</updated>
<author>
<name>Simon Horman</name>
<email>horms@verge.net.au</email>
</author>
<published>2012-01-27T01:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9b83c78d644ae794f0ec3cf7a4722c613b947913'/>
<id>urn:sha1:9b83c78d644ae794f0ec3cf7a4722c613b947913</id>
<content type='text'>
commit e0aac52e17a3db68fe2ceae281780a70fc69957f upstream.

	Commit f11017ec2d1859c661f4e2b12c4a8d250e1f47cf (2.6.37)
moved the fwmark variable in subcontext that is invalidated before
reaching the ip_vs_ct_in_get call. As vaddr is provided as pointer
in the param structure make sure the fwmark variable is in
same context. As the fwmark templates can not be matched,
more and more template connections are created and the
controlled connections can not go to single real server.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: reintroduce missing rcu_assign_pointer() calls</title>
<updated>2012-02-03T17:22:20Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-12T04:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4704f3edfdd3cc5918932577373c0dc165d52959'/>
<id>urn:sha1:4704f3edfdd3cc5918932577373c0dc165d52959</id>
<content type='text'>
[ Upstream commit cf778b00e96df6d64f8e21b8395d1f8a859ecdc7 ]

commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
y).

We miss needed barriers, even on x86, when y is not NULL.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
CC: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>netfilter: ctnetlink: fix timeout calculation</title>
<updated>2011-12-31T15:59:04Z</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2011-12-30T15:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c121638277a71c1e1fb44c3e654ea353357bbc2c'/>
<id>urn:sha1:c121638277a71c1e1fb44c3e654ea353357bbc2c</id>
<content type='text'>
The sanity check (timeout &lt; 0) never works; the dividend is unsigned
and so is the division, which should have been a signed division.

	long timeout = (ct-&gt;timeout.expires - jiffies) / HZ;
	if (timeout &lt; 0)
		timeout = 0;

This patch converts the time values to signed for the division.

Signed-off-by: Xi Wang &lt;xi.wang@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
</feed>
