<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v2.6.32.60</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v2.6.32.60</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v2.6.32.60'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-10-07T21:41:20Z</updated>
<entry>
<title>net: feed /dev/random with the MAC address when registering a device</title>
<updated>2012-10-07T21:41:20Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-07-05T01:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4bc4a0f1e034193d7c78783271053d9b00e120e1'/>
<id>urn:sha1:4bc4a0f1e034193d7c78783271053d9b00e120e1</id>
<content type='text'>
commit 7bf2357524408b97fec58344caf7397f8140c3fd upstream.

Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>net: fix a race in sock_queue_err_skb()</title>
<updated>2012-10-07T21:37:45Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-04-06T08:49:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=237b614839ec49b7069a2524d2dfcd19734e3968'/>
<id>urn:sha1:237b614839ec49b7069a2524d2dfcd19734e3968</id>
<content type='text'>
[ Upstream commit 110c43304db6f06490961529536c362d9ac5732f ]

As soon as an skb is queued into socket error queue, another thread
can consume it, so we are not allowed to reference skb anymore, or risk
use after free.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()</title>
<updated>2012-10-07T21:37:28Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2012-05-30T21:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=facdf5857a87c29cd2703ea582998d1f0088a9b4'/>
<id>urn:sha1:facdf5857a87c29cd2703ea582998d1f0088a9b4</id>
<content type='text'>
commit cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc upstream

We need to validate the number of pages consumed by data_len, otherwise frags
array could be overflowed by userspace. So this patch validate data_len and
return -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[dannf: backported to Debian's 2.6.32]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>net: sock_queue_err_skb() dont mess with sk_forward_alloc</title>
<updated>2012-02-13T19:28:51Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-06-01T06:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a77912b9bce47661279f4f1a5be10b15d40b402d'/>
<id>urn:sha1:a77912b9bce47661279f4f1a5be10b15d40b402d</id>
<content type='text'>
commit b1faf5666438090a4dc4fceac8502edc7788b7e3 upstream.

Correct sk_forward_alloc handling for error_queue would need to use a
backlog of frames that softirq handler could not deliver because socket
is owned by user thread. Or extend backlog processing to be able to
process normal and error packets.

Another possibility is to not use mem charge for error queue, this is
what I implemented in this patch.

Note: this reverts commit 29030374
(net: fix sk_forward_alloc corruptions), since we dont need to lock
socket anymore.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: 单卫 &lt;shanwei88@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: fix sk_forward_alloc corruptions</title>
<updated>2012-02-13T19:28:51Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-05-29T07:20:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=956a79d503998a763dd71847f2f9eb19349c2aba'/>
<id>urn:sha1:956a79d503998a763dd71847f2f9eb19349c2aba</id>
<content type='text'>
commit 2903037400a26e7c0cc93ab75a7d62abfacdf485 upstream.

As David found out, sock_queue_err_skb() should be called with socket
lock hold, or we risk sk_forward_alloc corruption, since we use non
atomic operations to update this field.

This patch adds bh_lock_sock()/bh_unlock_sock() pair to three spots.
(BH already disabled)

1) skb_tstamp_tx()
2) Before calling ip_icmp_error(), in __udp4_lib_err()
3) Before calling ipv6_icmp_error(), in __udp6_lib_err()

Reported-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: 单卫 &lt;shanwei88@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gro: reset vlan_tci on reuse</title>
<updated>2011-12-09T17:21:40Z</updated>
<author>
<name>Benjamin Poirier</name>
<email>bpoirier@suse.de</email>
</author>
<published>2011-11-30T12:47:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5aff28abc7e0ec1ddd562372ae4fa01e8e4d4073'/>
<id>urn:sha1:5aff28abc7e0ec1ddd562372ae4fa01e8e4d4073</id>
<content type='text'>
This one liner is part of upstream
commit 3701e51382a026cba10c60b03efabe534fba4ca4
Author: Jesse Gross &lt;jesse@nicira.com&gt;

    vlan: Centralize handling of hardware acceleration.

The bulk of that commit is a rework of the hardware assisted vlan tagging
driver interface, and as such doesn't classify for -stable inclusion. The fix
that is needed is a part of that commit but can work independently of the
rest.

This patch can avoid panics on the 2.6.32.y -stable kernels and is in the same
spirit as mainline commits
66c46d7 gro: Reset dev pointer on reuse
6d152e2 gro: reset skb_iif on reuse
which are already in -stable.

For drivers using the vlan_gro_frags() interface, a packet with an invalid tci
leads to GRO_DROP and napi_reuse_skb(). The skb has to be sanitized before
being reused or we may send an skb with an invalid vlan_tci field up the stack
where it is not expected.

