<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/net, branch v2.6.26.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.26.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.26.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2008-11-10T19:17:53Z</updated>
<entry>
<title>net: Fix recursive descent in __scm_destroy().</title>
<updated>2008-11-10T19:17:53Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-11-06T08:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1e675381c2c443e84ba7bea055017ded1ac8f816'/>
<id>urn:sha1:1e675381c2c443e84ba7bea055017ded1ac8f816</id>
<content type='text'>
commit f8d570a4745835f2238a33b537218a1bb03fc671 and
3b53fbf4314594fa04544b02b2fc6e607912da18 upstream (because once wasn't
good enough...)

__scm_destroy() walks the list of file descriptors in the scm_fp_list
pointed to by the scm_cookie argument.

Those, in turn, can close sockets and invoke __scm_destroy() again.

There is nothing which limits how deeply this can occur.

The idea for how to fix this is from Linus.  Basically, we do all of
the fput()s at the top level by collecting all of the scm_fp_list
objects hit by an fput().  Inside of the initial __scm_destroy() we
keep running the list until it is empty.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>netlink: fix overrun in attribute iteration</title>
<updated>2008-10-09T03:23:08Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@gmail.com</email>
</author>
<published>2008-09-12T02:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=877755eb1c4e46b460ac1af9938dec6f9d528fc2'/>
<id>urn:sha1:877755eb1c4e46b460ac1af9938dec6f9d528fc2</id>
<content type='text'>
[ Upstream commit 1045b03e07d85f3545118510a587035536030c1c ]

