Received: by 10.223.185.116 with SMTP id b49csp4754957wrg; Tue, 6 Mar 2018 23:54:47 -0800 (PST) X-Google-Smtp-Source: AG47ELuZE51rwAKXvwRBA5honivITmBJCOguDea75C5kvM8/mngJ9xAG2Ve2OOr5El/AK7TX84kk X-Received: by 10.98.16.23 with SMTP id y23mr21751974pfi.84.1520409286907; Tue, 06 Mar 2018 23:54:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520409286; cv=none; d=google.com; s=arc-20160816; b=TKyK/Tq8jf3DW69MD/WuL1Ps0q4LFLhE3LuK+wGqiV9o+bN86kWoxXiYlcEpneizXu 57muJMRyq2igM/NY0VDFZ7EAhw3ptrsWpWFavHJF4qY0sVtx/2GhsaKylnCpgtz3koBs KFU2RssTWxEIFpjQuU6r1YehpoDVYH6J/h6xgOQMVRMiV/gXbeZUlFIE2XRJ9WUhklFT 2Un1xa8jq+b6/DzJtFWb93JNcMghl9zGQ7hxDRzGqvDueK0FBOJchBw6rUX3MIcmtQG5 lhVsMsGdTgDHR06VX1bY4J4JUlWhnlRiHLh1UgcuWvolcY4Tv+rJ17NnUQxaiYbaX089 0uJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=nqbzrP8i38wNllNXOpEOusRZzzBPbcVr3R8JOqynxys=; b=cykIxd1OLfVh51Z1zO+r0W3xCttM0EeW40Sf6On5Fgr1uJFbhyNLiR2xWgQZYaUO2S SSy4lhSQR6qjE6V+jewetrV1OIOp19huQnHc5Kps+IwqFeVQkqRlSilf3VeL5AUgImGl a/oVrG3gIzQf2v/vkLC1NmB3m+KUlOSNFlNKq3lhQRZNgUXgU8z+vHVTZIittoJWprUj a9lLF7t7lXy8Q5JQmaw+t6BcYdLpCDLvnymdnsAVnupXeEu455XCs8pauu5KGwY4fLAe ekQ1tWhAg0YBtkXB/yx0vHP1w2GHcm8I/O4lu2rI1DFRyAGnoU5inlNHRw65pffn5ak0 +40w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=SVuXbMUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 13-v6si12538888ple.157.2018.03.06.23.54.20; Tue, 06 Mar 2018 23:54:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=SVuXbMUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751156AbeCGHw6 (ORCPT + 99 others); Wed, 7 Mar 2018 02:52:58 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:43322 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbeCGHw4 (ORCPT ); Wed, 7 Mar 2018 02:52:56 -0500 Received: by mail-lf0-f45.google.com with SMTP id q69-v6so1816793lfi.10 for ; Tue, 06 Mar 2018 23:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nqbzrP8i38wNllNXOpEOusRZzzBPbcVr3R8JOqynxys=; b=SVuXbMULfjqotdlLhLkUe/6icBI3rNGCZyBjllSGP+ok+v/vYYmDVIu9KYVkjVFgZG I45LCd9bBUyIm8tbZ6oujtvzaV9oAMr6TdbKnILWNtVgh+tBGO2pzFyOhIMpZBEjZNgg Ge3ocVRr6Qe8kbPXio8fSFBWpNOiUoMA7jmR9mF6+kPprkWgM0BRxZ9Six7veH0c8BF3 xcKVPUyoOvbhAWH0s0ZMZx1MaihPa0DVaL5y4dJiGJOL542Fqreh+A2HCn+9se96QcWH l40A3gDuQQRhergsP/anjFRKW+OpU7q9iKMBE32PmRfR4hTVAV0RVbMyMxQ+s7dXqXg+ eLdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nqbzrP8i38wNllNXOpEOusRZzzBPbcVr3R8JOqynxys=; b=p0t4Z6o4P21EkOkbOPZr6830nAQTrvlbAI5S3IAeeZYcTm4zhJO+KOvVsuHxXg3q2U 6AXenYWCyWmpN8+fhk90mt7aeeyYa4AbB5g76i/dzQXIBtYvfQJbPh3/NynVqG9r2GbP cERGnOXvoRCmpTXTA7xrngXy1aVn4m4izYnQN8ZS5Y+aWB3zOc77mMlr1CP3RR9g0MrF fmXcOhFiDdk+rCQn80xuvIHLaJQBb6rXLKtd6TesCaU4mrfQ6KiK9uHHdUKHn+JRP7zB zGWRH+QKYyTpH4zIFohhAlfLldX4fTgnLtzc6VgPK972mVfuYlCAIhXzMXZRk4v+C+Ep hDJA== X-Gm-Message-State: AElRT7EOJcKstCcMZQjaNCDNlnBBqGnVuBRwlnbAR/zEai459uV71XES YD05G4eTriweGIhJJ1vCdodSCTpA1YpfrxMoYEH0Vw== X-Received: by 10.25.21.149 with SMTP id 21mr15163862lfv.13.1520409175066; Tue, 06 Mar 2018 23:52:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.219.15 with HTTP; Tue, 6 Mar 2018 23:52:54 -0800 (PST) In-Reply-To: <001a1140c614ad7a730566ba3f61@google.com> References: <001a1140c614ad7a730566ba3f61@google.com> From: Martijn Coenen Date: Wed, 7 Mar 2018 08:52:54 +0100 Message-ID: Subject: Re: KASAN: use-after-free Read in __list_del_entry_valid (3) To: syzbot Cc: =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , "open list:ANDROID DRIVERS" , Greg KH , LKML , syzkaller-bugs@googlegroups.com, Todd Kjos Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 6, 2018 at 9:30 AM, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 094b58e1040a44f991d7ab628035e69c4d6b79c9 (Mon Mar 5 19:57:06 2018 +0000) > Merge tag 'linux-kselftest-4.16-rc5' of > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest I'll take a look at this one, Martijn > > Unfortunately, I don't have any reproducer for this crash yet. > 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+09e05aba06723a94d43d@syzkaller.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. > > binder: release 6174:6185 transaction 4 in, still active > binder: send failed reply for transaction 4 to 6174:6185 > binder: 6194:6198 ERROR: BC_REGISTER_LOOPER called without request > ================================================================== > binder: 6198 RLIMIT_NICE not set > BUG: KASAN: use-after-free in __list_del_entry_valid+0x144/0x150 > lib/list_debug.c:54 > Read of size 8 at addr ffff8801daede810 by task kworker/1:1/24 > > CPU: 1 PID: 24 Comm: kworker/1:1 Not tainted 4.16.0-rc4+ #252 > binder: BINDER_SET_CONTEXT_MGR already set > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS > Google 01/01/2011 > Workqueue: events binder_deferred_func > Call Trace: > __dump_stack lib/dump_stack.c:17 [inline] > dump_stack+0x194/0x24d lib/dump_stack.c:53 > binder: 6194:6206 got new transaction with bad transaction stack, > transaction 9 has target 6194:0 > 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_del_entry_valid+0x144/0x150 lib/list_debug.c:54 > __list_del_entry include/linux/list.h:117 [inline] > list_del_init include/linux/list.h:159 [inline] > binder_dequeue_work_head_ilocked drivers/android/binder.c:893 [inline] > binder_dequeue_work_head drivers/android/binder.c:913 [inline] > binder_release_work+0x163/0x490 drivers/android/binder.c:4191 > binder: 6194:6206 transaction failed 29201/-71, size 0-0 line 2875 > binder: 6191:6205 ioctl 40046207 0 returned -16 > binder_thread_release+0x4d0/0x720 drivers/android/binder.c:4396 > binder_deferred_release drivers/android/binder.c:4939 [inline] > binder_deferred_func+0x4f4/0x1340 drivers/android/binder.c:5022 > binder: BINDER_SET_CONTEXT_MGR already set > binder: 6200:6207 ioctl 40046207 0 returned -16 > binder: 6191:6208 ERROR: BC_REGISTER_LOOPER called without request > process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113 > binder: 6208 RLIMIT_NICE not set > binder: 6200:6212 ERROR: BC_REGISTER_LOOPER called without request > binder: 6212 RLIMIT_NICE not set > binder: 6191:6213 got new transaction with bad transaction stack, > transaction 11 has target 6194:0 > worker_thread+0x223/0x1990 kernel/workqueue.c:2247 > binder: 6191:6213 transaction failed 29201/-71, size 0-0 line 2875 > binder: 6198 RLIMIT_NICE not set > binder: release 6200:6207 transaction 14 out, still active > binder: undelivered TRANSACTION_COMPLETE > kthread+0x33c/0x400 kernel/kthread.c:238 > ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406 > > Allocated by task 6185: > 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] > binder_transaction+0x13c1/0x81c0 drivers/android/binder.c:2900 > binder_thread_write+0xb50/0x3840 drivers/android/binder.c:3513 > binder_ioctl_write_read.isra.38+0x261/0xcb0 drivers/android/binder.c:4451 > binder_ioctl+0xb72/0x1417 drivers/android/binder.c:4591 > C_SYSC_ioctl fs/compat_ioctl.c:1461 [inline] > compat_SyS_ioctl+0x151/0x2a30 fs/compat_ioctl.c:1407 > 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 24: > 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 > binder_free_transaction+0x6a/0x90 drivers/android/binder.c:1966 > binder_send_failed_reply+0x1c9/0x380 drivers/android/binder.c:2005 > binder_thread_release+0x4bb/0x720 drivers/android/binder.c:4395 > binder_deferred_release drivers/android/binder.c:4939 [inline] > binder_deferred_func+0x4f4/0x1340 drivers/android/binder.c:5022 > process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113 > worker_thread+0x223/0x1990 kernel/workqueue.c:2247 > kthread+0x33c/0x400 kernel/kthread.c:238 > ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406 > > The buggy address belongs to the object at ffff8801daede800 > which belongs to the cache kmalloc-192 of size 192 > The buggy address is located 16 bytes inside of > 192-byte region [ffff8801daede800, ffff8801daede8c0) > The buggy address belongs to the page: > page:ffffea00076bb780 count:1 mapcount:0 mapping:ffff8801daede000 index:0x0 > flags: 0x2fffc0000000100(slab) > raw: 02fffc0000000100 ffff8801daede000 0000000000000000 0000000100000010 > raw: ffffea0006e746e0 ffffea0006f0b620 ffff8801dac00040 0000000000000000 > page dumped because: kasan: bad access detected > > Memory state around the buggy address: > ffff8801daede700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > ffff8801daede780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >> >> ffff8801daede800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > > ^ > ffff8801daede880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc > ffff8801daede900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > ================================================================== > > > --- > This bug is generated by a dumb bot. It may contain errors. > See https://goo.gl/tpsmEJ for details. > Direct all questions to syzkaller@googlegroups.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 > 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.