general protection fault in iptunnel_xmit

10 views
Skip to first unread message

syzbot

unread,
Jul 28, 2019, 12:39:06 AM7/28/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7250956f Linux 4.19.61
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16ec7794600000
kernel config: https://syzkaller.appspot.com/x/.config?x=13e37a4c57ecad7f
dashboard link: https://syzkaller.appspot.com/bug?extid=3bf3092c8affc27a5693
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1035c364600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16485ff4600000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+3bf309...@syzkaller.appspotmail.com

audit: type=1400 audit(1564286269.474:39): avc: denied { read } for
pid=7913 comm="syz-executor101"
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tclass=netlink_generic_socket permissive=1
Own node identity ac14141, cluster identity 4711
New replicast peer: 172.20.20.0
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 7913 Comm: syz-executor101 Not tainted 4.19.61 #35
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:iptunnel_xmit_stats include/net/ip_tunnels.h:458 [inline]
RIP: 0010:iptunnel_xmit+0x6cc/0x9b0 net/ipv4/ip_tunnel_core.c:94
Code: 01 eb bb e8 06 10 8a fb bf 01 00 00 00 e8 0c f0 67 fb 49 8d bd 88 05
00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f
85 9e 02 00 00 49 8b 9d 88 05 00 00 e8 de 53 44 fd
RSP: 0018:ffff8880969df038 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000000b1 RSI: ffffffff85e13fca RDI: 0000000000000588
RBP: ffff8880969df098 R08: ffff888096988280 R09: ffff888096988b70
R10: ffff8880969deec0 R11: 0000000000000000 R12: 00000000000000fc
R13: 0000000000000000 R14: ffff888096bde514 R15: ffff8880968963c0
FS: 0000000002516880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 00000000a9b67000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
udp_tunnel_xmit_skb+0x242/0x320 net/ipv4/udp_tunnel.c:182
tipc_udp_xmit.isra.0+0x7a7/0xbe0 net/tipc/udp_media.c:180
tipc_udp_send_msg+0x28c/0x490 net/tipc/udp_media.c:245
tipc_bearer_xmit_skb+0x16c/0x360 net/tipc/bearer.c:501
tipc_enable_bearer+0xabe/0xd20 net/tipc/bearer.c:326
__tipc_nl_bearer_enable+0x2d1/0x3b0 net/tipc/bearer.c:896
tipc_nl_bearer_enable+0x23/0x40 net/tipc/bearer.c:904
genl_family_rcv_msg+0x6db/0xd30 net/netlink/genetlink.c:602
genl_rcv_msg+0xca/0x16c net/netlink/genetlink.c:627
netlink_rcv_skb+0x17d/0x460 net/netlink/af_netlink.c:2454
genl_rcv+0x29/0x40 net/netlink/genetlink.c:638
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x537/0x720 net/netlink/af_netlink.c:1343
netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xd7/0x130 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0x105/0x1d0 net/socket.c:2153
__do_sys_sendmsg net/socket.c:2162 [inline]
__se_sys_sendmsg net/socket.c:2160 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2160
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4458d9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 9b d4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc969dc5e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004458d9
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00007ffc969dc600 R08: 0000000000000000 R09: 0000000001bbbbbb
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000403290 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#2] PREEMPT SMP KASAN
CPU: 0 PID: 7913 Comm: syz-executor101 Tainted: G D 4.19.61
#35
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:iptunnel_xmit_stats include/net/ip_tunnels.h:458 [inline]
RIP: 0010:iptunnel_xmit+0x6cc/0x9b0 net/ipv4/ip_tunnel_core.c:94
Code: 01 eb bb e8 06 10 8a fb bf 01 00 00 00 e8 0c f0 67 fb 49 8d bd 88 05
00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f
85 9e 02 00 00 49 8b 9d 88 05 00 00 e8 de 53 44 fd
RSP: 0018:ffff8880ae807888 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000000b1 RSI: ffffffff85e13fca RDI: 0000000000000588
RBP: ffff8880ae8078e8 R08: ffff888096988280 R09: ffffed1015d05cc3
R10: ffff8880ae807710 R11: ffff8880ae82e613 R12: 00000000000000fc
R13: 0000000000000000 R14: ffff888095e4db94 R15: ffff8880920017c0
FS: 0000000002516880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 00000000a9b67000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
udp_tunnel_xmit_skb+0x242/0x320 net/ipv4/udp_tunnel.c:182
tipc_udp_xmit.isra.0+0x7a7/0xbe0 net/tipc/udp_media.c:180
tipc_udp_send_msg+0x28c/0x490 net/tipc/udp_media.c:245
tipc_bearer_xmit_skb+0x16c/0x360 net/tipc/bearer.c:501
tipc_disc_timeout+0x933/0xd60 net/tipc/discover.c:332
call_timer_fn+0x18d/0x720 kernel/time/timer.c:1326
expire_timers kernel/time/timer.c:1363 [inline]
__run_timers kernel/time/timer.c:1682 [inline]
__run_timers kernel/time/timer.c:1650 [inline]
run_timer_softirq+0x652/0x1700 kernel/time/timer.c:1695
__do_softirq+0x25c/0x921 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:372 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:412
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1056
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:891
</IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:788
[inline]
RIP: 0010:oops_end+0x61/0xf0 arch/x86/kernel/dumpstack.c:343
Code: 00 00 00 c7 05 5c c6 49 07 ff ff ff ff e8 37 63 19 00 83 2d 18 04 53
08 01 74 36 48 83 3d 8e e0 4c 07 00 74 53 48 89 df 57 9d <0f> 1f 44 00 00
e8 e5 69 19 00 be 02 00 00 00 48 c7 c7 60 67 78 89
RSP: 0018:ffff8880969deef0 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
RAX: ffff888096988280 RBX: 0000000000000282 RCX: ffffffff813ec6c1
RDX: 0000000000000000 RSI: ffffffff813ec689 RDI: 0000000000000282
RBP: ffff8880969def08 R08: ffff888096988280 R09: fffffbfff1161ef1
R10: fffffbfff1161ef0 R11: 0000000000000003 R12: ffff8880969def88
R13: 000000000000000b R14: ffffffff8744ea80 R15: 0000000000000000
die+0x3e/0x48 arch/x86/kernel/dumpstack.c:405
do_general_protection+0x25d/0x300 arch/x86/kernel/traps.c:561
general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1202
RIP: 0010:iptunnel_xmit_stats include/net/ip_tunnels.h:458 [inline]
RIP: 0010:iptunnel_xmit+0x6cc/0x9b0 net/ipv4/ip_tunnel_core.c:94
Code: 01 eb bb e8 06 10 8a fb bf 01 00 00 00 e8 0c f0 67 fb 49 8d bd 88 05
00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f
85 9e 02 00 00 49 8b 9d 88 05 00 00 e8 de 53 44 fd
RSP: 0018:ffff8880969df038 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000000b1 RSI: ffffffff85e13fca RDI: 0000000000000588
RBP: ffff8880969df098 R08: ffff888096988280 R09: ffff888096988b70
R10: ffff8880969deec0 R11: 0000000000000000 R12: 00000000000000fc
R13: 0000000000000000 R14: ffff888096bde514 R15: ffff8880968963c0
udp_tunnel_xmit_skb+0x242/0x320 net/ipv4/udp_tunnel.c:182
tipc_udp_xmit.isra.0+0x7a7/0xbe0 net/tipc/udp_media.c:180
tipc_udp_send_msg+0x28c/0x490 net/tipc/udp_media.c:245
tipc_bearer_xmit_skb+0x16c/0x360 net/tipc/bearer.c:501
tipc_enable_bearer+0xabe/0xd20 net/tipc/bearer.c:326
__tipc_nl_bearer_enable+0x2d1/0x3b0 net/tipc/bearer.c:896
tipc_nl_bearer_enable+0x23/0x40 net/tipc/bearer.c:904
genl_family_rcv_msg+0x6db/0xd30 net/netlink/genetlink.c:602
genl_rcv_msg+0xca/0x16c net/netlink/genetlink.c:627
netlink_rcv_skb+0x17d/0x460 net/netlink/af_netlink.c:2454
genl_rcv+0x29/0x40 net/netlink/genetlink.c:638
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x537/0x720 net/netlink/af_netlink.c:1343
netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xd7/0x130 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0x105/0x1d0 net/socket.c:2153
__do_sys_sendmsg net/socket.c:2162 [inline]
__se_sys_sendmsg net/socket.c:2160 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2160
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4458d9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 9b d4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc969dc5e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004458d9
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00007ffc969dc600 R08: 0000000000000000 R09: 0000000001bbbbbb
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000403290 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace ae893f5a54980602 ]---
RIP: 0010:iptunnel_xmit_stats include/net/ip_tunnels.h:458 [inline]
RIP: 0010:iptunnel_xmit+0x6cc/0x9b0 net/ipv4/ip_tunnel_core.c:94
Code: 01 eb bb e8 06 10 8a fb bf 01 00 00 00 e8 0c f0 67 fb 49 8d bd 88 05
00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f
85 9e 02 00 00 49 8b 9d 88 05 00 00 e8 de 53 44 fd
RSP: 0018:ffff8880969df038 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000000b1 RSI: ffffffff85e13fca RDI: 0000000000000588
RBP: ffff8880969df098 R08: ffff888096988280 R09: ffff888096988b70
R10: ffff8880969deec0 R11: 0000000000000000 R12: 00000000000000fc
R13: 0000000000000000 R14: ffff888096bde514 R15: ffff8880968963c0
FS: 0000000002516880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 00000000a9b67000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Dec 2, 2019, 6:46:00 AM12/2/19
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 4736bb27774449cf759ee81663b4126a297ba9d4
Author: Xin Long <lucie...@gmail.com>
Date: Mon Jun 17 13:34:13 2019 +0000

ip_tunnel: allow not to count pkts on tstats by setting skb's dev to
NULL

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12b728a6e00000
start commit: 7250956f Linux 4.19.61
git tree: linux-4.19.y
If the result looks correct, please mark the bug fixed by replying with:

#syz fix: ip_tunnel: allow not to count pkts on tstats by setting skb's dev
to NULL

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages