KASAN: stack-out-of-bounds Read in crypto_chacha20_crypt

5 views
Skip to first unread message

syzbot

unread,
Nov 29, 2017, 3:33:04 AM11/29/17
to da...@davemloft.net, her...@gondor.apana.org.au, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzkaller hit the following crash on
1ea8d039f9edcfefb20d8ddfe136930f6e551529
git://git.cmpxchg.org/linux-mmots.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.

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


device gre0 entered promiscuous mode
==================================================================
BUG: KASAN: stack-out-of-bounds in __le32_to_cpup
include/uapi/linux/byteorder/little_endian.h:58 [inline]
BUG: KASAN: stack-out-of-bounds in le32_to_cpuvp
crypto/chacha20_generic.c:19 [inline]
BUG: KASAN: stack-out-of-bounds in crypto_chacha20_init
crypto/chacha20_generic.c:58 [inline]
BUG: KASAN: stack-out-of-bounds in crypto_chacha20_crypt+0xaf1/0xbd0
crypto/chacha20_generic.c:91
Read of size 4 at addr ffff8801d1547630 by task syz-executor3/15071

CPU: 0 PID: 15071 Comm: syz-executor3 Not tainted 4.14.0-mm1+ #25
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x257 lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:252
kasan_report_error mm/kasan/report.c:351 [inline]
kasan_report+0x25b/0x340 mm/kasan/report.c:409
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429
__le32_to_cpup include/uapi/linux/byteorder/little_endian.h:58 [inline]
le32_to_cpuvp crypto/chacha20_generic.c:19 [inline]
crypto_chacha20_init crypto/chacha20_generic.c:58 [inline]
crypto_chacha20_crypt+0xaf1/0xbd0 crypto/chacha20_generic.c:91
chacha20_simd+0xe4/0x410 arch/x86/crypto/chacha20_glue.c:78
crypto_skcipher_decrypt include/crypto/skcipher.h:463 [inline]
_skcipher_recvmsg crypto/algif_skcipher.c:133 [inline]
skcipher_recvmsg+0xb06/0xf30 crypto/algif_skcipher.c:164
sock_recvmsg_nosec net/socket.c:805 [inline]
sock_recvmsg+0xc9/0x110 net/socket.c:812
___sys_recvmsg+0x29b/0x630 net/socket.c:2207
__sys_recvmsg+0xe2/0x210 net/socket.c:2252
SYSC_recvmsg net/socket.c:2264 [inline]
SyS_recvmsg+0x2d/0x50 net/socket.c:2259
entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452879
RSP: 002b:00007f7930072be8 EFLAGS: 00000212 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 00000000007580d8 RCX: 0000000000452879
RDX: 0000000000002021 RSI: 0000000020b2dfc8 RDI: 0000000000000014
RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006ed0b8
R13: 00000000ffffffff R14: 00007f79300736d4 R15: 0000000000000005

The buggy address belongs to the page:
page:ffffea00074551c0 count:0 mapcount:0 mapping: (null) index:0x0
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: 0000000000000000 dead000000000200 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8801d1547500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8801d1547580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff8801d1547600: 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00
^
ffff8801d1547680: 00 00 f2 f2 f2 f2 00 00 00 00 00 00 00 00 f2 f2
ffff8801d1547700: f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.
Please credit me with: Reported-by: syzbot <syzk...@googlegroups.com>

syzbot will keep track of this bug report.
Once a fix for this bug is committed, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
config.txt
raw.log

Eric Biggers

unread,
Nov 29, 2017, 3:58:19 AM11/29/17
to syzbot, da...@davemloft.net, her...@gondor.apana.org.au, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Wed, Nov 29, 2017 at 12:33:01AM -0800, syzbot wrote:
> Hello,
>
> syzkaller hit the following crash on
> 1ea8d039f9edcfefb20d8ddfe136930f6e551529
> git://git.cmpxchg.org/linux-mmots.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
>
> Unfortunately, I don't have any reproducer for this bug yet.
>
>
> device gre0 entered promiscuous mode
> ==================================================================
> BUG: KASAN: stack-out-of-bounds in __le32_to_cpup
> include/uapi/linux/byteorder/little_endian.h:58 [inline]
> BUG: KASAN: stack-out-of-bounds in le32_to_cpuvp
> crypto/chacha20_generic.c:19 [inline]
> BUG: KASAN: stack-out-of-bounds in crypto_chacha20_init
> crypto/chacha20_generic.c:58 [inline]
> BUG: KASAN: stack-out-of-bounds in crypto_chacha20_crypt+0xaf1/0xbd0
> crypto/chacha20_generic.c:91
> Read of size 4 at addr ffff8801d1547630 by task syz-executor3/15071
>

#syz dup: general protection fault in crypto_chacha20_crypt
Reply all
Reply to author
Forward
0 new messages