kmemcheck reported this:

  kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
  0500110001508abf050010000500000002017300140000006f72672e66726565
   i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
                                   ^

  Pid: 3462, comm: wpa_supplicant Not tainted (2.6.27-rc3-00054-g6397ab9-dirty #13)
  EIP: 0060:[&lt;c05de64a&gt;] EFLAGS: 00010296 CPU: 0
  EIP is at nla_parse+0x5a/0xf0
  EAX: 00000008 EBX: fffffffd ECX: c06f16c0 EDX: 00000005
  ESI: 00000010 EDI: f6c1ba30 EBP: f6367c6c ESP: c0a11e88
   DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
  CR0: 8005003b CR2: f781cc84 CR3: 3632f000 CR4: 000006d0
  DR0: c0ead9bc DR1: 00000000 DR2: 00000000 DR3: 00000000
  DR6: ffff4ff0 DR7: 00000400
   [&lt;c05d4b23&gt;] rtnl_setlink+0x63/0x130
   [&lt;c05d5f75&gt;] rtnetlink_rcv_msg+0x165/0x200
   [&lt;c05ddf66&gt;] netlink_rcv_skb+0x76/0xa0
   [&lt;c05d5dfe&gt;] rtnetlink_rcv+0x1e/0x30
   [&lt;c05dda21&gt;] netlink_unicast+0x281/0x290
   [&lt;c05ddbe9&gt;] netlink_sendmsg+0x1b9/0x2b0
   [&lt;c05beef2&gt;] sock_sendmsg+0xd2/0x100
   [&lt;c05bf945&gt;] sys_sendto+0xa5/0xd0
   [&lt;c05bf9a6&gt;] sys_send+0x36/0x40
   [&lt;c05c03d6&gt;] sys_socketcall+0x1e6/0x2c0
   [&lt;c020353b&gt;] sysenter_do_call+0x12/0x3f
   [&lt;ffffffff&gt;] 0xffffffff

This is the line in nla_ok():

  /**
   * nla_ok - check if the netlink attribute fits into the remaining bytes
   * @nla: netlink attribute
   * @remaining: number of bytes remaining in attribute stream
   */
  static inline int nla_ok(const struct nlattr *nla, int remaining)
  {
          return remaining &gt;= sizeof(*nla) &amp;&amp;
                 nla-&gt;nla_len &gt;= sizeof(*nla) &amp;&amp;
                 nla-&gt;nla_len &lt;= remaining;
  }

It turns out that remaining can become negative due to alignment in
nla_next(). But GCC promotes "remaining" to unsigned in the test
against sizeof(*nla) above. Therefore the test succeeds, and the
nla_for_each_attr() may access memory outside the received buffer.

A short example illustrating this point is here:

  #include &lt;stdio.h&gt;

  main(void)
  {
          printf("%d\n", -1 &gt;= sizeof(int));
  }

...which prints "1".

This patch adds a cast in front of the sizeof so that GCC will make
a signed comparison and fix the illegal memory dereference. With the
patch applied, there is no kmemcheck report.

Signed-off-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>netns: Add network namespace argument to rt6_fill_node() and ipv6_dev_get_saddr()</title>
<updated>2008-09-08T11:44:23Z</updated>
<author>
<name>Brian Haley</name>
<email>brian.haley@hp.com</email>
</author>
<published>2008-08-28T05:30:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7b29aece66858d8ee1fb10ca413fda072bfa74b6'/>
<id>urn:sha1:7b29aece66858d8ee1fb10ca413fda072bfa74b6</id>
<content type='text'>
[ Upstream commit 191cd582500f49b32a63040fedeebb0168c720af ]

ipv6_dev_get_saddr() blindly de-references dst_dev to get the network
namespace, but some callers might pass NULL.  Change callers to pass a
namespace pointer instead.

Signed-off-by: Brian Haley &lt;brian.haley@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>net-sched: change tcf_destroy_chain() to clear start of filter list</title>
<updated>2008-07-02T02:52:38Z</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2008-07-02T02:52:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ff31ab56c0e900235f653e375fc3b01ba2d8d6a3'/>
<id>urn:sha1:ff31ab56c0e900235f653e375fc3b01ba2d8d6a3</id>
<content type='text'>
Pass double tcf_proto pointers to tcf_destroy_chain() to make it
clear the start of the filter list for more consistency.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mac80211: don't accept WEP keys other than WEP40 and WEP104</title>
<updated>2008-06-30T19:43:53Z</updated>
<author>
<name>Emmanuel Grumbach</name>
<email>emmanuel.grumbach@intel.com</email>
</author>
<published>2008-06-27T23:50:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=23976efedd5ecb420b87455787c537eb4aed1981'/>
<id>urn:sha1:23976efedd5ecb420b87455787c537eb4aed1981</id>
<content type='text'>
This patch makes mac80211 refuse a WEP key whose length is not WEP40 nor
WEP104.

Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>netns: Don't receive new packets in a dead network namespace.</title>
<updated>2008-06-21T05:16:51Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2008-06-21T05:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b9f75f45a6b46a0ab4eb0857d437a0845871f314'/>
<id>urn:sha1:b9f75f45a6b46a0ab4eb0857d437a0845871f314</id>
<content type='text'>
Alexey Dobriyan &lt;adobriyan@gmail.com&gt; writes:
&gt; Subject: ICMP sockets destruction vs ICMP packets oops

&gt; After icmp_sk_exit() nuked ICMP sockets, we get an interrupt.
&gt; icmp_reply() wants ICMP socket.
&gt;
&gt; Steps to reproduce:
&gt;
&gt; 	launch shell in new netns
&gt; 	move real NIC to netns
&gt; 	setup routing
&gt; 	ping -i 0
&gt; 	exit from shell
&gt;
&gt; BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
&gt; IP: [&lt;ffffffff803fce17&gt;] icmp_sk+0x17/0x30
&gt; PGD 17f3cd067 PUD 17f3ce067 PMD 0 
&gt; Oops: 0000 [1] PREEMPT SMP DEBUG_PAGEALLOC
&gt; CPU 0 
&gt; Modules linked in: usblp usbcore
&gt; Pid: 0, comm: swapper Not tainted 2.6.26-rc6-netns-ct #4
&gt; RIP: 0010:[&lt;ffffffff803fce17&gt;]  [&lt;ffffffff803fce17&gt;] icmp_sk+0x17/0x30
&gt; RSP: 0018:ffffffff8057fc30  EFLAGS: 00010286
&gt; RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff81017c7db900
&gt; RDX: 0000000000000034 RSI: ffff81017c7db900 RDI: ffff81017dc41800
&gt; RBP: ffffffff8057fc40 R08: 0000000000000001 R09: 000000000000a815
&gt; R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff8057fd28
&gt; R13: ffffffff8057fd00 R14: ffff81017c7db938 R15: ffff81017dc41800
&gt; FS:  0000000000000000(0000) GS:ffffffff80525000(0000) knlGS:0000000000000000
&gt; CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
&gt; CR2: 0000000000000000 CR3: 000000017fcda000 CR4: 00000000000006e0
&gt; DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
&gt; Process swapper (pid: 0, threadinfo ffffffff8053a000, task ffffffff804fa4a0)
&gt; Stack:  0000000000000000 ffff81017c7db900 ffffffff8057fcf0 ffffffff803fcfe4
&gt;  ffffffff804faa38 0000000000000246 0000000000005a40 0000000000000246
&gt;  000000000001ffff ffff81017dd68dc0 0000000000005a40 0000000055342436
&gt; Call Trace:
&gt;  &lt;IRQ&gt;  [&lt;ffffffff803fcfe4&gt;] icmp_reply+0x44/0x1e0
&gt;  [&lt;ffffffff803d3a0a&gt;] ? ip_route_input+0x23a/0x1360
&gt;  [&lt;ffffffff803fd645&gt;] icmp_echo+0x65/0x70
&gt;  [&lt;ffffffff803fd300&gt;] icmp_rcv+0x180/0x1b0
&gt;  [&lt;ffffffff803d6d84&gt;] ip_local_deliver+0xf4/0x1f0
&gt;  [&lt;ffffffff803d71bb&gt;] ip_rcv+0x33b/0x650
&gt;  [&lt;ffffffff803bb16a&gt;] netif_receive_skb+0x27a/0x340
&gt;  [&lt;ffffffff803be57d&gt;] process_backlog+0x9d/0x100
&gt;  [&lt;ffffffff803bdd4d&gt;] net_rx_action+0x18d/0x250
&gt;  [&lt;ffffffff80237be5&gt;] __do_softirq+0x75/0x100
&gt;  [&lt;ffffffff8020c97c&gt;] call_softirq+0x1c/0x30
&gt;  [&lt;ffffffff8020f085&gt;] do_softirq+0x65/0xa0
&gt;  [&lt;ffffffff80237af7&gt;] irq_exit+0x97/0xa0
&gt;  [&lt;ffffffff8020f198&gt;] do_IRQ+0xa8/0x130
&gt;  [&lt;ffffffff80212ee0&gt;] ? mwait_idle+0x0/0x60
&gt;  [&lt;ffffffff8020bc46&gt;] ret_from_intr+0x0/0xf
&gt;  &lt;EOI&gt;  [&lt;ffffffff80212f2c&gt;] ? mwait_idle+0x4c/0x60
&gt;  [&lt;ffffffff80212f23&gt;] ? mwait_idle+0x43/0x60
&gt;  [&lt;ffffffff8020a217&gt;] ? cpu_idle+0x57/0xa0
&gt;  [&lt;ffffffff8040f380&gt;] ? rest_init+0x70/0x80
&gt; Code: 10 5b 41 5c 41 5d 41 5e c9 c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 53
&gt; 48 83 ec 08 48 8b 9f 78 01 00 00 e8 2b c7 f1 ff 89 c0 &lt;48&gt; 8b 04 c3 48 83 c4 08
&gt; 5b c9 c3 66 66 66 66 66 2e 0f 1f 84 00
&gt; RIP  [&lt;ffffffff803fce17&gt;] icmp_sk+0x17/0x30
&gt;  RSP &lt;ffffffff8057fc30&gt;
&gt; CR2: 0000000000000000
&gt; ---[ end trace ea161157b76b33e8 ]---
&gt; Kernel panic - not syncing: Aiee, killing interrupt handler!

Receiving packets while we are cleaning up a network namespace is a
racy proposition. It is possible when the packet arrives that we have
removed some but not all of the state we need to fully process it.  We
have the choice of either playing wack-a-mole with the cleanup routines
or simply dropping packets when we don't have a network namespace to
handle them.

Since the check looks inexpensive in netif_receive_skb let's just
drop the incoming packets.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Drop packets for loopback address from outside of the box.</title>
<updated>2008-06-19T23:33:57Z</updated>
<author>
<name>YOSHIFUJI Hideaki</name>
<email>yoshfuji@linux-ipv6.org</email>
</author>
<published>2008-06-19T23:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f630e43a215a3129d0c1173cae0bce6ea4855cf7'/>
<id>urn:sha1:f630e43a215a3129d0c1173cae0bce6ea4855cf7</id>
<content type='text'>
[ Based upon original report and patch by Karsten Keil.  Karsten
  has verified that this fixes the TAHI test case "ICMPv6 test
  v6LC.5.1.2 Part F". -DaveM ]

Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_nat: fix RCU races</title>
<updated>2008-06-17T22:51:47Z</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2008-06-17T22:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=68b80f11380889996aa7eadba29dbbb5c29a5864'/>
<id>urn:sha1:68b80f11380889996aa7eadba29dbbb5c29a5864</id>
<content type='text'>
Fix three ct_extend/NAT extension related races:

- When cleaning up the extension area and removing it from the bysource hash,
  the nat-&gt;ct pointer must not be set to NULL since it may still be used in
  a RCU read side

- When replacing a NAT extension area in the bysource hash, the nat-&gt;ct
  pointer must be assigned before performing the replacement

- When reallocating extension storage in ct_extend, the old memory must
  not be freed immediately since it may still be used by a RCU read side

Possibly fixes https://bugzilla.redhat.com/show_bug.cgi?id=449315
and/or http://bugzilla.kernel.org/show_bug.cgi?id=10875

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: Revert 'process defer accept as established' changes.</title>
<updated>2008-06-12T23:34:35Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-06-12T23:31:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ec0a196626bd12e0ba108d7daa6d95a4fb25c2c5'/>
<id>urn:sha1:ec0a196626bd12e0ba108d7daa6d95a4fb25c2c5</id>
<content type='text'>
This reverts two changesets, ec3c0982a2dd1e671bad8e9d26c28dcba0039d87
("[TCP]: TCP_DEFER_ACCEPT updates - process as established") and
the follow-on bug fix 9ae27e0adbf471c7a6b80102e38e1d5a346b3b38
("tcp: Fix slab corruption with ipv6 and tcp6fuzz").

This change causes several problems, first reported by Ingo Molnar
as a distcc-over-loopback regression where connections were getting
stuck.

Ilpo Järvinen first spotted the locking problems.  The new function
added by this code, tcp_defer_accept_check(), only has the
child socket locked, yet it is modifying state of the parent
listening socket.

Fixing that is non-trivial at best, because we can't simply just grab
the parent listening socket lock at this point, because it would
create an ABBA deadlock.  The normal ordering is parent listening
socket --&gt; child socket, but this code path would require the
reverse lock ordering.

Next is a problem noticed by Vitaliy Gusev, he noted:

----------------------------------------
&gt;--- a/net/ipv4/tcp_timer.c
&gt;+++ b/net/ipv4/tcp_timer.c
&gt;@@ -481,6 +481,11 @@ static void tcp_keepalive_timer (unsigned long data)
&gt; 		goto death;
&gt; 	}
&gt;
&gt;+	if (tp-&gt;defer_tcp_accept.request &amp;&amp; sk-&gt;sk_state == TCP_ESTABLISHED) {
&gt;+		tcp_send_active_reset(sk, GFP_ATOMIC);
&gt;+		goto death;

Here socket sk is not attached to listening socket's request queue. tcp_done()
will not call inet_csk_destroy_sock() (and tcp_v4_destroy_sock() which should
release this sk) as socket is not DEAD. Therefore socket sk will be lost for
freeing.
----------------------------------------

Finally, Alexey Kuznetsov argues that there might not even be any
real value or advantage to these new semantics even if we fix all
of the bugs:

----------------------------------------
Hiding from accept() sockets with only out-of-order data only
is the only thing which is impossible with old approach. Is this really
so valuable? My opinion: no, this is nothing but a new loophole
to consume memory without control.
----------------------------------------

So revert this thing for now.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>inet{6}_request_sock: Init -&gt;opt and -&gt;pktopts in the constructor</title>
<updated>2008-06-10T19:39:35Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2008-06-10T19:39:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ce4a7d0d48bbaed78ccbb0bafb9229651a40303a'/>
<id>urn:sha1:ce4a7d0d48bbaed78ccbb0bafb9229651a40303a</id>
<content type='text'>
Wei Yongjun noticed that we may call reqsk_free on request sock objects where
the opt fields may not be initialized, fix it by introducing inet_reqsk_alloc
where we initialize -&gt;opt to NULL and set -&gt;pktopts to NULL in
inet6_reqsk_alloc.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
