syzbot


general protection fault in skcipher_walk_done

Status: fixed on 2018/01/11 01:23
Subsystems: crypto
[Documentation on labels]
Fix commit: e57121d08c38 crypto: chacha20poly1305 - validate the digest size
First crash: 2317d, last: 2297d

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 3155 Comm: syzkaller276526 Not tainted 4.15.0-rc5+ #239
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:86 [inline]
RIP: 0010:scatterwalk_pagedone include/crypto/scatterwalk.h:111 [inline]
RIP: 0010:scatterwalk_done include/crypto/scatterwalk.h:119 [inline]
RIP: 0010:skcipher_walk_done+0x278/0xcb0 crypto/skcipher.c:148
RSP: 0018:ffff8801c80b74e0 EFLAGS: 00010202
RAX: 0000000000000000 RBX: 0000000000000020 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: 0000000000000007 RDI: 0000000000000008
RBP: ffff8801c80b7530 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000010 R11: 0000000000000010 R12: ffff8801c80b75c0
R13: 0000000000000020 R14: ffff8801c80b75e0 R15: ffff8801c80b75a0
FS:  0000000001f21880(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020f91f80 CR3: 00000001ca0bb005 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ctr_crypt+0x1b5/0x450 arch/x86/crypto/aesni-intel_glue.c:518
 crypto_skcipher_decrypt include/crypto/skcipher.h:463 [inline]
 simd_skcipher_decrypt+0x1f3/0x2d0 crypto/simd.c:100
 crypto_skcipher_decrypt include/crypto/skcipher.h:463 [inline]
 chacha_decrypt crypto/chacha20poly1305.c:152 [inline]
 poly_tail_continue+0x42a/0x6b0 crypto/chacha20poly1305.c:167
 poly_tail+0x40f/0x520 crypto/chacha20poly1305.c:201
 poly_cipherpad+0x33e/0x470 crypto/chacha20poly1305.c:231
 poly_cipher+0x303/0x440 crypto/chacha20poly1305.c:262
 poly_adpad+0x347/0x480 crypto/chacha20poly1305.c:292
 poly_ad+0x25c/0x300 crypto/chacha20poly1305.c:316
 poly_setkey+0x2fc/0x3e0 crypto/chacha20poly1305.c:343
 poly_init+0x16c/0x1d0 crypto/chacha20poly1305.c:366
 poly_genkey+0x422/0x590 crypto/chacha20poly1305.c:406
 chachapoly_decrypt+0x73/0x90 crypto/chacha20poly1305.c:488
 crypto_aead_decrypt include/crypto/aead.h:362 [inline]
 _aead_recvmsg crypto/algif_aead.c:314 [inline]
 aead_recvmsg+0x154a/0x1cf0 crypto/algif_aead.c:335
 sock_recvmsg_nosec net/socket.c:809 [inline]
 sock_recvmsg+0xc9/0x110 net/socket.c:816
 ___sys_recvmsg+0x2a4/0x640 net/socket.c:2185
 __sys_recvmsg+0xe2/0x210 net/socket.c:2230
 SYSC_recvmsg net/socket.c:2242 [inline]
 SyS_recvmsg+0x2d/0x50 net/socket.c:2237
 entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x43ff19
RSP: 002b:00007ffcce329378 EFLAGS: 00000213 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043ff19
RDX: 0000000040000060 RSI: 00000000205f4fc8 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000213 R12: 0000000000401880
R13: 0000000000401910 R14: 0000000000000000 R15: 0000000000000000
Code: 00 fc ff df 48 c1 e9 03 80 3c 11 00 0f 85 f1 08 00 00 48 8d 78 08 48 ba 00 00 00 00 00 fc ff df 49 89 47 20 48 89 f9 48 c1 e9 03 <0f> b6 14 11 84 d2 74 09 80 fa 03 0f 8e b5 08 00 00 48 8b 55 d0 
RIP: scatterwalk_start include/crypto/scatterwalk.h:86 [inline] RSP: ffff8801c80b74e0
RIP: scatterwalk_pagedone include/crypto/scatterwalk.h:111 [inline] RSP: ffff8801c80b74e0
RIP: scatterwalk_done include/crypto/scatterwalk.h:119 [inline] RSP: ffff8801c80b74e0
RIP: skcipher_walk_done+0x278/0xcb0 crypto/skcipher.c:148 RSP: ffff8801c80b74e0
---[ end trace a2eaa1f1d7c5fa9d ]---

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/12/29 03:15 upstream 5f520fc31876 7d240098 .config console log report syz C ci-upstream-kasan-gce
2017/12/29 03:29 net-next-old d367341b25bd 7d240098 .config console log report syz C ci-upstream-net-kasan-gce
2017/12/29 03:31 linux-next 0e08c463db38 7d240098 .config console log report syz C ci-upstream-next-kasan-gce
2017/12/29 03:29 mmots 37759fa6d0fa 7d240098 .config console log report syz C ci-upstream-mmots-kasan-gce
2017/12/29 02:59 upstream 5f520fc31876 7d240098 .config console log report ci-upstream-kasan-gce
2018/01/08 18:55 net-next-old f66faae2f80a 93b4c6f1 .config console log report ci-upstream-net-kasan-gce
2018/01/02 22:26 net-next-old bcecb4bbf88a 00193447 .config console log report ci-upstream-net-kasan-gce
2017/12/20 01:47 net-next-old f39a5c01c3d2 2d836b1d .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.