ipv4: fix ip header ident selection in __ip_make_skb()
authorEric Dumazet <edumazet@google.com>
Mon, 20 Aug 2012 07:26:45 +0000 (07:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Aug 2012 21:51:06 +0000 (14:51 -0700)
commita9915a1b52df52ad87f3b33422da95cf25372f09
treef589aadc6e5c0ba2a99d6c09a0a3fded9a80b8fa
parent1a7b27c97ce675b42eeb7bfaf6e15c34f35c8f95
ipv4: fix ip header ident selection in __ip_make_skb()

Christian Casteyde reported a kmemcheck 32-bit read from uninitialized
memory in __ip_select_ident().

It turns out that __ip_make_skb() called ip_select_ident() before
properly initializing iph->daddr.

This is a bug uncovered by commit 1d861aa4b3fb (inet: Minimize use of
cached route inetpeer.)

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=46131

Reported-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c