Configuring IPIP Tunnel Causes Kernel Panic

Bug #1596254 reported by Wilton Wong
This bug report is a duplicate of:  Bug #1811803: Crash on "ip link add foo type ipip". Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-lts-wily (Ubuntu)
New
Undecided
Unassigned
linux-lts-xenial (Ubuntu)
New
Undecided
Unassigned

Bug Description

Attempting to create an IPIP tunnel with no additional information using the following python script will cause an Opps.

<SNIP>
#!/usr/bin/python

# Requirements
#
# PIP: sudo apt-get install python-pip
# pyroute2: sudo pip install pyroute2

import sys
import string
import logging
from pyroute2 import IPRoute
from pyroute2 import IPRouteRequest

def main():
    logging.basicConfig()
    ip = IPRoute()

    if not ip.link_lookup(ifname='tun0'):
        print('Adding tun0')
        #print(ip.create(kind='ipip', local=host_ipaddr, remote=str(x), tty=64, ifname='tun' + host_number).review())
        #ip.create(kind='gre', ifname='tun0', gre_local='10.142.0.2', gre_remote='10.142.0.3', gre_ttl=16).commit()
        ip.link('add', ifname='tun0', kind='ipip')
    ip.close()
    return

main()
</SNIP>

Opps follows:
[ 2179.960121] ipip: IPv4 over IPv4 tunneling driver
[ 2179.968023] BUG: unable to handle kernel NULL pointer dereference at 0000000000000108
[ 2179.968176] IP: [<ffffffffc00e69a5>] ipip_netlink_fan.isra.7+0x5/0x230 [ipip]
[ 2179.968234] PGD da0fe067 PUD d9c66067 PMD 0
[ 2179.968283] Oops: 0000 [#1] SMP
[ 2179.968326] Modules linked in: ipip tunnel4 ip_tunnel ppdev crct10dif_pclmul crc32_pclmul aesni_intel aes_x86_64 lrw snd_intel8x0 gf128mul glue_helper ablk_helper cryptd snd_ac97_codec ac97_bus input_leds serio_raw vboxvideo snd_pcm joydev vboxguest i2c_piix4 snd_timer snd soundcore drm 8250_fintek parport_pc video lp parport mac_hid hid_generic usbhid hid psmouse ahci libahci e1000 pata_acpi
[ 2179.968644] CPU: 0 PID: 1427 Comm: crash.py Not tainted 4.2.0-38-generic #45~14.04.1-Ubuntu
[ 2179.968730] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 2179.968815] task: ffff880036b66040 ti: ffff8800da2c0000 task.ti: ffff8800da2c0000
[ 2179.968897] RIP: 0010:[<ffffffffc00e69a5>] [<ffffffffc00e69a5>] ipip_netlink_fan.isra.7+0x5/0x230 [ipip]
[ 2179.968989] RSP: 0018:ffff8800da2c3840 EFLAGS: 00010246
[ 2179.969036] RAX: ffff8800da2c3858 RBX: 0000000000000000 RCX: 0000000000000000
[ 2179.969088] RDX: ffff8800da2c3888 RSI: ffff88011a3e8840 RDI: 0000000000000000
[ 2179.969144] RBP: ffff8800da2c38b8 R08: 0000000000000000 R09: 0000000000000000
[ 2179.969196] R10: ffffffff816b8789 R11: 0000000000020209 R12: ffff88011a3e8000
[ 2179.969249] R13: ffff88011a3e8840 R14: ffff8800da2c3a80 R15: ffffffffc00e8100
[ 2179.969301] FS: 00007fc223507740(0000) GS:ffff88011fc00000(0000) knlGS:0000000000000000
[ 2179.969410] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2179.970022] CR2: 0000000000000108 CR3: 00000000d9e1f000 CR4: 00000000000406f0
[ 2179.970560] Stack:
[ 2179.971089] ffffffffc00e6d12 fffffffffffffff4 0000000000000000 0000000000000000
[ 2179.972154] 0000000000000000 0000000000000000 0000000000000000 0000000000000045
[ 2179.973229] 0000000000000400 ffff880000000000 00000000ffe567fb ffffffff81cedd80
[ 2179.974326] Call Trace:
[ 2179.974862] [<ffffffffc00e6d12>] ? ipip_newlink+0x72/0xa6 [ipip]
[ 2179.975421] [<ffffffff816c92aa>] rtnl_newlink+0x6ca/0x880
[ 2179.975951] [<ffffffff8108e073>] ? __request_module+0x1b3/0x2b0
[ 2179.976473] [<ffffffff813d6333>] ? nla_parse+0xa3/0x100
[ 2179.976972] [<ffffffff813d63eb>] ? nla_strlcpy+0x5b/0x70
[ 2179.977468] [<ffffffff816c5a09>] ? rtnl_link_ops_get+0x39/0x50
[ 2179.977953] [<ffffffff816c8d3c>] ? rtnl_newlink+0x15c/0x880
[ 2179.978428] [<ffffffff816c6605>] rtnetlink_rcv_msg+0x95/0x240
[ 2179.978891] [<ffffffff816a3d6e>] ? __alloc_skb+0x7e/0x280
[ 2179.979341] [<ffffffff816c6570>] ? rtnetlink_rcv+0x40/0x40
[ 2179.979781] [<ffffffff816e84df>] netlink_rcv_skb+0xaf/0xc0
[ 2179.980207] [<ffffffff816c655c>] rtnetlink_rcv+0x2c/0x40
[ 2179.980610] [<ffffffff816e7bf2>] netlink_unicast+0xf2/0x1f0
[ 2179.981031] [<ffffffff816e80c9>] netlink_sendmsg+0x3d9/0x630
[ 2179.981449] [<ffffffff81358e5a>] ? aa_sock_msg_perm+0x5a/0x140
[ 2179.981861] [<ffffffff8169b548>] sock_sendmsg+0x38/0x50
[ 2179.982277] [<ffffffff8169b9e2>] SYSC_sendto+0x102/0x190
[ 2179.982690] [<ffffffff810a0ab4>] ? finish_task_switch+0x64/0x230
[ 2179.983081] [<ffffffff810661d7>] ? __do_page_fault+0x1b7/0x430
[ 2179.983479] [<ffffffff817bec88>] ? __schedule+0x358/0x930
[ 2179.983862] [<ffffffff8169c4de>] SyS_sendto+0xe/0x10
[ 2179.984240] [<ffffffff817c2b32>] entry_SYSCALL_64_fastpath+0x16/0x75
[ 2179.984601] Code: 5d c3 41 8b 84 24 c8 00 00 00 49 03 84 24 d0 00 00 00 4c 29 f0 66 41 89 06 eb d5 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 <48> 8b 87 08 01 00 00 48 85 c0 0f 84 68 01 00 00 44 8b 1a 45 85
[ 2179.986346] RIP [<ffffffffc00e69a5>] ipip_netlink_fan.isra.7+0x5/0x230 [ipip]
[ 2179.987454] RSP <ffff8800da2c3840>
[ 2179.987813] CR2: 0000000000000108
[ 2179.988190] ---[ end trace bfd4b5c73a45e3b6 ]---

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-4.2.0-38-generic 4.2.0-38.45~14.04.1
ProcVersionSignature: Ubuntu 4.2.0-38.45~14.04.1-generic 4.2.8-ckt10
Uname: Linux 4.2.0-38-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.21
Architecture: amd64
Date: Sun Jun 26 00:06:31 2016
InstallationDate: Installed on 2016-06-26 (0 days ago)
InstallationMedia: Ubuntu-Server 14.04.4 LTS "Trusty Tahr" - Release amd64 (20160217.1)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-lts-wily
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Wilton Wong (wiltwong) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.