syzbot


general protection fault in xfrm_policy_insert_list

Status: fixed on 2019/03/06 07:43
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+e879931aaae5c1abca56@syzkaller.appspotmail.com
Fix commit: 12750abad517 xfrm: policy: fix infinite loop when merging src-nodes
First crash: 1949d, last: 1934d
Discussions (1)
Title Replies (including bot) Last reply
general protection fault in xfrm_policy_insert_list 0 (1) 2018/12/24 15:24

Sample crash report:
IPv6: NLM_F_REPLACE set, but no existing node found!
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
kobject: 'tunl0' (00000000532f35c5): kobject_add_internal: parent: 'net', set: 'devices'
CPU: 0 PID: 30953 Comm: syz-executor0 Not tainted 4.20.0+ #11
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:xfrm_policy_insert_list+0x16d/0xfb0 net/xfrm/xfrm_policy.c:1532
Code: ff ff ff 48 c1 e8 03 4c 01 e0 48 89 85 40 ff ff ff e8 47 f7 c3 fa 48 8d bb 19 02 00 00 48 89 f8 48 89 fa 48 c1 e8 03 83 e2 07 <42> 0f b6 04 20 38 d0 7f 08 84 c0 0f 85 af 0b 00 00 44 0f b6 ab 19
kobject: 'tunl0' (00000000532f35c5): kobject_uevent_env
RSP: 0018:ffff8880673bf130 EFLAGS: 00010202
RAX: 0000000020000042 RBX: 00000000fffffff8 RCX: ffffc90005dd1000
RDX: 0000000000000001 RSI: ffffffff86bdfe09 RDI: 0000000100000211
RBP: ffff8880673bf230 R08: ffff888066caa280 R09: 0000000000000003
R10: 0000000000000000 R11: 0000000000000001 R12: dffffc0000000000
R13: 0000000000000000 R14: 00000000ffff8880 R15: 0000000000000000
FS:  00007f3772d57700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe1eca46848 CR3: 000000009b28f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 xfrm_policy_inexact_insert+0x155/0xda0 net/xfrm/xfrm_policy.c:1195
 xfrm_policy_insert+0x623/0x910 net/xfrm/xfrm_policy.c:1570
 xfrm_add_policy+0x2a1/0x6c0 net/xfrm/xfrm_user.c:1657
 xfrm_user_rcv_msg+0x458/0x8d0 net/xfrm/xfrm_user.c:2663
 netlink_rcv_skb+0x17d/0x410 net/netlink/af_netlink.c:2477
 xfrm_netlink_rcv+0x70/0x90 net/xfrm/xfrm_user.c:2671
 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
 netlink_unicast+0x574/0x770 net/netlink/af_netlink.c:1336
 netlink_sendmsg+0xa05/0xf90 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:621 [inline]
 sock_sendmsg+0xdd/0x130 net/socket.c:631
 ___sys_sendmsg+0x7ec/0x910 net/socket.c:2116
 __sys_sendmsg+0x112/0x270 net/socket.c:2154
 __do_sys_sendmsg net/socket.c:2163 [inline]
 __se_sys_sendmsg net/socket.c:2161 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161
 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457ec9
Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f3772d56c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457ec9
RDX: 0000000000000000 RSI: 000000002014f000 RDI: 0000000000000003
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3772d576d4
R13: 00000000004c5394 R14: 00000000004d8e30 R15: 00000000ffffffff
Modules linked in:
---[ end trace d3b7514ebbd0e707 ]---
RIP: 0010:xfrm_policy_insert_list+0x16d/0xfb0 net/xfrm/xfrm_policy.c:1532
Code: ff ff ff 48 c1 e8 03 4c 01 e0 48 89 85 40 ff ff ff e8 47 f7 c3 fa 48 8d bb 19 02 00 00 48 89 f8 48 89 fa 48 c1 e8 03 83 e2 07 <42> 0f b6 04 20 38 d0 7f 08 84 c0 0f 85 af 0b 00 00 44 0f b6 ab 19
kobject: 'loop5' (000000008c1b1f6b): kobject_uevent_env
RSP: 0018:ffff8880673bf130 EFLAGS: 00010202
RAX: 0000000020000042 RBX: 00000000fffffff8 RCX: ffffc90005dd1000
RDX: 0000000000000001 RSI: ffffffff86bdfe09 RDI: 0000000100000211
RBP: ffff8880673bf230 R08: ffff888066caa280 R09: 0000000000000003
kobject: 'tunl0' (00000000532f35c5): fill_kobj_path: path = '/devices/virtual/net/tunl0'
R10: 0000000000000000 R11: 0000000000000001 R12: dffffc0000000000
R13: 0000000000000000 R14: 00000000ffff8880 R15: 0000000000000000
FS:  00007f3772d57700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe1eca46848 CR3: 000000009b28f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/01/08 01:53 net-old 0aaa81377c5a 69d69aa9 .config console log report ci-upstream-net-this-kasan-gce
2018/12/31 20:47 net-old 3bd826451103 2b42fdc8 .config console log report ci-upstream-net-this-kasan-gce
2018/12/28 22:07 net-next-old b71acb0e3721 fc6ae81a .config console log report ci-upstream-net-kasan-gce
2018/12/24 12:39 net-next-old ce28bb445388 be79df56 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.