general protection fault in xfrmi_decode_session

13 views
Skip to first unread message

syzbot

unread,
Apr 10, 2019, 10:34:05 AM4/10/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 4d552acf Linux 4.19.34
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12f7e2dd200000
kernel config: https://syzkaller.appspot.com/x/.config?x=c95a88291f095edd
dashboard link: https://syzkaller.appspot.com/bug?extid=e10b6610bfc30a9e12e6
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

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

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: 31869 Comm: syz-executor.5 Not tainted 4.19.34 #2
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:xs_net include/net/xfrm.h:253 [inline]
RIP: 0010:xfrmi_decode_session+0xeb/0x630 net/xfrm/xfrm_interface.c:82
Code: 7c e7 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 fd 04 00 00 48 b8 00
00 00 00 00 fc ff df 4f 8b 64 e7 10 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 0f
85 2c 05 00 00 4d 8b 3c 24 e8 92 eb 66 fb e8 ad 42
RSP: 0018:ffff888060b0f120 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88808fb8a840 RCX: ffffc900108cc000
RDX: 0000000000000000 RSI: ffffffff85f1f405 RDI: ffff888083423788
RBP: ffff888060b0f148 R08: ffff8880a9ae8180 R09: ffffed1015d04733
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: 0000000000000000
R13: 0000000000000037 R14: ffff88808fb8a850 R15: ffff888083423780
FS: 00007f08346c6700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f02281e1a90 CR3: 0000000095196000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__xfrm_policy_check+0x1fa/0x2560 net/xfrm/xfrm_policy.c:2342
kobject: 'loop4' (00000000e4ef4b0b): kobject_uevent_env
kobject: 'loop4' (00000000e4ef4b0b): fill_kobj_path: path
= '/devices/virtual/block/loop4'
__xfrm_policy_check2 include/net/xfrm.h:1196 [inline]
xfrm_policy_check include/net/xfrm.h:1201 [inline]
xfrm6_policy_check include/net/xfrm.h:1211 [inline]
vti6_rcv+0x4b9/0x960 net/ipv6/ip6_vti.c:316
xfrm6_esp_rcv+0xd8/0x230 net/ipv6/xfrm6_protocol.c:74
ip6_input_finish+0x374/0x1810 net/ipv6/ip6_input.c:383
kobject: 'loop2' (0000000005455104): kobject_uevent_env
NF_HOOK include/linux/netfilter.h:289 [inline]
NF_HOOK include/linux/netfilter.h:283 [inline]
ip6_input+0xe4/0x3f0 net/ipv6/ip6_input.c:426
kobject: 'loop2' (0000000005455104): fill_kobj_path: path
= '/devices/virtual/block/loop2'
dst_input include/net/dst.h:450 [inline]
ip6_rcv_finish+0x1e7/0x320 net/ipv6/ip6_input.c:76
NF_HOOK include/linux/netfilter.h:289 [inline]
NF_HOOK include/linux/netfilter.h:283 [inline]
ipv6_rcv+0x119/0x430 net/ipv6/ip6_input.c:271
__netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4918
__netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5028
netif_receive_skb_internal+0x117/0x520 net/core/dev.c:5131
napi_frags_finish net/core/dev.c:5674 [inline]
napi_gro_frags+0x623/0xa30 net/core/dev.c:5747
tun_get_user+0x2edb/0x4bb0 drivers/net/tun.c:1936
tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:1982
call_write_iter include/linux/fs.h:1811 [inline]
do_iter_readv_writev+0x55d/0x830 fs/read_write.c:680
do_iter_write fs/read_write.c:959 [inline]
do_iter_write+0x184/0x600 fs/read_write.c:940
vfs_writev+0x1b3/0x2f0 fs/read_write.c:1004
do_writev+0xf6/0x290 fs/read_write.c:1039
__do_sys_writev fs/read_write.c:1112 [inline]
__se_sys_writev fs/read_write.c:1109 [inline]
__x64_sys_writev+0x75/0xb0 fs/read_write.c:1109
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4581b1
Code: 75 14 b8 14 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 e4 b9 fb ff c3 48
83 ec 08 e8 1a 2d 00 00 48 89 04 24 b8 14 00 00 00 0f 05 <48> 8b 3c 24 48
89 c2 e8 63 2d 00 00 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007f08346c5ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 0000000000000046 RCX: 00000000004581b1
RDX: 0000000000000001 RSI: 00007f08346c5c00 RDI: 00000000000000f0
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 00007f08346c69d0 R11: 0000000000000293 R12: 00007f08346c66d4
R13: 00000000004c697a R14: 00000000004dc270 R15: 00000000ffffffff
Modules linked in:
---[ end trace 7fbf29afdd28c079 ]---
RIP: 0010:xs_net include/net/xfrm.h:253 [inline]
RIP: 0010:xfrmi_decode_session+0xeb/0x630 net/xfrm/xfrm_interface.c:82
Code: 7c e7 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 fd 04 00 00 48 b8 00
00 00 00 00 fc ff df 4f 8b 64 e7 10 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 0f
85 2c 05 00 00 4d 8b 3c 24 e8 92 eb 66 fb e8 ad 42
RSP: 0018:ffff888060b0f120 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88808fb8a840 RCX: ffffc900108cc000
RDX: 0000000000000000 RSI: ffffffff85f1f405 RDI: ffff888083423788
RBP: ffff888060b0f148 R08: ffff8880a9ae8180 R09: ffffed1015d04733
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: 0000000000000000
R13: 0000000000000037 R14: ffff88808fb8a850 R15: ffff888083423780
FS: 00007f08346c6700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f02281e1a90 CR3: 0000000095196000 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

