general protection fault in gcmaes_crypt_by_sg

8 views
Skip to first unread message

syzbot

unread,
May 3, 2019, 12:23:07 AM5/3/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: a03957ab Linux 4.19.38
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15919334a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=dd6b74381d776865
dashboard link: https://syzkaller.appspot.com/bug?extid=be9485f400812da3a983
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+be9485...@syzkaller.appspotmail.com

R10: 0000000000000080 R11: 0000000000000246 R12: 00007f5c9637a6d4
R13: 00000000004c5fa3 R14: 00000000004da748 R15: 0000000000000005
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
kobject: 'loop1' (000000004309045d): fill_kobj_path: path
= '/devices/virtual/block/loop1'
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 29065 Comm: syz-executor.4 Not tainted 4.19.38 #6
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:73 [inline]
RIP: 0010:scatterwalk_pagedone include/crypto/scatterwalk.h:98 [inline]
RIP: 0010:scatterwalk_done include/crypto/scatterwalk.h:106 [inline]
RIP: 0010:gcmaes_crypt_by_sg.constprop.0+0xde2/0x1850
arch/x86/crypto/aesni-intel_glue.c:868
Code: 82 f3 f9 ff ff e8 ee f0 35 00 4c 89 f7 e8 f6 57 ec 01 48 8d 78 08 49
89 c6 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84
c0 74 08 3c 03 0f 8e a5 09 00 00 41 8b 46 08 89 84
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=8241
sclass=netlink_route_socket pig=29083 comm=syz-executor.0
RSP: 0018:ffff88805a47ef90 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 000000000000009d RCX: ffffc9000e6b3000
RDX: 0000000000000001 RSI: ffffffff8321d78b RDI: 0000000000000008
RBP: ffff88805a47f2d0 R08: ffff888083378380 R09: 000000000000000d
R10: ffff88808abdcec0 R11: 0000000000000010 R12: 0000000000000000
kobject: 'loop5' (0000000053c2cef1): kobject_uevent_env
R13: 000000000000009d R14: 0000000000000000 R15: 0000000000000070
FS: 00007f5c9637a700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000008df4d000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kobject: 'loop5' (0000000053c2cef1): fill_kobj_path: path
= '/devices/virtual/block/loop5'
kobject: 'loop3' (0000000046f3b3e7): kobject_uevent_env
gcmaes_encrypt.constprop.0+0x62d/0xd90
arch/x86/crypto/aesni-intel_glue.c:932
kobject: 'loop3' (0000000046f3b3e7): fill_kobj_path: path
= '/devices/virtual/block/loop3'
audit: type=1804 audit(1556853967.384:103): pid=29094 uid=0 auid=4294967295
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
op=invalid_pcr cause=open_writers comm="syz-executor.3"
name="/root/syzkaller-testdir105162120/syzkaller.VLOp61/415/bus" dev="sda1"
ino=17329 res=1
generic_gcmaes_encrypt+0x108/0x159 arch/x86/crypto/aesni-intel_glue.c:1297
crypto_aead_encrypt include/crypto/aead.h:335 [inline]
gcmaes_wrapper_encrypt+0x165/0x200 arch/x86/crypto/aesni-intel_glue.c:1130
crypto_aead_encrypt include/crypto/aead.h:335 [inline]
tls_do_encryption net/tls/tls_sw.c:193 [inline]
tls_push_record+0x9c5/0x13b0 net/tls/tls_sw.c:228
tls_sw_sendpage+0x543/0xd40 net/tls/tls_sw.c:583
XFS (loop1): Invalid superblock magic number
inet_sendpage+0x16b/0x630 net/ipv4/af_inet.c:815
kernel_sendpage+0x95/0xf0 net/socket.c:3377
sock_sendpage+0x8b/0xc0 net/socket.c:847
pipe_to_sendpage+0x299/0x370 fs/splice.c:452
audit: type=1804 audit(1556853967.584:104): pid=29105 uid=0 auid=4294967295
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
op=invalid_pcr cause=open_writers comm="syz-executor.3"
name="/root/syzkaller-testdir105162120/syzkaller.VLOp61/416/bus" dev="sda1"
ino=17313 res=1
splice_from_pipe_feed fs/splice.c:503 [inline]
__splice_from_pipe+0x39a/0x7e0 fs/splice.c:627
splice_from_pipe+0x108/0x170 fs/splice.c:662
generic_splice_sendpage+0x3c/0x50 fs/splice.c:833
do_splice_from fs/splice.c:852 [inline]
direct_splice_actor+0x126/0x1a0 fs/splice.c:1019
splice_direct_to_actor+0x2ea/0x890 fs/splice.c:974
do_splice_direct+0x1da/0x2a0 fs/splice.c:1062
do_sendfile+0x597/0xce0 fs/read_write.c:1446
__do_sys_sendfile64 fs/read_write.c:1507 [inline]
__se_sys_sendfile64 fs/read_write.c:1493 [inline]
__x64_sys_sendfile64+0x1dd/0x220 fs/read_write.c:1493
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458da9
Code: ad b8 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 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f5c96379c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f5c96379c90 RCX: 0000000000458da9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000003
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000080 R11: 0000000000000246 R12: 00007f5c9637a6d4
R13: 00000000004c5fa3 R14: 00000000004da748 R15: 0000000000000005
Modules linked in:
---[ end trace 473a2f6a0224d5ee ]---
RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:73 [inline]
RIP: 0010:scatterwalk_pagedone include/crypto/scatterwalk.h:98 [inline]
RIP: 0010:scatterwalk_done include/crypto/scatterwalk.h:106 [inline]
RIP: 0010:gcmaes_crypt_by_sg.constprop.0+0xde2/0x1850
arch/x86/crypto/aesni-intel_glue.c:868
Code: 82 f3 f9 ff ff e8 ee f0 35 00 4c 89 f7 e8 f6 57 ec 01 48 8d 78 08 49
89 c6 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84
c0 74 08 3c 03 0f 8e a5 09 00 00 41 8b 46 08 89 84
RSP: 0018:ffff88805a47ef90 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 000000000000009d RCX: ffffc9000e6b3000
RDX: 0000000000000001 RSI: ffffffff8321d78b RDI: 0000000000000008
RBP: ffff88805a47f2d0 R08: ffff888083378380 R09: 000000000000000d
R10: ffff88808abdcec0 R11: 0000000000000010 R12: 0000000000000000
R13: 000000000000009d R14: 0000000000000000 R15: 0000000000000070
FS: 00007f5c9637a700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000008df4d000 CR4: 00000000001406e0
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,
Jun 27, 2019, 4:24:05 PM6/27/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: aec3002d Linux 4.19.56
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16b06f79a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=48b721ea0070d1cd
dashboard link: https://syzkaller.appspot.com/bug?extid=be9485f400812da3a983
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=129ecc49a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=157abe45a00000

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

