ip: ip_options_compile() resilient to NULL skb route
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 14 Apr 2011 05:55:37 +0000 (05:55 +0000)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:42:36 +0000 (11:42 -0700)
commit60bae57acf33e686e3dddc7345df56556547f7cd
treec22fb89b73c316d5664237feb42dcc89e5841f49
parent1e37bc6a1325237bc8c5e15de75eefda4846a1e6
ip: ip_options_compile() resilient to NULL skb route

BugLink: http://bugs.launchpad.net/bugs/769042

commit c65353daf137dd41f3ede3baf62d561fca076228 upstream.

Scot Doyle demonstrated ip_options_compile() could be called with an skb
without an attached route, using a setup involving a bridge, netfilter,
and forged IP packets.

Let's make ip_options_compile() and ip_options_rcv_srr() a bit more
robust, instead of changing bridge/netfilter code.

With help from Hiroaki SHIMODA.

Reported-by: Scot Doyle <lkml@scotdoyle.com>
Tested-by: Scot Doyle <lkml@scotdoyle.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
net/ipv4/ip_options.c