unread,
Apr 10, 2019, 11:34:07 AM4/10/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 4d552acf Linux 4.19.34
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16c23e87200000
kernel config: https://syzkaller.appspot.com/x/.config?x=c95a88291f095edd
dashboard link: https://syzkaller.appspot.com/bug?extid=e10b6610bfc30a9e12e6
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12673afd200000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ce334b200000

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

IPv6: ADDRCONF(NETDEV_CHANGE): team0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready
8021q: adding VLAN 0 to HW filter on device batadv0
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: 1 PID: 7895 Comm: syz-executor074 Not tainted 4.19.34 #2
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:xs_net include/net/xfrm.h:253 [inline]
RIP: 0010:xfrmi_decode_session+0xeb/0x630 net/xfrm/xfrm_interface.c:82
Code: 7c e7 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 fd 04 00 00 48 b8 00
00 00 00 00 fc ff df 4f 8b 64 e7 10 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 0f
85 2c 05 00 00 4d 8b 3c 24 e8 92 eb 66 fb e8 ad 42
RSP: 0018:ffff8880805a7120 EFLAGS: 00010a06
RAX: dffffc0000000000 RBX: ffff88809a0b6080 RCX: ffffffff85ed422e
RDX: 1bd5a00000000000 RSI: ffffffff85f1f405 RDI: ffff888097654788
RBP: ffff8880805a7148 R08: ffff888097c8a240 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: dead000000000000
R13: 0000000000000037 R14: ffff88809a0b6090 R15: ffff888097654780
FS: 0000000001dae880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 00000000941f6000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__xfrm_policy_check+0x1fa/0x2560 net/xfrm/xfrm_policy.c:2342
__xfrm_policy_check2 include/net/xfrm.h:1196 [inline]
xfrm_policy_check include/net/xfrm.h:1201 [inline]
xfrm6_policy_check include/net/xfrm.h:1211 [inline]
vti6_rcv+0x4b9/0x960 net/ipv6/ip6_vti.c:316
xfrm6_esp_rcv+0xd8/0x230 net/ipv6/xfrm6_protocol.c:74
ip6_input_finish+0x374/0x1810 net/ipv6/ip6_input.c:383
NF_HOOK include/linux/netfilter.h:289 [inline]
NF_HOOK include/linux/netfilter.h:283 [inline]
ip6_input+0xe4/0x3f0 net/ipv6/ip6_input.c:426
dst_input include/net/dst.h:450 [inline]
ip6_rcv_finish+0x1e7/0x320 net/ipv6/ip6_input.c:76
NF_HOOK include/linux/netfilter.h:289 [inline]
NF_HOOK include/linux/netfilter.h:283 [inline]
ipv6_rcv+0x119/0x430 net/ipv6/ip6_input.c:271
__netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4918
__netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5028
netif_receive_skb_internal+0x117/0x520 net/core/dev.c:5131
napi_frags_finish net/core/dev.c:5674 [inline]
napi_gro_frags+0x623/0xa30 net/core/dev.c:5747
tun_get_user+0x2edb/0x4bb0 drivers/net/tun.c:1936
tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:1982
call_write_iter include/linux/fs.h:1811 [inline]
do_iter_readv_writev+0x55d/0x830 fs/read_write.c:680
do_iter_write fs/read_write.c:959 [inline]
do_iter_write+0x184/0x600 fs/read_write.c:940
vfs_writev+0x1b3/0x2f0 fs/read_write.c:1004
do_writev+0xf6/0x290 fs/read_write.c:1039
__do_sys_writev fs/read_write.c:1112 [inline]
__se_sys_writev fs/read_write.c:1109 [inline]
__x64_sys_writev+0x75/0xb0 fs/read_write.c:1109
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x442060
Code: 05 48 3d 01 f0 ff ff 0f 83 3d 0f fc ff c3 66 2e 0f 1f 84 00 00 00 00
00 66 90 83 3d b1 8f 29 00 00 75 14 b8 14 00 00 00 0f 05 <48> 3d 01 f0 ff
ff 0f 83 14 0f fc ff c3 48 83 ec 08 e8 7a 2b 00 00
RSP: 002b:00007fff67d2e1c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007fff67d2e210 RCX: 0000000000442060
RDX: 0000000000000001 RSI: 00007fff67d2e210 RDI: 00000000000000f0
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff67d2e1e0
R13: 0000000000403490 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 1bcf017648b8252b ]---
RIP: 0010:xs_net include/net/xfrm.h:253 [inline]
RIP: 0010:xfrmi_decode_session+0xeb/0x630 net/xfrm/xfrm_interface.c:82
Code: 7c e7 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 fd 04 00 00 48 b8 00
00 00 00 00 fc ff df 4f 8b 64 e7 10 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 0f
85 2c 05 00 00 4d 8b 3c 24 e8 92 eb 66 fb e8 ad 42
RSP: 0018:ffff8880805a7120 EFLAGS: 00010a06
RAX: dffffc0000000000 RBX: ffff88809a0b6080 RCX: ffffffff85ed422e
RDX: 1bd5a00000000000 RSI: ffffffff85f1f405 RDI: ffff888097654788
RBP: ffff8880805a7148 R08: ffff888097c8a240 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: dead000000000000
R13: 0000000000000037 R14: ffff88809a0b6090 R15: ffff888097654780
FS: 0000000001dae880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 00000000941f6000 CR4: 00000000001406e0
Reply all
Reply to author
Forward
0 new messages