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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <001a114218b2ff456f0567010f1c@google.com>
Date:   Fri, 09 Mar 2018 12:59:04 -0800
From:   syzbot <syzbot+ed69cab241b56b3ecaf9@...kaller.appspotmail.com>
To:     dasaratharaman.chandramouli@...el.com, dledford@...hat.com,
        jgg@...pe.ca, leonro@...lanox.com, linux-kernel@...r.kernel.org,
        linux-rdma@...r.kernel.org, markb@...lanox.com, monis@...lanox.com,
        parav@...lanox.com, syzkaller-bugs@...glegroups.com
Subject: KASAN: stack-out-of-bounds Read in rdma_resolve_addr

Hello,

syzbot hit the following crash on upstream commit
1b88accf6a659c46d5c8e68912896f112bf882bb (Thu Mar 8 01:49:33 2018 +0000)
Merge tag 'for_linus' of  
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

So far this crash happened 2 times on upstream.
C reproducer is attached.
syzkaller reproducer is attached.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+ed69cab241b56b3ecaf9@...kaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for  
details.
If you forward the report, please keep this part and the footer.

audit: type=1400 audit(1520534455.052:6): avc:  denied  { map } for   
pid=4222 comm="bash" path="/bin/bash" dev="sda1" ino=1457  
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023  
tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
audit: type=1400 audit(1520534461.379:7): avc:  denied  { map } for   
pid=4236 comm="syzkaller709666" path="/root/syzkaller709666647" dev="sda1"  
ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023  
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
==================================================================
BUG: KASAN: stack-out-of-bounds in memcpy include/linux/string.h:345  
[inline]
BUG: KASAN: stack-out-of-bounds in rdma_resolve_addr+0x12e/0x26c0  
drivers/infiniband/core/cma.c:2920
Read of size 48 at addr ffff8801af5b7a44 by task syzkaller709666/4236

CPU: 0 PID: 4236 Comm: syzkaller709666 Not tainted 4.16.0-rc4+ #346
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/0x24d lib/dump_stack.c:53
  print_address_description+0x73/0x250 mm/kasan/report.c:256
  kasan_report_error mm/kasan/report.c:354 [inline]
  kasan_report+0x23c/0x360 mm/kasan/report.c:412
  check_memory_region_inline mm/kasan/kasan.c:260 [inline]
  check_memory_region+0x137/0x190 mm/kasan/kasan.c:267
  memcpy+0x23/0x50 mm/kasan/kasan.c:302
  memcpy include/linux/string.h:345 [inline]
  rdma_resolve_addr+0x12e/0x26c0 drivers/infiniband/core/cma.c:2920
  ucma_resolve_ip+0x142/0x1f0 drivers/infiniband/core/ucma.c:677
  ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1627
  __vfs_write+0xef/0x970 fs/read_write.c:480
  vfs_write+0x189/0x510 fs/read_write.c:544
  SYSC_write fs/read_write.c:589 [inline]
  SyS_write+0xef/0x220 fs/read_write.c:581
  do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
  entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x43fe49
RSP: 002b:00007fffc4577208 EFLAGS: 00000217 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fe49
RDX: 0000000000000048 RSI: 0000000020000740 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000217 R12: 0000000000401770
R13: 0000000000401800 R14: 0000000000000000 R15: 0000000000000000

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

Memory state around the buggy address:
  ffff8801af5b7900: f2 f2 f2 f2 f2 f2 00 00 f2 f2 f2 f2 f2 f2 00 00
  ffff8801af5b7980: f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff8801af5b7a00: 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 f3 f3 f3
                                                           ^
  ffff8801af5b7a80: f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1
  ffff8801af5b7b00: f1 f1 f1 00 f2 f2 f2 f3 f3 f3 f3 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.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is  
merged
into any tree, 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 "raw.log.txt" of type "text/plain" (10150 bytes)

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

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