[<prev] [next>] [day] [month] [year] [list]
Message-ID: <0000000000008e076b0588491997@google.com>
Date: Tue, 07 May 2019 02:47:06 -0700
From: syzbot <syzbot+6a309df008e9bd6f5075@...kaller.appspotmail.com>
To: akpm@...ux-foundation.org, borntraeger@...ibm.com,
hughd@...gle.com, jglisse@...hat.com,
kirill.shutemov@...ux.intel.com, ktkhai@...tuozzo.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
mike.kravetz@...cle.com, n-horiguchi@...jp.nec.com,
sean.j.christopherson@...el.com, syzkaller-bugs@...glegroups.com,
willy@...radead.org
Subject: KASAN: use-after-free Read in page_get_anon_vma
Hello,
syzbot found the following crash on:
HEAD commit: 771acc7e Bluetooth: btusb: request wake pin with NOAUTOEN
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15ac0abf200000
kernel config: https://syzkaller.appspot.com/x/.config?x=4fb64439e07a1ec0
dashboard link: https://syzkaller.appspot.com/bug?extid=6a309df008e9bd6f5075
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+6a309df008e9bd6f5075@...kaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in atomic_read
include/asm-generic/atomic-instrumented.h:26 [inline]
BUG: KASAN: use-after-free in atomic_fetch_add_unless
include/linux/atomic-fallback.h:1086 [inline]
BUG: KASAN: use-after-free in atomic_add_unless
include/linux/atomic-fallback.h:1111 [inline]
BUG: KASAN: use-after-free in atomic_inc_not_zero
include/linux/atomic-fallback.h:1127 [inline]
BUG: KASAN: use-after-free in page_get_anon_vma+0x24b/0x4b0 mm/rmap.c:477
Read of size 4 at addr ffff88809f2398f0 by task kswapd0/1553
CPU: 0 PID: 1553 Comm: kswapd0 Not tainted 5.1.0-rc4+ #61
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187
kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
check_memory_region_inline mm/kasan/generic.c:185 [inline]
check_memory_region+0x123/0x190 mm/kasan/generic.c:191
kasan_check_read+0x11/0x20 mm/kasan/common.c:102
atomic_read include/asm-generic/atomic-instrumented.h:26 [inline]
atomic_fetch_add_unless include/linux/atomic-fallback.h:1086 [inline]
atomic_add_unless include/linux/atomic-fallback.h:1111 [inline]
atomic_inc_not_zero include/linux/atomic-fallback.h:1127 [inline]
page_get_anon_vma+0x24b/0x4b0 mm/rmap.c:477
split_huge_page_to_list+0x58a/0x2de0 mm/huge_memory.c:2675
split_huge_page include/linux/huge_mm.h:148 [inline]
deferred_split_scan+0x64b/0xa60 mm/huge_memory.c:2853
do_shrink_slab+0x400/0xa80 mm/vmscan.c:551
shrink_slab mm/vmscan.c:700 [inline]
shrink_slab+0x4be/0x5e0 mm/vmscan.c:680
shrink_node+0x552/0x1570 mm/vmscan.c:2724
kswapd_shrink_node mm/vmscan.c:3482 [inline]
balance_pgdat+0x56c/0xe80 mm/vmscan.c:3640
kswapd+0x615/0x1010 mm/vmscan.c:3895
kthread+0x357/0x430 kernel/kthread.c:253
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352
Allocated by task 11425:
save_stack+0x45/0xd0 mm/kasan/common.c:75
set_track mm/kasan/common.c:87 [inline]
__kasan_kmalloc mm/kasan/common.c:497 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470
kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505
slab_post_alloc_hook mm/slab.h:437 [inline]
slab_alloc mm/slab.c:3394 [inline]
kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3556
kmem_cache_zalloc include/linux/slab.h:732 [inline]
__alloc_file+0x27/0x300 fs/file_table.c:100
alloc_empty_file+0x72/0x170 fs/file_table.c:150
path_openat+0xef/0x46e0 fs/namei.c:3522
do_filp_open+0x1a1/0x280 fs/namei.c:3563
do_sys_open+0x3fe/0x5d0 fs/open.c:1069
__do_sys_open fs/open.c:1087 [inline]
__se_sys_open fs/open.c:1082 [inline]
__x64_sys_open+0x7e/0xc0 fs/open.c:1082
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 11435:
save_stack+0x45/0xd0 mm/kasan/common.c:75
set_track mm/kasan/common.c:87 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:459
kasan_slab_free+0xe/0x10 mm/kasan/common.c:467
__cache_free mm/slab.c:3500 [inline]
kmem_cache_free+0x86/0x260 mm/slab.c:3766
file_free_rcu+0x98/0xe0 fs/file_table.c:49
__rcu_reclaim kernel/rcu/rcu.h:227 [inline]
rcu_do_batch kernel/rcu/tree.c:2475 [inline]
invoke_rcu_callbacks kernel/rcu/tree.c:2788 [inline]
rcu_core+0x928/0x1390 kernel/rcu/tree.c:2769
__do_softirq+0x266/0x95a kernel/softirq.c:293
The buggy address belongs to the object at ffff88809f2397c0
which belongs to the cache filp of size 456
The buggy address is located 304 bytes inside of
456-byte region [ffff88809f2397c0, ffff88809f239988)
The buggy address belongs to the page:
page:ffffea00027c8e40 count:1 mapcount:0 mapping:ffff88821bc45380 index:0x0
flags: 0x1fffc0000000200(slab)
raw: 01fffc0000000200 ffffea00025571c8 ffffea000235d288 ffff88821bc45380
raw: 0000000000000000 ffff88809f239040 0000000100000006 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88809f239780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
ffff88809f239800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ffff88809f239880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88809f239900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809f239980: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@...glegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
Powered by blists - more mailing lists