<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/net/xfrm.h, branch linux-3.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.0.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.0.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2012-10-12T20:28:03Z</updated>
<entry>
<title>xfrm: Workaround incompatibility of ESN and async crypto</title>
<updated>2012-10-12T20:28:03Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2012-09-04T00:03:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7218addc4b8bec641937e8236099f52974cf5687'/>
<id>urn:sha1:7218addc4b8bec641937e8236099f52974cf5687</id>
<content type='text'>
[ Upstream commit 3b59df46a449ec9975146d71318c4777ad086744 ]

ESN for esp is defined in RFC 4303. This RFC assumes that the
sequence number counters are always up to date. However,
this is not true if an async crypto algorithm is employed.

If the sequence number counters are not up to date on sequence
number check, we may incorrectly update the upper 32 bit of
the sequence number. This leads to a DOS.

We workaround this by comparing the upper sequence number,
(used for authentication) with the upper sequence number
computed after the async processing. We drop the packet
if these numbers are different.

To do this, we introduce a recheck function that does this
check in the ESN case.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&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>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-3.6</title>
<updated>2011-05-11T18:26:58Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-11T18:26:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3c709f8fb43e07a0403bba4a8ca7ba00ab874994'/>
<id>urn:sha1:3c709f8fb43e07a0403bba4a8ca7ba00ab874994</id>
<content type='text'>
Conflicts:
	drivers/net/benet/be_main.c
</content>
</entry>
<entry>
<title>xfrm: Assign the inner mode output function to the dst entry</title>
<updated>2011-05-10T22:03:34Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2011-05-09T19:36:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=43a4dea4c9d44baae38ddc14b9b6d86fde4c8b88'/>
<id>urn:sha1:43a4dea4c9d44baae38ddc14b9b6d86fde4c8b88</id>
<content type='text'>
As it is, we assign the outer modes output function to the dst entry
when we create the xfrm bundle. This leads to two problems on interfamily
scenarios. We might insert ipv4 packets into ip6_fragment when called
from xfrm6_output. The system crashes if we try to fragment an ipv4
packet with ip6_fragment. This issue was introduced with git commit
ad0081e4 (ipv6: Fragment locally generated tunnel-mode IPSec6 packets
as needed). The second issue is, that we might insert ipv4 packets in
netfilter6 and vice versa on interfamily scenarios.

With this patch we assign the inner mode output function to the dst entry
when we create the xfrm bundle. So xfrm4_output/xfrm6_output from the inner
mode is used and the right fragmentation and netfilter functions are called.
We switch then to outer mode with the output_finish functions.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
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>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-04-22T04:53:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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>Disable rp_filter for IPsec packets</title>
<updated>2011-04-11T01:50:59Z</updated>
<author>
<name>Michael Smith</name>
<email>msmith@cbnco.com</email>
</author>
<published>2011-04-07T04:51:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=990078afbf90e0175e71da2df04595b99153514c'/>
<id>urn:sha1:990078afbf90e0175e71da2df04595b99153514c</id>
<content type='text'>
The reverse path filter interferes with IPsec subnet-to-subnet tunnels,
especially when the link to the IPsec peer is on an interface other than
the one hosting the default route.

With dynamic routing, where the peer might be reachable through eth0
today and eth1 tomorrow, it's difficult to keep rp_filter enabled unless
fake routes to the remote subnets are configured on the interface
currently used to reach the peer.

IPsec provides a much stronger anti-spoofing policy than rp_filter, so
this patch disables the rp_filter for packets with a security path.

Signed-off-by: Michael Smith &lt;msmith@cbnco.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: Assign esn pointers when cloning a state</title>
<updated>2011-03-29T06:34:52Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2011-03-28T19:46:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=af2f464e326ebad57284cfdecb03f1606e89bbc7'/>
<id>urn:sha1:af2f464e326ebad57284cfdecb03f1606e89bbc7</id>
<content type='text'>
When we clone a xfrm state we have to assign the replay_esn
and the preplay_esn pointers to the state if we use the
new replay detection method. To this end, we add a
xfrm_replay_clone() function that allocates memory for
the replay detection and takes over the necessary values
from the original state.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.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>xfrm: Fix initialize repl field of struct xfrm_state</title>
<updated>2011-03-22T01:08:28Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2011-03-22T01:08:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a454f0ccefbfdbfc0e1aa8a5f8010af5e48b8845'/>
<id>urn:sha1:a454f0ccefbfdbfc0e1aa8a5f8010af5e48b8845</id>
<content type='text'>
Commit 'xfrm: Move IPsec replay detection functions to a separate file'
  (9fdc4883d92d20842c5acea77a4a21bb1574b495)
