lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Nov 2017 05:24:00 -0800
From:   syzbot 
        <bot+21d2e751cbf850bffdba93a41b744ee510bb7613@...kaller.appspotmail.com>
To:     davem@...emloft.net, herbert@...dor.apana.org.au,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzkaller-bugs@...glegroups.com
Subject: KASAN: stack-out-of-bounds Write in sha3_final

Hello,

syzkaller hit the following crash on  
0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.
C reproducer is attached
syzkaller reproducer is attached. See https://goo.gl/kgGztJ
for information about syzkaller reproducers


==================================================================
BUG: KASAN: stack-out-of-bounds in memset include/linux/string.h:326  
[inline]
BUG: KASAN: stack-out-of-bounds in sha3_final+0xeb/0x2e0  
crypto/sha3_generic.c:173
Write of size 4294967174 at addr ffff8801cc307cba by task  
syzkaller578788/3306

CPU: 0 PID: 3306 Comm: syzkaller578788 Not tainted 4.14.0+ #128
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
  check_memory_region_inline mm/kasan/kasan.c:260 [inline]
  check_memory_region+0x137/0x190 mm/kasan/kasan.c:267
  memset+0x23/0x40 mm/kasan/kasan.c:285
  memset include/linux/string.h:326 [inline]
  sha3_final+0xeb/0x2e0 crypto/sha3_generic.c:173
  crypto_shash_final+0xd3/0x1f0 crypto/shash.c:144
  shash_finup_unaligned+0x40/0x60 crypto/shash.c:151
  crypto_shash_finup+0xc4/0x120 crypto/shash.c:165
  hmac_finup+0x182/0x330 crypto/hmac.c:152
  crypto_shash_finup+0xc4/0x120 crypto/shash.c:165
  shash_digest_unaligned+0x9e/0xd0 crypto/shash.c:172
  crypto_shash_digest+0xc4/0x120 crypto/shash.c:186
  hmac_setkey+0x36a/0x690 crypto/hmac.c:66
  crypto_shash_setkey+0xad/0x190 crypto/shash.c:64
  shash_async_setkey+0x47/0x60 crypto/shash.c:207
  crypto_ahash_setkey+0xaf/0x180 crypto/ahash.c:200
  hash_setkey+0x40/0x90 crypto/algif_hash.c:446
  alg_setkey crypto/af_alg.c:221 [inline]
  alg_setsockopt+0x2a1/0x350 crypto/af_alg.c:254
  SYSC_setsockopt net/socket.c:1851 [inline]
  SyS_setsockopt+0x189/0x360 net/socket.c:1830
  entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x445cc9
RSP: 002b:00007f3206c54dc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445cc9
RDX: 0000000000000001 RSI: 0000000000000117 RDI: 000000000000003f
RBP: 0000000000000086 R08: 0000000000000079 R09: 00007f3206c55700
R10: 0000000020002000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc85b7096f R14: 00007f3206c559c0 R15: 0000000000000000

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

Memory state around the buggy address:
  ffff8801cc307d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  ffff8801cc307e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff8801cc307e80: f1 f1 f1 f1 04 f2 f2 f2 f2 f2 f2 f2 04 f2 f2 f2
                    ^
  ffff8801cc307f00: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
  ffff8801cc307f80: 00 00 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 syzkaller@...glegroups.com.
Please credit me with: Reported-by: syzbot <syzkaller@...glegroups.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
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
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.

View attachment "config.txt" of type "text/plain" (126116 bytes)

Download attachment "raw.log" of type "application/octet-stream" (7535 bytes)

View attachment "repro.txt" of type "text/plain" (828 bytes)

Download attachment "repro.c" of type "application/octet-stream" (2457 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