]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: make fragment identifications less predictable
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 22 Jul 2011 04:25:58 +0000 (21:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jul 2011 04:25:58 +0000 (21:25 -0700)
commita32e6c1401c2b3237dcf7f1ca715dd286847bf4b
tree1374b52ed0514682f836cfa0a6a683eb549c9613
parentb601ef4c6e4c2c83b9a8ef35e1bf1284cb988144
ipv6: make fragment identifications less predictable

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 <fernando@gont.com.ar>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/char/random.c
include/linux/random.h
include/net/inetpeer.h
include/net/ipv6.h
net/ipv4/inetpeer.c
net/ipv6/ip6_output.c
net/ipv6/udp.c