introduce repl field to struct xfrm_state, and only initialize it
under SA's netlink create path, the other path, such as pf_key,
ipcomp/ipcomp6 etc, the repl field remaining uninitialize. So if
the SA is created by pf_key, any input packet with SA's encryption
algorithm will cause panic.

    int xfrm_input()
    {
        ...
        x-&gt;repl-&gt;advance(x, seq);
        ...
    }

This patch fixed it by introduce new function __xfrm_init_state().

Pid: 0, comm: swapper Not tainted 2.6.38-next+ #14 Bochs Bochs
EIP: 0060:[&lt;c078e5d5&gt;] EFLAGS: 00010206 CPU: 0
EIP is at xfrm_input+0x31c/0x4cc
EAX: dd839c00 EBX: 00000084 ECX: 00000000 EDX: 01000000
ESI: dd839c00 EDI: de3a0780 EBP: dec1de88 ESP: dec1de64
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process swapper (pid: 0, ti=dec1c000 task=c09c0f20 task.ti=c0992000)
Stack:
 00000000 00000000 00000002 c0ba27c0 00100000 01000000 de3a0798 c0ba27c0
 00000033 dec1de98 c0786848 00000000 de3a0780 dec1dea4 c0786868 00000000
 dec1debc c074ee56 e1da6b8c de3a0780 c074ed44 de3a07a8 dec1decc c074ef32
Call Trace:
 [&lt;c0786848&gt;] xfrm4_rcv_encap+0x22/0x27
 [&lt;c0786868&gt;] xfrm4_rcv+0x1b/0x1d
 [&lt;c074ee56&gt;] ip_local_deliver_finish+0x112/0x1b1
 [&lt;c074ed44&gt;] ? ip_local_deliver_finish+0x0/0x1b1
 [&lt;c074ef32&gt;] NF_HOOK.clone.1+0x3d/0x44
 [&lt;c074ef77&gt;] ip_local_deliver+0x3e/0x44
 [&lt;c074ed44&gt;] ? ip_local_deliver_finish+0x0/0x1b1
 [&lt;c074ec03&gt;] ip_rcv_finish+0x30a/0x332
 [&lt;c074e8f9&gt;] ? ip_rcv_finish+0x0/0x332
 [&lt;c074ef32&gt;] NF_HOOK.clone.1+0x3d/0x44
 [&lt;c074f188&gt;] ip_rcv+0x20b/0x247
 [&lt;c074e8f9&gt;] ? ip_rcv_finish+0x0/0x332
 [&lt;c072797d&gt;] __netif_receive_skb+0x373/0x399
 [&lt;c0727bc1&gt;] netif_receive_skb+0x4b/0x51
 [&lt;e0817e2a&gt;] cp_rx_poll+0x210/0x2c4 [8139cp]
 [&lt;c072818f&gt;] net_rx_action+0x9a/0x17d
 [&lt;c0445b5c&gt;] __do_softirq+0xa1/0x149
 [&lt;c0445abb&gt;] ? __do_softirq+0x0/0x149

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: Add support for IPsec extended sequence numbers</title>
<updated>2011-03-14T03:22:31Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2011-03-08T00:09:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2cd084678fc1eb75aec4f7ae3d339d232c00ec61'/>
<id>urn:sha1:2cd084678fc1eb75aec4f7ae3d339d232c00ec61</id>
<content type='text'>
This patch adds support for IPsec extended sequence numbers (esn)
as defined in RFC 4303. The bits to manage the anti-replay window
are based on a patch from Alex Badea.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.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>xfrm: Move IPsec replay detection functions to a separate file</title>
<updated>2011-03-14T03:22:30Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2011-03-08T00:08:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9fdc4883d92d20842c5acea77a4a21bb1574b495'/>
<id>urn:sha1:9fdc4883d92d20842c5acea77a4a21bb1574b495</id>
<content type='text'>
To support multiple versions of replay detection, we move the replay
detection functions to a separate file and make them accessible
via function pointers contained in the struct xfrm_replay.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.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>xfrm: Use separate low and high order bits of the sequence numbers in xfrm_skb_cb</title>
<updated>2011-03-14T03:22:28Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2011-03-08T00:06:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1ce3644ade9c865c755bf0f6a4e109b7bb6eb60f'/>
<id>urn:sha1:1ce3644ade9c865c755bf0f6a4e109b7bb6eb60f</id>
<content type='text'>
To support IPsec extended sequence numbers, we split the
output sequence numbers of xfrm_skb_cb in low and high order 32 bits
and we add the high order 32 bits to the input sequence numbers.
All users are updated accordingly.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.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>
</feed>