RBP: 0000000000000005 R08: 0000000100000300 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401f90
R13: 0000000000402020 R14: 0000000000000000 R15: 0000000000000000
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: 7967 Comm: syz-executor194 Not tainted 4.19.56 #28
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:73 [inline]
RIP: 0010:scatterwalk_pagedone include/crypto/scatterwalk.h:98 [inline]
RIP: 0010:scatterwalk_done include/crypto/scatterwalk.h:106 [inline]
RIP: 0010:gcmaes_crypt_by_sg.constprop.0+0xde2/0x1850
arch/x86/crypto/aesni-intel_glue.c:868
Code: 82 f3 f9 ff ff e8 6e ac 35 00 4c 89 f7 e8 c6 c7 eb 01 48 8d 78 08 49
89 c6 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84
c0 74 08 3c 03 0f 8e a5 09 00 00 41 8b 46 08 89 84
RSP: 0018:ffff8880807df230 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000034 RCX: ffffffff83213249
RDX: 0000000000000001 RSI: ffffffff8321329b RDI: 0000000000000008
RBP: ffff8880807df570 R08: ffff88809ee0e340 R09: 000000000000000d
R10: ffff888099456020 R11: 0000000000000010 R12: 0000000000000000
R13: 0000000000000034 R14: 0000000000000000 R15: 0000000000000007
FS: 0000000001deb880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005641ad1e7ae8 CR3: 0000000090e31000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
gcmaes_encrypt.constprop.0+0x62a/0xd90
arch/x86/crypto/aesni-intel_glue.c:932
generic_gcmaes_encrypt+0x108/0x159 arch/x86/crypto/aesni-intel_glue.c:1297
crypto_aead_encrypt include/crypto/aead.h:335 [inline]
gcmaes_wrapper_encrypt+0x15f/0x200 arch/x86/crypto/aesni-intel_glue.c:1130
crypto_aead_encrypt include/crypto/aead.h:335 [inline]
tls_do_encryption net/tls/tls_sw.c:193 [inline]
tls_push_record+0x9c0/0x13a0 net/tls/tls_sw.c:228
tls_sw_sendpage+0x540/0xd40 net/tls/tls_sw.c:583
inet_sendpage+0x168/0x630 net/ipv4/af_inet.c:815
kernel_sendpage+0x92/0xf0 net/socket.c:3377
sock_sendpage+0x8b/0xc0 net/socket.c:847
pipe_to_sendpage+0x296/0x360 fs/splice.c:452
splice_from_pipe_feed fs/splice.c:503 [inline]
__splice_from_pipe+0x391/0x7d0 fs/splice.c:627
splice_from_pipe+0x108/0x170 fs/splice.c:662
generic_splice_sendpage+0x3c/0x50 fs/splice.c:833
do_splice_from fs/splice.c:852 [inline]
do_splice+0x642/0x12c0 fs/splice.c:1148
__do_sys_splice fs/splice.c:1415 [inline]
__se_sys_splice fs/splice.c:1395 [inline]
__x64_sys_splice+0x2c6/0x330 fs/splice.c:1395
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4406a9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd1d5f09f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007ffd1d5f0a10 RCX: 00000000004406a9
RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000005 R08: 0000000100000300 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401f90
R13: 0000000000402020 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 669fcdfe1266f826 ]---
RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:73 [inline]
RIP: 0010:scatterwalk_pagedone include/crypto/scatterwalk.h:98 [inline]
RIP: 0010:scatterwalk_done include/crypto/scatterwalk.h:106 [inline]
RIP: 0010:gcmaes_crypt_by_sg.constprop.0+0xde2/0x1850
arch/x86/crypto/aesni-intel_glue.c:868
Code: 82 f3 f9 ff ff e8 6e ac 35 00 4c 89 f7 e8 c6 c7 eb 01 48 8d 78 08 49
89 c6 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84
c0 74 08 3c 03 0f 8e a5 09 00 00 41 8b 46 08 89 84
RSP: 0018:ffff8880807df230 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000034 RCX: ffffffff83213249
RDX: 0000000000000001 RSI: ffffffff8321329b RDI: 0000000000000008
RBP: ffff8880807df570 R08: ffff88809ee0e340 R09: 000000000000000d
R10: ffff888099456020 R11: 0000000000000010 R12: 0000000000000000
R13: 0000000000000034 R14: 0000000000000000 R15: 0000000000000007
FS: 0000000001deb880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005641ad1e7ae8 CR3: 0000000090e31000 CR4: 00000000001406e0
Reply all
Reply to author
Forward
0 new messages