<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ipv6/udp.c, branch linux-3.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-08-30T21:39:01Z</updated>
<entry>
<title>net: relax PKTINFO non local ipv6 udp xmit check</title>
<updated>2011-08-30T21:39:01Z</updated>
<author>
<name>Maciej Żenczykowski</name>
</author>
<published>2011-08-28T12:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec0506dbe4e240ecd4c32bf74c84a88ce1ddb414'/>
<id>urn:sha1:ec0506dbe4e240ecd4c32bf74c84a88ce1ddb414</id>
<content type='text'>
Allow transparent sockets to be less restrictive about
the source ip of ipv6 udp packets being sent.

Google-Bug-Id: 5018138
Signed-off-by: Maciej Żenczykowski &lt;maze@google.com&gt;
CC: "Erik Kline" &lt;ek@google.com&gt;
CC: "Lorenzo Colitti" &lt;lorenzo@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: make fragment identifications less predictable</title>
<updated>2011-07-22T04:25:58Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2011-07-22T04:25:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87c48fa3b4630905f98268dde838ee43626a060c'/>
<id>urn:sha1:87c48fa3b4630905f98268dde838ee43626a060c</id>
<content type='text'>
IPv6 fragment identification generation is way beyond what we use for
IPv4 : It uses a single generator. Its not scalable and allows DOS
attacks.

Now inetpeer is IPv6 aware, we can use it to provide a more secure and
scalable frag ident generator (per destination, instead of system wide)

This patch :
1) defines a new secure_ipv6_id() helper
2) extends inet_getid() to provide 32bit results
3) extends ipv6_select_ident() with a new dest parameter

Reported-by: Fernando Gont &lt;fernando@gont.com.ar&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet</title>
<updated>2011-06-22T05:34:27Z</updated>
<author>
<name>Xufeng Zhang</name>
</author>
<published>2011-06-21T10:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9cfaa8def1c795a512bc04f2aec333b03724ca2e'/>
<id>urn:sha1:9cfaa8def1c795a512bc04f2aec333b03724ca2e</id>
<content type='text'>
Consider this scenario: When the size of the first received udp packet
is bigger than the receive buffer, MSG_TRUNC bit is set in msg-&gt;msg_flags.
However, if checksum error happens and this is a blocking socket, it will
goto try_again loop to receive the next packet.  But if the size of the
next udp packet is smaller than receive buffer, MSG_TRUNC flag should not
be set, but because MSG_TRUNC bit is not cleared in msg-&gt;msg_flags before
receive the next packet, MSG_TRUNC is still set, which is wrong.

Fix this problem by clearing MSG_TRUNC flag when starting over for a
new packet.

Signed-off-by: Xufeng Zhang &lt;xufeng.zhang@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6/udp: Use the correct variable to determine non-blocking condition</title>
<updated>2011-06-22T05:34:27Z</updated>
<author>
<name>Xufeng Zhang</name>
</author>
<published>2011-06-21T10:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32c90254ed4a0c698caa0794ebb4de63fcc69631'/>
<id>urn:sha1:32c90254ed4a0c698caa0794ebb4de63fcc69631</id>
<content type='text'>
udpv6_recvmsg() function is not using the correct variable to determine
whether or not the socket is in non-blocking operation, this will lead
to unexpected behavior when a UDP checksum error occurs.

Consider a non-blocking udp receive scenario: when udpv6_recvmsg() is
called by sock_common_recvmsg(), MSG_DONTWAIT bit of flags variable in
udpv6_recvmsg() is cleared by "flags &amp; ~MSG_DONTWAIT" in this call:

    err = sk-&gt;sk_prot-&gt;recvmsg(iocb, sk, msg, size, flags &amp; MSG_DONTWAIT,
                   flags &amp; ~MSG_DONTWAIT, &amp;addr_len);

i.e. with udpv6_recvmsg() getting these values:

	int noblock = flags &amp; MSG_DONTWAIT
	int flags = flags &amp; ~MSG_DONTWAIT

So, when udp checksum error occurs, the execution will go to
csum_copy_err, and then the problem happens:

    csum_copy_err:
            ...............
            if (flags &amp; MSG_DONTWAIT)
                    return -EAGAIN;
            goto try_again;
            ...............

But it will always go to try_again as MSG_DONTWAIT has been cleared
from flags at call time -- only noblock contains the original value
of MSG_DONTWAIT, so the test should be:

            if (noblock)
                    return -EAGAIN;

This is also consistent with what the ipv4/udp code does.