Signed-off-by: Benjamin Poirier &lt;bpoirier@suse.de&gt;
Cc: Jesse Gross &lt;jesse@nicira.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;

</content>
</entry>
<entry>
<title>scm: lower SCM_MAX_FD</title>
<updated>2011-11-07T20:32:45Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-11-23T14:09:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6719bac67645ca27b2e74726387705b589a89a24'/>
<id>urn:sha1:6719bac67645ca27b2e74726387705b589a89a24</id>
<content type='text'>
commit bba14de98753cb6599a2dae0e520714b2153522d upstream.

Lower SCM_MAX_FD from 255 to 253 so that allocations for scm_fp_list are
halved. (commit f8d570a4 added two pointers in this structure)

scm_fp_dup() should not copy whole structure (and trigger kmemcheck
warnings), but only the used part. While we are at it, only allocate
needed size.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.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>GRO: fix merging a paged skb after non-paged skbs</title>
<updated>2011-11-07T20:31:51Z</updated>
<author>
<name>Michal Schmidt</name>
<email>mschmidt@redhat.com</email>
</author>
<published>2011-01-24T12:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=141ec4b17b6744b06ee0516d187170a29a101560'/>
<id>urn:sha1:141ec4b17b6744b06ee0516d187170a29a101560</id>
<content type='text'>
commit d1dc7abf2fafa34b0ffcd070fd59405aa9c0a4d8 upstream.

Suppose that several linear skbs of the same flow were received by GRO. They
were thus merged into one skb with a frag_list. Then a new skb of the same flow
arrives, but it is a paged skb with data starting in its frags[].

Before adding the skb to the frag_list skb_gro_receive() will of course adjust
the skb to throw away the headers. It correctly modifies the page_offset and
size of the frag, but it leaves incorrect information in the skb:
 -&gt;data_len is not decreased at all.
 -&gt;len is decreased only by headlen, as if no change were done to the frag.
Later in a receiving process this causes skb_copy_datagram_iovec() to return
-EFAULT and this is seen in userspace as the result of the recv() syscall.

In practice the bug can be reproduced with the sfc driver. By default the
driver uses an adaptive scheme when it switches between using
napi_gro_receive() (with skbs) and napi_gro_frags() (with pages). The bug is
reproduced when under rx load with enough successful GRO merging the driver
decides to switch from the former to the latter.

Manual control is also possible, so reproducing this is easy with netcat:
 - on machine1 (with sfc): nc -l 12345 &gt; /dev/null
 - on machine2: nc machine1 12345 &lt; /dev/zero
 - on machine1:
   echo 1 &gt; /sys/module/sfc/parameters/rx_alloc_method  # use skbs
   echo 2 &gt; /sys/module/sfc/parameters/rx_alloc_method  # use pages
 - See that nc has quit suddenly.

[v2: Modified by Eric Dumazet to avoid advancing skb-&gt;data past the end
     and to use a temporary variable.]

Signed-off-by: Michal Schmidt &lt;mschmidt@redhat.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.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: Compute protocol sequence numbers and fragment IDs using MD5.</title>
<updated>2011-08-16T01:57:20Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-08-04T03:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=263b89378807581c501e4673634fee5253126812'/>
<id>urn:sha1:263b89378807581c501e4673634fee5253126812</id>
<content type='text'>
Computers have become a lot faster since we compromised on the
partial MD4 hash which we use currently for performance reasons.

MD5 is a much safer choice, and is inline with both RFC1948 and
other ISS generators (OpenBSD, Solaris, etc.)

Furthermore, only having 24-bits of the sequence number be truly
unpredictable is a very serious limitation.  So the periodic
regeneration and 8-bit counter have been removed.  We compute and
use a full 32-bit sequence number.

For ipv6, DCCP was found to use a 32-bit truncated initial sequence
number (it needs 43-bits) and that is fixed here as well.

Reported-by: Dan Kaminsky &lt;dan@doxpara.com&gt;
Tested-by: Willy Tarreau &lt;w@1wt.eu&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: filter: Use WARN_RATELIMIT</title>
<updated>2011-07-13T03:29:26Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-05-21T07:48:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5eabe872301b2754122ce37fc4d1adfafbc94182'/>
<id>urn:sha1:5eabe872301b2754122ce37fc4d1adfafbc94182</id>
<content type='text'>
[ Upstream commit 6c4a5cb219520c7bc937ee186ca53f03733bd09f ]

A mis-configured filter can spam the logs with lots of stack traces.

Rate-limit the warnings and add printout of the bogus filter information.

Original-patch-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: Joe Perches &lt;joe@perches.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>
</feed>
