diff options
| author | David S. Miller <davem@davemloft.net> | 2011-08-03 23:50:44 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-08-06 21:33:19 -0400 |
| commit | 6e5714eaf77d79ae1c8b47e3e040ff5411b717ec (patch) | |
| tree | 30bd0d7a6a0a6ff0ace6da1835ae7b7167cce5e4 /include/linux | |
| parent | bc0b96b54a21246e377122d54569eef71cec535f (diff) | |
net: Compute protocol sequence numbers and fragment IDs using MD5.
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 <dan@doxpara.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/random.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index ce29a040c8dc..d13059f3ea32 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
| @@ -57,18 +57,6 @@ extern void add_interrupt_randomness(int irq); | |||
| 57 | extern void get_random_bytes(void *buf, int nbytes); | 57 | extern void get_random_bytes(void *buf, int nbytes); |
| 58 | void generate_random_uuid(unsigned char uuid_out[16]); | 58 | void generate_random_uuid(unsigned char uuid_out[16]); |
| 59 | 59 | ||
| 60 | extern __u32 secure_ip_id(__be32 daddr); | ||
| 61 | extern __u32 secure_ipv6_id(const __be32 daddr[4]); | ||
| 62 | extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); | ||
| 63 | extern u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, | ||
| 64 | __be16 dport); | ||
| 65 | extern __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, | ||
| 66 | __be16 sport, __be16 dport); | ||
| 67 | extern __u32 secure_tcpv6_sequence_number(__be32 *saddr, __be32 *daddr, | ||
| 68 | __be16 sport, __be16 dport); | ||
| 69 | extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, | ||
| 70 | __be16 sport, __be16 dport); | ||
| 71 | |||
| 72 | #ifndef MODULE | 60 | #ifndef MODULE |
| 73 | extern const struct file_operations random_fops, urandom_fops; | 61 | extern const struct file_operations random_fops, urandom_fops; |
| 74 | #endif | 62 | #endif |
