<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4, branch v3.6.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/ipv4?h=v3.6.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/ipv4?h=v3.6.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-12-17T17:27:19Z</updated>
<entry>
<title>inet_diag: validate port comparison byte code to prevent unsafe reads</title>
<updated>2012-12-17T17:27:19Z</updated>
<author>
<name>Neal Cardwell</name>
<email>ncardwell@google.com</email>
</author>
<published>2012-12-09T11:09:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=973e442c150c34d5b20a7e20f514aea515053f85'/>
<id>urn:sha1:973e442c150c34d5b20a7e20f514aea515053f85</id>
<content type='text'>
[ Upstream commit 5e1f54201cb481f40a04bc47e1bc8c093a189e23 ]

Add logic to verify that a port comparison byte code operation
actually has the second inet_diag_bc_op from which we read the port
for such operations.

Previously the code blindly referenced op[1] without first checking
whether a second inet_diag_bc_op struct could fit there. So a
malicious user could make the kernel read 4 bytes beyond the end of
the bytecode array by claiming to have a whole port comparison byte
code (2 inet_diag_bc_op structs) when in fact the bytecode was not
long enough to hold both.

Signed-off-by: Neal Cardwell &lt;ncardwell@google.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>inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run()</title>
<updated>2012-12-17T17:27:19Z</updated>
<author>
<name>Neal Cardwell</name>
<email>ncardwell@google.com</email>
</author>
<published>2012-12-08T19:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=38a5e42f97db0bdc47f6f5128777cc6f09ed5669'/>
<id>urn:sha1:38a5e42f97db0bdc47f6f5128777cc6f09ed5669</id>
<content type='text'>
[ Upstream commit f67caec9068cee426ec23cf9005a1dee2ecad187 ]

Add logic to check the address family of the user-supplied conditional
and the address family of the connection entry. We now do not do
prefix matching of addresses from different address families (AF_INET
vs AF_INET6), except for the previously existing support for having an
IPv4 prefix match an IPv4-mapped IPv6 address (which this commit
maintains as-is).

This change is needed for two reasons:

(1) The addresses are different lengths, so comparing a 128-bit IPv6
prefix match condition to a 32-bit IPv4 connection address can cause
us to unwittingly walk off the end of the IPv4 address and read
garbage or oops.

(2) The IPv4 and IPv6 address spaces are semantically distinct, so a
simple bit-wise comparison of the prefixes is not meaningful, and
would lead to bogus results (except for the IPv4-mapped IPv6 case,
which this commit maintains).

Signed-off-by: Neal Cardwell &lt;ncardwell@google.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>inet_diag: validate byte code to prevent oops in inet_diag_bc_run()</title>
<updated>2012-12-17T17:27:18Z</updated>
<author>
<name>Neal Cardwell</name>
<email>ncardwell@google.com</email>
</author>
<published>2012-12-08T19:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2d9f468752e874cc9aae3d0b23a3fd217ea7ddc3'/>
<id>urn:sha1:2d9f468752e874cc9aae3d0b23a3fd217ea7ddc3</id>
<content type='text'>
[ Upstream commit 405c005949e47b6e91359159c24753519ded0c67 ]

Add logic to validate INET_DIAG_BC_S_COND and INET_DIAG_BC_D_COND
operations.

Previously we did not validate the inet_diag_hostcond, address family,
address length, and prefix length. So a malicious user could make the
kernel read beyond the end of the bytecode array by claiming to have a
whole inet_diag_hostcond when the bytecode was not long enough to
contain a whole inet_diag_hostcond of the given address family. Or
they could make the kernel read up to about 27 bytes beyond the end of
a connection address by passing a prefix length that exceeded the
length of addresses of the given family.

Signed-off-by: Neal Cardwell &lt;ncardwell@google.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>inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state</title>
<updated>2012-12-17T17:27:18Z</updated>
<author>
<name>Neal Cardwell</name>
<email>ncardwell@google.com</email>
</author>
<published>2012-12-08T19:43:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=72c455390b576a2b125d9a98106b8b61a74a5072'/>
<id>urn:sha1:72c455390b576a2b125d9a98106b8b61a74a5072</id>
<content type='text'>
[ Upstream commit 1c95df85ca49640576de2f0a850925957b547b84 ]

Fix inet_diag to be aware of the fact that AF_INET6 TCP connections
instantiated for IPv4 traffic and in the SYN-RECV state were actually
created with inet_reqsk_alloc(), instead of inet6_reqsk_alloc(). This
means that for such connections inet6_rsk(req) returns a pointer to a
random spot in memory up to roughly 64KB beyond the end of the
request_sock.

With this bug, for a server using AF_INET6 TCP sockets and serving
IPv4 traffic, an inet_diag user like `ss state SYN-RECV` would lead to
inet_diag_fill_req() causing an oops or the export to user space of 16
bytes of kernel memory as a garbage IPv6 address, depending on where
the garbage inet6_rsk(req) pointed.

Signed-off-by: Neal Cardwell &lt;ncardwell@google.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>ipv4: ip_check_defrag must not modify skb before unsharing</title>
<updated>2012-12-17T17:27:18Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-12-09T23:41:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f410b53608cc49ab1d6bdfd36e7843f851ae1d3b'/>
<id>urn:sha1:f410b53608cc49ab1d6bdfd36e7843f851ae1d3b</id>
<content type='text'>
[ Upstream commit 1bf3751ec90cc3174e01f0d701e8449ce163d113 ]

