[ovs-git] [openvswitch/ovs] 38008c: ip_tunnel: Fix bugs that could crash kernel

GitHub noreply at github.com
Wed Aug 15 20:28:02 UTC 2018

  Branch: refs/heads/branch-2.10
  Home:   https://github.com/openvswitch/ovs
  Commit: 38008c4bc5104f73f2300a1645f9087ff358af42
  Author: Yifeng Sun <pkusunyifeng at gmail.com>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M datapath/linux/compat/ip_tunnel.c

  Log Message:
  ip_tunnel: Fix bugs that could crash kernel

Without this patch, OVS kernel module can delete itn->fb_tunnel_dev
one more time than necessary, which causes kernel crash.

On kernel 4.4.0-116-generic, the crash can be reproduced by running
the simple test provided below through check-kernel.

  make & make modules_install
  rmmod ip_gre gre ip_tunnel
  modprobe openvswitch
  make check-kernel TESTSUITEFLAGS=x

Simple test:

AT_SETUP([datapath - crash test])
ip link del gre0
AT_CHECK([ovs-vsctl -- set bridge br0])
ADD_BR([br-underlay], [set bridge br-underlay])
AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
ADD_VETH(p0, at_ns0, br-underlay, "")
AT_CHECK([ip addr add dev br-underlay ""])
AT_CHECK([ip link set dev br-underlay up])
ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [], [])
tcpdump -U -i br-underlay -w underlay.pcap &
sleep 1

Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: William Tu <u9012063 at gmail.com>

      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

More information about the git mailing list