syzbot
general protection fault in xfrmi_decode_session
Status:
upstream: reported C repro on 2019/04/10 14:34
Reported-by: syzbot+e10b6610bfc30a9e12e6@syzkaller.appspotmail.com
First crash: 2671d, last: 1257d
▶
▼
Fix bisection attempts (2)
Sample crash report:
batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
syz-executor333 uses obsolete (PF_INET,SOCK_PACKET)
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: 8101 Comm: syz-executor333 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:read_pnet include/net/net_namespace.h:307 [inline]
RIP: 0010:xs_net include/net/xfrm.h:253 [inline]
RIP: 0010:xfrmi_decode_session+0x146/0x770 net/xfrm/xfrm_interface.c:94
Code: 7c dc 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f4 05 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c dc 10 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 c7 05 00 00 4c 8b 23 e8 a8 22 51 fa e8 33 9c 62
RSP: 0018:ffff8880b161f2c8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86ffedb3
RDX: 0000000000000000 RSI: ffffffff86ffe8b0 RDI: ffff8880abd73788
RBP: 0000000000000039 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000000 R12: ffff8880abd73780
R13: 000000000000003e R14: ffff8880afbc0740 R15: 0000000000000000
FS: 00005555558b2300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fda31d64150 CR3: 000000009ea7e000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__xfrm_policy_check+0x1eb/0x2300 net/xfrm/xfrm_policy.c:2339
__xfrm_policy_check2 include/net/xfrm.h:1202 [inline]
xfrm_policy_check include/net/xfrm.h:1207 [inline]
xfrm6_policy_check include/net/xfrm.h:1217 [inline]
vti6_rcv+0x4f3/0x910 net/ipv6/ip6_vti.c:315
xfrm6_esp_rcv+0xc8/0x220 net/ipv6/xfrm6_protocol.c:74
ip6_input_finish+0x46a/0x17a0 net/ipv6/ip6_input.c:385
NF_HOOK include/linux/netfilter.h:289 [inline]
ip6_input+0xcf/0x3c0 net/ipv6/ip6_input.c:428
ip6_mc_input+0x399/0xa80 net/ipv6/ip6_input.c:505
dst_input include/net/dst.h:461 [inline]
ip6_rcv_finish+0x1d9/0x2f0 net/ipv6/ip6_input.c:76
NF_HOOK include/linux/netfilter.h:289 [inline]
ipv6_rcv+0xf2/0x3f0 net/ipv6/ip6_input.c:273
__netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:4954
__netif_receive_skb+0x27/0x1c0 net/core/dev.c:5066
netif_receive_skb_internal+0xf0/0x3f0 net/core/dev.c:5156
napi_frags_finish net/core/dev.c:5684 [inline]
napi_gro_frags+0x67b/0x990 net/core/dev.c:5757
tun_get_user+0x3029/0x5100 drivers/net/tun.c:1957
tun_chr_write_iter+0xdb/0x1d0 drivers/net/tun.c:2007
call_write_iter include/linux/fs.h:1821 [inline]
new_sync_write fs/read_write.c:474 [inline]
__vfs_write+0x51b/0x770 fs/read_write.c:487
vfs_write+0x1f3/0x540 fs/read_write.c:549
ksys_write+0x12b/0x2a0 fs/read_write.c:599
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fda31cec6e9
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff8f8cbd58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fff8f8cbd68 RCX: 00007fda31cec6e9
RDX: 000000000000007e RSI: 0000000020000380 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff8f8cbd70
R13: 00007fff8f8cbd90 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 47429329c0232ac7 ]---
RIP: 0010:read_pnet include/net/net_namespace.h:307 [inline]
RIP: 0010:xs_net include/net/xfrm.h:253 [inline]
RIP: 0010:xfrmi_decode_session+0x146/0x770 net/xfrm/xfrm_interface.c:94
Code: 7c dc 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f4 05 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c dc 10 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 c7 05 00 00 4c 8b 23 e8 a8 22 51 fa e8 33 9c 62
RSP: 0018:ffff8880b161f2c8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86ffedb3
RDX: 0000000000000000 RSI: ffffffff86ffe8b0 RDI: ffff8880abd73788
RBP: 0000000000000039 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000000 R12: ffff8880abd73780
R13: 000000000000003e R14: ffff8880afbc0740 R15: 0000000000000000
FS: 00005555558b2300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fda31d64150 CR3: 000000009ea7e000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 7c dc jl 0xffffffde
2: 10 48 89 adc %cl,-0x77(%rax)
5: fa cli
6: 48 c1 ea 03 shr $0x3,%rdx
a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
e: 0f 85 f4 05 00 00 jne 0x608
14: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
1b: fc ff df
1e: 49 8b 5c dc 10 mov 0x10(%r12,%rbx,8),%rbx
23: 48 89 da mov %rbx,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 0f 85 c7 05 00 00 jne 0x5fb
34: 4c 8b 23 mov (%rbx),%r12
37: e8 a8 22 51 fa callq 0xfa5122e4
3c: e8 .byte 0xe8
3d: 33 .byte 0x33
3e: 9c pushfq
3f: 62 .byte 0x62
* Struck through repros no longer work on HEAD.