ip_check_defrag() might be called from af_packet within the
RX path where shared SKBs are used, so it must not modify
the input SKB before it has unshared it for defragmentation.
Use skb_copy_bits() to get the IP header and only pull in
everything later.

The same is true for the other caller in macvlan as it is
called from dev-&gt;rx_handler which can also get a shared SKB.

Reported-by: Eric Leblond &lt;eric@regit.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.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>ipv4: avoid passing NULL to inet_putpeer() in icmpv4_xrlim_allow()</title>
<updated>2012-12-17T17:27:18Z</updated>
<author>
<name>Neal Cardwell</name>
<email>ncardwell@google.com</email>
</author>
<published>2012-11-24T18:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=67e248587152f3976ab9277a48442dbec1ac6fdd'/>
<id>urn:sha1:67e248587152f3976ab9277a48442dbec1ac6fdd</id>
<content type='text'>
[ Upstream commit e1a676424c290b1c8d757e3860170ac7ecd89af4 ]

inet_getpeer_v4() can return NULL under OOM conditions, and while
inet_peer_xrlim_allow() is OK with a NULL peer, inet_putpeer() will
crash.

This code path now uses the same idiom as the others from:
1d861aa4b3fb08822055345f480850205ffe6170 ("inet: Minimize use of
cached route inetpeer.").

Signed-off-by: Neal Cardwell &lt;ncardwell@google.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>ipv4: do not cache looped multicasts</title>
<updated>2012-12-17T17:27:18Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-11-22T21:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1322cf6f121852ba706ec7ae7dab636fe4533447'/>
<id>urn:sha1:1322cf6f121852ba706ec7ae7dab636fe4533447</id>
<content type='text'>
[ Upstream commit 636174219b52b5a8bc51bc23bbcba97cd30a65e3 ]

	Starting from 3.6 we cache output routes for
multicasts only when using route to 224/4. For local receivers
we can set RTCF_LOCAL flag depending on the membership but
in such case we use maddr and saddr which are not caching
keys as before. Additionally, we can not use same place to
cache routes that differ in RTCF_LOCAL flag value.

	Fix it by caching only RTCF_MULTICAST entries
without RTCF_LOCAL (send-only, no loopback). As a side effect,
we avoid unneeded lookup for fnhe when not caching because
multicasts are not redirected and they do not learn PMTU.

	Thanks to Maxime Bizon for showing the caching
problems in __mkroute_output for 3.6 kernels: different
RTCF_LOCAL flag in cache can lead to wrong ip_mc_output or
ip_output call and the visible problem is that traffic can
not reach local receivers via loopback.

Reported-by: Maxime Bizon &lt;mbizon@freebox.fr&gt;
Tested-by: Maxime Bizon &lt;mbizon@freebox.fr&gt;
Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&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: nf_nat: don't check for port change on ICMP tuples</title>
<updated>2012-11-26T20:14:20Z</updated>
<author>
<name>Ulrich Weber</name>
<email>ulrich.weber@sophos.com</email>
</author>
<published>2012-10-25T05:34:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9a406de3049374c0e480baca0ffafd9588c57959'/>
<id>urn:sha1:9a406de3049374c0e480baca0ffafd9588c57959</id>
<content type='text'>
commit 38fe36a248ec3228f8e6507955d7ceb0432d2000 upstream.

ICMP tuples have id in src and type/code in dst.
So comparing src.u.all with dst.u.all will always fail here
and ip_xfrm_me_harder() is called for every ICMP packet,
even if there was no NAT.

Signed-off-by: Ulrich Weber &lt;ulrich.weber@sophos.com&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>tcp: handle tcp_net_metrics_init() order-5 memory allocation failures</title>
<updated>2012-11-26T20:14:19Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-11-16T05:31:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e7c1a252a7236c6a318c703a1bf29e3261a44e9c'/>
<id>urn:sha1:e7c1a252a7236c6a318c703a1bf29e3261a44e9c</id>
<content type='text'>
[ Upstream commit 976a702ac9eeacea09e588456ab165dc06f9ee83 ]

order-5 allocations can fail with current kernels, we should
try vmalloc() as well.

Reported-by: Julien Tinnes &lt;jln@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.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>tcp: fix retransmission in repair mode</title>
<updated>2012-11-26T20:14:19Z</updated>
<author>
<name>Andrew Vagin</name>
<email>avagin@openvz.org</email>
</author>
<published>2012-11-15T04:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c6f7b86211233142300aeec7b1ab4ae640b81abd'/>
<id>urn:sha1:c6f7b86211233142300aeec7b1ab4ae640b81abd</id>
<content type='text'>
[ Upstream commit ec34232575083fd0f43d3a101e8ebb041b203761 ]

Currently if a socket was repaired with a few packet in a write queue,
a kernel bug may be triggered:

kernel BUG at net/ipv4/tcp_output.c:2330!
RIP: 0010:[&lt;ffffffff8155784f&gt;] tcp_retransmit_skb+0x5ff/0x610

According to the initial realization v3.4-rc2-963-gc0e88ff,
all skb-s should look like already posted. This patch fixes code
according with this sentence.

Here are three points, which were not done in the initial patch:
1. A tcp send head should not be changed
2. Initialize TSO state of a skb
3. Reset the retransmission time

This patch moves logic from tcp_sendmsg to tcp_write_xmit. A packet
passes the ussual way, but isn't sent to network. This patch solves
all described problems and handles tcp_sendpages.

Signed-off-by: Andrey Vagin &lt;avagin@openvz.org&gt;
Cc: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Hideaki YOSHIFUJI &lt;yoshfuji@linux-ipv6.org&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.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>
</feed>
