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]
Message-ID: <089e082ce588933d2305676c27ad@google.com>
Date:   Wed, 14 Mar 2018 21:45:01 -0700
From:   syzbot <syzbot+5aef6b1a99035b4b6705@...kaller.appspotmail.com>
To:     dasaratharaman.chandramouli@...el.com, dledford@...hat.com,
        don.hiatt@...el.com, ira.weiny@...el.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,
        viro@...iv.linux.org.uk
Subject: Re: KASAN: use-after-free Read in __list_add_valid (4)

syzbot has found reproducer for the following crash on upstream commit
3032f8c504d2b15d58e4c96060a96b47e215573c (Wed Mar 14 17:05:59 2018 +0000)
Merge tag 'usb-4.16-rc6' of  
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

So far this crash happened 23 times on upstream.
syzkaller reproducer is attached.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.
user-space arch: i386

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+5aef6b1a99035b4b6705@...kaller.appspotmail.com
It will help syzbot understand when the bug is fixed.

IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
8021q: adding VLAN 0 to HW filter on device bond0
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
==================================================================
BUG: KASAN: use-after-free in __list_add_valid+0xc6/0xd0 lib/list_debug.c:26
Read of size 8 at addr ffff8801acd72ad8 by task syz-executor0/4524

CPU: 0 PID: 4524 Comm: syz-executor0 Not tainted 4.16.0-rc5+ #263
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
  __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
  __list_add_valid+0xc6/0xd0 lib/list_debug.c:26
  __list_add include/linux/list.h:60 [inline]
  list_add_tail include/linux/list.h:93 [inline]
  cma_listen_on_all drivers/infiniband/core/cma.c:2309 [inline]
  rdma_listen+0x581/0x8e0 drivers/infiniband/core/cma.c:3331
  ucma_listen+0x172/0x1f0 drivers/infiniband/core/ucma.c:1064
  ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1633
  __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_32_irqs_on arch/x86/entry/common.c:330 [inline]
  do_fast_syscall_32+0x3ec/0xf9f arch/x86/entry/common.c:392
  entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7fb8c99
RSP: 002b:00000000ffd289dc EFLAGS: 00000282 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000100
RDX: 000000000000003a RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 4474:
  save_stack+0x43/0xd0 mm/kasan/kasan.c:447
  set_track mm/kasan/kasan.c:459 [inline]
  kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552
  kmem_cache_alloc_trace+0x136/0x740 mm/slab.c:3607
  kmalloc include/linux/slab.h:512 [inline]
  kzalloc include/linux/slab.h:701 [inline]
  rdma_create_id+0xd0/0x630 drivers/infiniband/core/cma.c:787
  ucma_create_id+0x31a/0x620 drivers/infiniband/core/ucma.c:479
  ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1633
  __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_32_irqs_on arch/x86/entry/common.c:330 [inline]
  do_fast_syscall_32+0x3ec/0xf9f arch/x86/entry/common.c:392
  entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139

Freed by task 4474:
  save_stack+0x43/0xd0 mm/kasan/kasan.c:447
  set_track mm/kasan/kasan.c:459 [inline]
  __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520
  kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
  __cache_free mm/slab.c:3485 [inline]
  kfree+0xd9/0x260 mm/slab.c:3800
  rdma_destroy_id+0x821/0xda0 drivers/infiniband/core/cma.c:1691
  ucma_close+0x100/0x2f0 drivers/infiniband/core/ucma.c:1712
  __fput+0x327/0x7e0 fs/file_table.c:209
  ____fput+0x15/0x20 fs/file_table.c:243
  task_work_run+0x199/0x270 kernel/task_work.c:113
  exit_task_work include/linux/task_work.h:22 [inline]
  do_exit+0x9bb/0x1ad0 kernel/exit.c:865
  do_group_exit+0x149/0x400 kernel/exit.c:968
  SYSC_exit_group kernel/exit.c:979 [inline]
  SyS_exit_group+0x1d/0x20 kernel/exit.c:977
  do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline]
  do_fast_syscall_32+0x3ec/0xf9f arch/x86/entry/common.c:392
  entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139

The buggy address belongs to the object at ffff8801acd72900
  which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 472 bytes inside of
  1024-byte region [ffff8801acd72900, ffff8801acd72d00)
The buggy address belongs to the page:
page:ffffea0006b35c80 count:1 mapcount:0 mapping:ffff8801acd72000 index:0x0  
compound_mapcount: 0
flags: 0x2fffc0000008100(slab|head)
raw: 02fffc0000008100 ffff8801acd72000 0000000000000000 0000000100000007
raw: ffffea0006b6a820 ffffea0006b3fb20 ffff8801dac00ac0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
  ffff8801acd72980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
  ffff8801acd72a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ffff8801acd72a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                     ^
  ffff8801acd72b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
  ffff8801acd72b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


View attachment "raw.log.txt" of type "text/plain" (10842 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