Signed-off-by: Xufeng Zhang &lt;xufeng.zhang@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: convert %p usage to %pK</title>
<updated>2011-05-24T05:13:12Z</updated>
<author>
<name>Dan Rosenberg</name>
</author>
<published>2011-05-23T12:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71338aa7d050c86d8765cd36e46be514fb0ebbce'/>
<id>urn:sha1:71338aa7d050c86d8765cd36e46be514fb0ebbce</id>
<content type='text'>
The %pK format specifier is designed to hide exposed kernel pointers,
specifically via /proc interfaces.  Exposing these pointers provides an
easy target for kernel write vulnerabilities, since they reveal the
locations of writable structures containing easily triggerable function
pointers.  The behavior of %pK depends on the kptr_restrict sysctl.

If kptr_restrict is set to 0, no deviation from the standard %p behavior
occurs.  If kptr_restrict is set to 1, the default, if the current user
(intended to be a reader via seq_printf(), etc.) does not have CAP_SYSLOG
(currently in the LSM tree), kernel pointers using %pK are printed as 0's.
 If kptr_restrict is set to 2, kernel pointers using %pK are printed as
0's regardless of privileges.  Replacing with 0's was chosen over the
default "(null)", which cannot be parsed by userland %p, which expects
"(nil)".

The supporting code for kptr_restrict and %pK are currently in the -mm
tree.  This patch converts users of %p in net/ to %pK.  Cases of printing
pointers to the syslog are not covered, since this would eliminate useful
information for postmortem debugging and the reading of the syslog is
already optionally protected by the dmesg_restrict sysctl.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Thomas Graf &lt;tgraf@infradead.org&gt;
Cc: Eugene Teo &lt;eugeneteo@kernel.org&gt;
Cc: Kees Cook &lt;kees.cook@canonical.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Eric Paris &lt;eparis@parisplace.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net:use help function of skb_checksum_start_offset to calculate offset</title>
<updated>2011-04-28T20:28:57Z</updated>
<author>
<name>Shan Wei</name>
</author>
<published>2011-04-22T11:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96339d6c490a32de35fa798ca7922d13a8538ecd'/>
<id>urn:sha1:96339d6c490a32de35fa798ca7922d13a8538ecd</id>
<content type='text'>
Although these are equivalent, but the skb_checksum_start_offset() is more readable.

Signed-off-by: Shan Wei &lt;shanwei@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-04-26T19:16:46Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2011-04-26T19:16:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bd93d7af1581d40e3c4b25242472661cb7c637a'/>
<id>urn:sha1:2bd93d7af1581d40e3c4b25242472661cb7c637a</id>
<content type='text'>
Resolved logic conflicts causing a build failure due to
drivers/net/r8169.c changes using a patch from Stephen Rothwell.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>inet: constify ip headers and in6_addr</title>
<updated>2011-04-22T18:04:14Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2011-04-22T04:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b71d1d426d263b0b6cb5760322efebbfc89d4463'/>
<id>urn:sha1:b71d1d426d263b0b6cb5760322efebbfc89d4463</id>
<content type='text'>
Add const qualifiers to structs iphdr, ipv6hdr and in6_addr pointers
where possible, to make code intention more obvious.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: udp: fix the wrong headroom check</title>
<updated>2011-04-21T17:39:10Z</updated>
<author>
<name>Shan Wei</name>
</author>
<published>2011-04-19T22:52:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9cf73ea7ff78f52662c8658d93c226effbbedde'/>
<id>urn:sha1:a9cf73ea7ff78f52662c8658d93c226effbbedde</id>
<content type='text'>
At this point, skb-&gt;data points to skb_transport_header.
So, headroom check is wrong.

For some case:bridge(UFO is on) + eth device(UFO is off),
there is no enough headroom for IPv6 frag head.
But headroom check is always false.

This will bring about data be moved to there prior to skb-&gt;head,
when adding IPv6 frag header to skb.

Signed-off-by: Shan Wei &lt;shanwei@cn.fujitsu.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)</title>
<updated>2011-04-06T20:07:09Z</updated>
<author>
<name>Neil Horman</name>
</author>
<published>2011-04-06T20:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47482f132a689af168fae3055ff1899dfd032d3a'/>
<id>urn:sha1:47482f132a689af168fae3055ff1899dfd032d3a</id>
<content type='text'>
properly record sk_rxhash in ipv6 sockets (v2)

Noticed while working on another project that flows to sockets which I had open
on a test systems weren't getting steered properly when I had RFS enabled.
Looking more closely I found that:

1) The affected sockets were all ipv6
2) They weren't getting steered because sk-&gt;sk_rxhash was never set from the
incomming skbs on that socket.

This was occuring because there are several points in the IPv4 tcp and udp code
which save the rxhash value when a new connection is established.  Those calls
to sock_rps_save_rxhash were never added to the corresponding ipv6 code paths.
This patch adds those calls.  Tested by myself to properly enable RFS
functionalty on ipv6.

Change notes:
v2:
	Filtered UDP to only arm RFS on bound sockets (Eric Dumazet)

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
