linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: syzbot
	<bot+39ea44e86d4b505fce2a77c845b7979cffd9bc07@syzkaller.appspotmail.com>
Cc: akpm@linux-foundation.org, dan.j.williams@intel.com,
	jack@suse.cz, jglisse@redhat.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, mgorman@techsingularity.net, mhocko@suse.com,
	shli@fb.com, syzkaller-bugs@googlegroups.com, vbabka@suse.cz,
	ying.huang@intel.com
Subject: Re: KASAN: use-after-free Read in __pagevec_lru_add_fn
Date: Fri, 22 Dec 2017 16:25:43 -0600	[thread overview]
Message-ID: <20171222222543.GC28786@zzz.localdomain> (raw)
In-Reply-To: <001a113f711afab80a0560f49df1@google.com>

On Fri, Dec 22, 2017 at 01:37:02PM -0800, syzbot wrote:
> Hello,
> 
> syzkaller hit the following crash on
> e7655085973bd33ee47bb12de663d31c81717404
> 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: use-after-free in list_add include/linux/list.h:79 [inline]
> BUG: KASAN: use-after-free in add_page_to_lru_list
> include/linux/mm_inline.h:51 [inline]
> BUG: KASAN: use-after-free in __pagevec_lru_add_fn+0xe49/0xf40 mm/swap.c:896
> Read of size 8 at addr ffff8801da2c36d0 by task modprobe/9844
> 
> CPU: 1 PID: 9844 Comm: modprobe Not tainted 4.15.0-rc3+ #157
> 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_load8_noabort+0x14/0x20 mm/kasan/report.c:430
>  list_add include/linux/list.h:79 [inline]
>  add_page_to_lru_list include/linux/mm_inline.h:51 [inline]
>  __pagevec_lru_add_fn+0xe49/0xf40 mm/swap.c:896
>  pagevec_lru_move_fn+0x13b/0x230 mm/swap.c:209
>  __pagevec_lru_add mm/swap.c:907 [inline]
>  lru_add_drain_cpu+0x283/0x460 mm/swap.c:609
>  lru_add_drain+0x1c/0x30 mm/swap.c:680
>  shift_arg_pages+0x1c3/0x460 fs/exec.c:651
>  setup_arg_pages+0x637/0x8e0 fs/exec.c:759
>  load_elf_binary+0xaa6/0x4b50 fs/binfmt_elf.c:882
>  search_binary_handler+0x142/0x6b0 fs/exec.c:1638
>  exec_binprm fs/exec.c:1680 [inline]
>  do_execveat_common.isra.30+0x1754/0x23c0 fs/exec.c:1802
>  do_execve+0x31/0x40 fs/exec.c:1847
>  call_usermodehelper_exec_async+0x457/0x8f0 kernel/umh.c:100
>  ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:441
> 
> Allocated by task 0:
>  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:551
>  kmem_cache_alloc_node_trace+0x150/0x750 mm/slab.c:3653
>  kmalloc_node include/linux/slab.h:537 [inline]
>  kzalloc_node include/linux/slab.h:699 [inline]
>  alloc_mem_cgroup_per_node_info mm/memcontrol.c:4167 [inline]
>  mem_cgroup_alloc+0x33e/0x9d0 mm/memcontrol.c:4234
>  mem_cgroup_css_alloc+0x8ee/0xfe0 mm/memcontrol.c:4271
>  cgroup_init_subsys+0x224/0x529 kernel/cgroup/cgroup.c:5152
>  cgroup_init+0x3f3/0xb1b kernel/cgroup/cgroup.c:5278
>  start_kernel+0x6da/0x754 init/main.c:700
>  x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378
>  x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359
>  secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:237
> 
> Freed by task 0:
> (stack is not available)
> 

This is yet another one where the reproducer is using AF_ALG and binding to the
"pcrypt(gcm_base(ctr(aes-aesni),ghash-generic))" algorithm, so it's running into
the pcrypt_free() bug which is causing slab cache corruption:

https://groups.google.com/forum/#!topic/syzkaller-bugs/NKn_ivoPOpk

https://patchwork.kernel.org/patch/10126761/

So let's mark it as a duplicate:

#syz dup: KASAN: use-after-free Read in __list_del_entry_valid (2)

Eric

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2017-12-22 22:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 21:37 syzbot
2017-12-22 22:25 ` Eric Biggers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171222222543.GC28786@zzz.localdomain \
    --to=ebiggers3@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bot+39ea44e86d4b505fce2a77c845b7979cffd9bc07@syzkaller.appspotmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=shli@fb.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox