syzbot


general protection fault in gcmaes_crypt_by_sg

Status: fixed on 2019/02/26 22:09
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+c5048caf67d09ee24549@syzkaller.appspotmail.com
Fix commit: d829e9c4112b tls: convert to generic sk_msg interface
First crash: 2252d, last: 2243d
Discussions (1)
Title Replies (including bot) Last reply
general protection fault in gcmaes_crypt_by_sg 3 (4) 2019/02/26 07:33
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 general protection fault in gcmaes_crypt_by_sg C error 7 1169d 2042d 0/1 upstream: reported C repro on 2019/05/03 04:23
upstream general protection fault in gcmaes_crypt_by_sg (2) crypto C error done 28 1780d 1827d 15/28 fixed on 2020/03/11 20:34

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
kobject: 'loop1' (00000000ab7a2a7a): kobject_uevent_env
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 6720 Comm: syz-executor4 Not tainted 4.19.0-rc7+ #260
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
kobject: 'loop1' (00000000ab7a2a7a): fill_kobj_path: path = '/devices/virtual/block/loop1'
RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:73 [inline]
RIP: 0010:gcmaes_crypt_by_sg+0x56f/0x2110 arch/x86/crypto/aesni-intel_glue.c:834
kobject: 'loop3' (000000003fc298d9): kobject_uevent_env
Code: c1 e9 03 80 3c 11 00 0f 85 bf 18 00 00 48 8d 78 08 48 89 84 24 50 01 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <0f> b6 14 11 84 d2 74 09 80 fa 03 0f 8e 6b 15 00 00 44 8b 60 08 48
RSP: 0018:ffff8801bca07130 EFLAGS: 00010202
kobject: 'loop3' (000000003fc298d9): fill_kobj_path: path = '/devices/virtual/block/loop3'
RAX: 0000000000000000 RBX: ffff880194c5e970 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff835700fc RDI: 0000000000000008
RBP: ffff8801bca07530 R08: ffff880192c162c0 R09: ffff8801d86f7260
R10: ffff8801bca077c0 R11: ffff8801bca077eb R12: 000000000000000d
R13: 000000000000000d R14: ffff8801bca07248 R15: ffff8801bca077e0
FS:  000000000116c940(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
kobject: 'loop5' (0000000025dc68f8): kobject_uevent_env
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kobject: 'loop5' (0000000025dc68f8): fill_kobj_path: path = '/devices/virtual/block/loop5'
CR2: 0000001b2e829000 CR3: 00000001b94e5000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kobject: 'loop0' (000000004853d41c): kobject_uevent_env
kobject: 'loop0' (000000004853d41c): fill_kobj_path: path = '/devices/virtual/block/loop0'
 gcmaes_encrypt.constprop.15+0x7d7/0x1190 arch/x86/crypto/aesni-intel_glue.c:929
kobject: 'loop2' (000000009ca80e3b): kobject_uevent_env
kobject: 'loop2' (000000009ca80e3b): fill_kobj_path: path = '/devices/virtual/block/loop2'
 generic_gcmaes_encrypt+0x12d/0x186 arch/x86/crypto/aesni-intel_glue.c:1294
IPVS: fo: TCP 172.20.20.187:20000 - no destination available
 crypto_aead_encrypt include/crypto/aead.h:335 [inline]
 gcmaes_wrapper_encrypt+0x162/0x200 arch/x86/crypto/aesni-intel_glue.c:1127
 crypto_aead_encrypt include/crypto/aead.h:335 [inline]
 tls_do_encryption net/tls/tls_sw.c:534 [inline]
 tls_push_record+0xc12/0x17f0 net/tls/tls_sw.c:583
kobject: 'loop3' (000000003fc298d9): kobject_uevent_env
kobject: 'loop3' (000000003fc298d9): fill_kobj_path: path = '/devices/virtual/block/loop3'
 tls_sw_push_pending_record+0x22/0x30 net/tls/tls_sw.c:597
 tls_handle_open_record net/tls/tls_main.c:155 [inline]
 tls_sk_proto_close+0x439/0x750 net/tls/tls_main.c:272
kobject: 'loop5' (0000000025dc68f8): kobject_uevent_env
 inet_release+0x104/0x1f0 net/ipv4/af_inet.c:428
 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:458
kobject: 'loop5' (0000000025dc68f8): fill_kobj_path: path = '/devices/virtual/block/loop5'
 __sock_release+0xd7/0x250 net/socket.c:579
 sock_close+0x19/0x20 net/socket.c:1141
 __fput+0x385/0xa30 fs/file_table.c:278
kobject: 'loop3' (000000003fc298d9): kobject_uevent_env
 ____fput+0x15/0x20 fs/file_table.c:309
 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
kobject: 'loop3' (000000003fc298d9): fill_kobj_path: path = '/devices/virtual/block/loop3'
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166
kobject: 'loop0' (000000004853d41c): kobject_uevent_env
kobject: 'loop0' (000000004853d41c): fill_kobj_path: path = '/devices/virtual/block/loop0'
 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
 do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x411021
Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 34 19 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007ffef13f5c40 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000411021
RDX: 0000001b2e820000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00000000ff455060 R09: 00000000ff455064
R10: 00007ffef13f5b70 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000001 R14: 000000000000047e R15: 0000000000000004
Modules linked in:
---[ end trace f55ad1982a225f28 ]---
RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:73 [inline]
RIP: 0010:gcmaes_crypt_by_sg+0x56f/0x2110 arch/x86/crypto/aesni-intel_glue.c:834
Code: c1 e9 03 80 3c 11 00 0f 85 bf 18 00 00 48 8d 78 08 48 89 84 24 50 01 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <0f> b6 14 11 84 d2 74 09 80 fa 03 0f 8e 6b 15 00 00 44 8b 60 08 48
RSP: 0018:ffff8801bca07130 EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff880194c5e970 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff835700fc RDI: 0000000000000008
RBP: ffff8801bca07530 R08: ffff880192c162c0 R09: ffff8801d86f7260
R10: ffff8801bca077c0 R11: ffff8801bca077eb R12: 000000000000000d
R13: 000000000000000d R14: ffff8801bca07248 R15: ffff8801bca077e0
FS:  000000000116c940(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2e829000 CR3: 00000001b94e5000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/10/14 20:12 net-next-old d864991b220b caf12900 .config console log report ci-upstream-net-kasan-gce
2018/10/10 15:37 net-next-old b18719157762 5b11ac2c .config console log report ci-upstream-net-kasan-gce
2018/10/05 19:30 linux-next 12ffaa1197f5 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.