Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp85061imm; Thu, 2 Aug 2018 14:27:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdmebmk4gbopkP+KGGwIw7yw6SJWxkH6Yv9atboJwEfEQxXxRXFLhKON8FAx7d3qny2v9fK X-Received: by 2002:a17:902:8b8b:: with SMTP id ay11-v6mr940643plb.1.1533245277035; Thu, 02 Aug 2018 14:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533245276; cv=none; d=google.com; s=arc-20160816; b=z1XdP/sMbjCXmNWwxV9F0Gu2V/SR1qzhD/zFAoZh3nCOoGmG73UksTnlMwACbDZonF pCNG3owxYwvZAJPiGJ/2vMdyDX8S53wZM5Mgvi+OjWv7AN031+IFD1Vm0PbvQXSGgBHd qMtL7IaBYwVY5JCJ4FZrkiDuBjD5wL1cBs4KqVinVGOMzAs1VToqSkKxBnC8O3tXf49e gWibhY6fqrBpMcqbdvin9EP7KBcSDMolWUoyyWfC/CnN7DJLYeLQ4rncXsI/bxDK++OM RLpOKz+ozxq25IyaYCTfBE00+DpJRYSUceeo1VpBb/bKFfhHawph+n8xS8ijVZmEhjCt a00g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:arc-authentication-results; bh=aqMYM8IKkZd57BCg+ZpY3JuqyScTG5520XVCQL13ZdY=; b=X3s25w1CgFCvQRb1A8/0e4Lndw7iV0/sKKwkJ0oDCMgkYFcxz9s79TZBBdDgc2gKHr +ix1pdMWsdWPBc9KgrwnOSUWGNi79vhFweVMPN4sRL1gWPCX1yly0vs1VaY48ChxunSI pvakoGKkaCW5rzJaDBMo0U0mHJPrS7J4n0kxEcExrlEMADbjOlF+/1no3KObbc2QJPGF VuFIzOOANYZpJ1z6JyOqc8sxqryQ9pQPmAwEmL3WgcOSl7s7zoJJU6rudwL9VG/ZUWUY vMcJrvi4yVGfkExQcynvtzYrOXhEsvjNzJOVna5OOZujnyBKrX/MpYde9d2R9yaNmAZ3 Jiiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=F8C+DCYB; dkim=neutral (body hash did not verify) header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=bBmZIPCp; 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=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w26-v6si3101601pgk.372.2018.08.02.14.27.42; Thu, 02 Aug 2018 14:27:56 -0700 (PDT) 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=@fb.com header.s=facebook header.b=F8C+DCYB; dkim=neutral (body hash did not verify) header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=bBmZIPCp; 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=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731501AbeHBXTK (ORCPT + 99 others); Thu, 2 Aug 2018 19:19:10 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:52180 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726881AbeHBXTK (ORCPT ); Thu, 2 Aug 2018 19:19:10 -0400 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w72LP7gi009310; Thu, 2 Aug 2018 14:25:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=facebook; bh=aqMYM8IKkZd57BCg+ZpY3JuqyScTG5520XVCQL13ZdY=; b=F8C+DCYBmeBM04z9liZEMcR3i4Lw8TFmm5PAxYsAmBxJok+wNlL5EjD74P6eSPvn0J4N rIHM4aWGUWDtK5+22ibaY4EXIPHJ4GCuoJgz/X7VCX8hL+USabB6ODdCsiZS94GafIV/ qQcFhplLTu1QdEFpUqGc/GvMBPZ5SGXbtHc= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2km99q830d-2 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 02 Aug 2018 14:25:48 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.27) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 2 Aug 2018 17:25:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9cfSDUdJEF+CsI6E7Q6IdpFuMED1mInD/+j3OuMvNlw=; b=bBmZIPCpVpRedIFhdSZpMOH6Rrwp7aBDKq5vWN+rhaVFImE7jddw3Y3b/jPkSCGm5CCypz4slWBMHffoIPMeEXSPV/vJ1umBEqrpJwz3GIBLWbDArAFGutcklnEMuN0ObmRzCHlRcDiOGsS5TQ+d6jVMKp/b0qe6OTG/D7lhdIk= Received: from castle.DHCP.thefacebook.com (2620:10d:c090:200::4:6653) by BLUPR15MB0162.namprd15.prod.outlook.com (2a01:111:e400:5249::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Thu, 2 Aug 2018 21:25:43 +0000 Date: Thu, 2 Aug 2018 14:25:37 -0700 From: Roman Gushchin To: Daniel Borkmann CC: syzbot , , , , Subject: Re: KASAN: use-after-free Read in bpf_cgroup_storage_release Message-ID: <20180802212534.GA17831@castle.DHCP.thefacebook.com> References: <000000000000f3b1570572779079@google.com> <1b3dde38-549e-43ed-d3f6-18b451444d2f@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1b3dde38-549e-43ed-d3f6-18b451444d2f@iogearbox.net> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [2620:10d:c090:200::4:6653] X-ClientProxiedBy: MWHPR04CA0074.namprd04.prod.outlook.com (2603:10b6:301:3a::15) To BLUPR15MB0162.namprd15.prod.outlook.com (2a01:111:e400:5249::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e9e96c6-91c7-407c-103b-08d5f8be814b X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BLUPR15MB0162; X-Microsoft-Exchange-Diagnostics: 1;BLUPR15MB0162;3:p+jzuwkkuS8A2pkHwItdHixkYi7203fnj18z/lPdDjEfpI1+KlCsCKrqHdqkrjgmrFrZHqp/ZNZGLYe7syIqCNWK/OfrdOB8ggTbrptOSac/ZIws5qvjNe81zA3FHh/UVV8jYUmp1pPtOaETLd2qkJHzudZfCphp3raYjjqEt2jL7xcdB8guoOKAkmlFnNhiNndxj7vfw61Y4zF5hJoejn+8llNBvNVGLKgPgsX8lWsutVRjzxwiSY3dlOJ4f0JP;25:vHimwlqxFeh5LgfEZiEiCS5RP2EGyQbJ769Yi24p5To6jds162gMiPjoj9ykf/i2rNL1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btgd3u/qxdgH;4:2n/ylxwXDWTE3HVE/S1DtQX3GHu9kdebbwuiM0E4pKJOvY3+qgbCHRXGlhCyOPG99d6fSCVEcYs+y4Jjga1tMmayT0YhsfkrOfExF4ZbkhiDxywkuWNloYDN7mtpGKZQqFJ82ABmZHvekP+QiJ4WtpRWD3j66AS3kr/R0fRL4Y4Z0SufNHUnmUL2uLKjwOVp69qy9zG2qD+c9AFgZyvDbMWQiUx3qFlLIGclU/fa6xeU5zsEypmiFiKh/93Gx4FY9ZjfuxjzWBAIpEisY1QDGwDDMNKWzNZ1mEqI2ClIJ2xqeZcoh2sILLNTPI1OmIzx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(10436049006162); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231311)(11241501184)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011)(7699016);SRVR:BLUPR15MB0162;BCL:0;PCL:0;RULEID:;SRVR:BLUPR15MB0162; X-Forefront-PRVS: 07521929C1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(366004)(396003)(376002)(346002)(39860400002)(136003)(199004)(189003)(55016002)(6916009)(2906002)(33656002)(58126008)(476003)(966005)(5660300001)(52396003)(316002)(486006)(53936002)(6246003)(6116002)(4326008)(229853002)(6666003)(105586002)(8936002)(68736007)(23756003)(106356001)(25786009)(1076002)(47776003)(11346002)(305945005)(86362001)(446003)(97736004)(7696005)(9686003)(81166006)(16526019)(8676002)(478600001)(575784001)(81156014)(46003)(186003)(7736002)(52116002)(386003)(6506007)(76176011)(14444005)(53546011)(50466002)(6306002)(2870700001)(18370500001)(99710200001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR15MB0162;H:castle.DHCP.thefacebook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;BLUPR15MB0162;23:YAXagck/iEfidg/ZPOsC7f3wQesvqOI/1IVr7q2?= =?iso-8859-1?Q?/plVFIkOyjYZ95C2bPepQGuUfAy1sBCfeLJyBdxqrpEWr+QKPnA+gLJv1M?= =?iso-8859-1?Q?R733U/gPOvmxAbAq6TA8+CDdJ7QaiTrltORaGYGLlPMibL8ckbjZpgpfOt?= =?iso-8859-1?Q?Nhc8vWDg+xDR5nhHB8cnGN1rWFqmumAbr5g1yfYPFQMTnBd76HhgI6Uzx3?= =?iso-8859-1?Q?mgjSuicXE8HfOxG1+plJf1PkfIjC07Hdw/PyLgNix3pY9vIYn6YboWB3Wm?= =?iso-8859-1?Q?GDkooMD/punLfgGujj12LWBOsjTj88rSP2p0o+tBvd3iv1J4A6tZX8mbr6?= =?iso-8859-1?Q?QXtwNYxQm9QJQ3aPlXwQs3vwIUifQYdiKYisJN5RZ0BMSGKrJ1eERLNsI3?= =?iso-8859-1?Q?cfzGAYJDkmVM/4iGEX6hLIvU2daOm3bJMRPnsTl31SeGM+vWan69fvlhCA?= =?iso-8859-1?Q?VRdnEaNCtVqntCGUxawsVYcrHOSCYcdT7Vuzo9WNDP4pwc0dt4/HuxkB8y?= =?iso-8859-1?Q?HLEYPqbUhkL3lCi2sXAzzyokT9xYaQ/BOd3ELXN6FZ0h30wQRG77t9oIWB?= =?iso-8859-1?Q?FH8hd8/OsZu+pFa9LWtS3P9KZzBAQtOM6wOV00eQVihSKWZUWremdtAZVo?= =?iso-8859-1?Q?AtZzv4RYwQhlEHMiR83L1nTLmIml+/ma7WQKPNRU6Z52u5qlscVupHlxzK?= =?iso-8859-1?Q?KVDoOiAtfD6Th4YNjhEq4CNJXpCpU7IEBGTwldGAQcf4vL7L0zt3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utput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR15MB0162;20:YA7inTPs1bTc3ZUYmij+czVAR+wx18vgCLynJH7HybV0NktmTOwyMgSr4Iounv3RGEWnkE1jEXu2xFB4I2VSf1Z3l43WDUgMUQ8SPYV7kH8o/vHK5L9bbEUAs7kmtNrbnGGdf/PGl1lZqfx3CXA9IApD3Sxrfg1STkpCscpnRIc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2018 21:25:43.1041 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e9e96c6-91c7-407c-103b-08d5f8be814b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR15MB0162 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-02_05:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 02, 2018 at 09:23:00PM +0200, Daniel Borkmann wrote: > [ +Roman ] > > On 08/02/2018 07:59 PM, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:??? fc2a3b5dd618 Merge branch 'bpf-cgroup-local-storage' > > git tree:?????? bpf-next > > console output: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_log.txt-3Fx-3D17a6a1c8400000&d=DwIDaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=EDSyTXUjQWi0Wr-pal_Z622tnk3UnxrZ318k9Tct4wQ&s=kNpA8CkCvXgMPDNNfqgkqDlGShzYMrSvH1AWBdBslJo&e= > > kernel config:? https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_.config-3Fx-3D3bfcc1651962483&d=DwIDaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=EDSyTXUjQWi0Wr-pal_Z622tnk3UnxrZ318k9Tct4wQ&s=PYjD3Jqpwgzv3cBV64k8EAbXwdolWkrrrcanCfJU6KQ&e= > > dashboard link: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_bug-3Fextid-3D25554ab865a12b51c66f&d=DwIDaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=EDSyTXUjQWi0Wr-pal_Z622tnk3UnxrZ318k9Tct4wQ&s=FQHY4B4Ok0SJh_C-lkToT7mX_Ehj3NSHe6Fe1UiL--Y&e= > > compiler:?????? gcc (GCC) 8.0.1 20180413 (experimental) > > syzkaller repro:https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.syz-3Fx-3D12c4b9b4400000&d=DwIDaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=EDSyTXUjQWi0Wr-pal_Z622tnk3UnxrZ318k9Tct4wQ&s=38j2eoBTEgFiU2FlYHK86YXiVNEjxV6n3ug4tlAZ3MQ&e= > > C reproducer:?? https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.c-3Fx-3D13e9d6f0400000&d=DwIDaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=EDSyTXUjQWi0Wr-pal_Z622tnk3UnxrZ318k9Tct4wQ&s=R75neIjoG9ODJgTDAUAfWqORwwOVX0k_cz7NsKyF6qw&e= > > > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > > Reported-by: syzbot+25554ab865a12b51c66f@syzkaller.appspotmail.com > > > > ================================================================== > > BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] > > BUG: KASAN: use-after-free in do_raw_spin_lock+0x1c0/0x200 kernel/locking/spinlock_debug.c:112 > > Read of size 4 at addr ffff8801c4723644 by task syz-executor865/9746 > > > > CPU: 0 PID: 9746 Comm: syz-executor865 Not tainted 4.18.0-rc5+ #68 > > 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+0x1c9/0x2b4 lib/dump_stack.c:113 > > ?print_address_description+0x6c/0x20b mm/kasan/report.c:256 > > ?kasan_report_error mm/kasan/report.c:354 [inline] > > ?kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 > > ?__asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 > > ?debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] > > ?do_raw_spin_lock+0x1c0/0x200 kernel/locking/spinlock_debug.c:112 > > ?__raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] > > ?_raw_spin_lock_bh+0x39/0x40 kernel/locking/spinlock.c:168 > > ?spin_lock_bh include/linux/spinlock.h:315 [inline] > > ?bpf_cgroup_storage_release+0x2c/0x110 kernel/bpf/local_storage.c:276 > > ?free_used_maps+0x81/0x200 kernel/bpf/syscall.c:961 > > ?bpf_prog_load+0x17ba/0x1c90 kernel/bpf/syscall.c:1414 > > ?__do_sys_bpf kernel/bpf/syscall.c:2338 [inline] > > ?__se_sys_bpf kernel/bpf/syscall.c:2300 [inline] > > ?__x64_sys_bpf+0x36c/0x510 kernel/bpf/syscall.c:2300 > > ?do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 > > ?entry_SYSCALL_64_after_hwframe+0x49/0xbe So, it looks like we drop the last refcount on local storage map from release_maps() and schedule bpf_map_free_deferred(), which runs prior to bpf_cgroup_storage_release() in free_used_maps(). If so, here is the fix: diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c index cd0b115c2395..fc4e37f68f2a 100644 --- a/kernel/bpf/local_storage.c +++ b/kernel/bpf/local_storage.c @@ -277,6 +277,7 @@ void bpf_cgroup_storage_release(struct bpf_prog *prog, struct bpf_map *_map) if (map->prog == prog) { WARN_ON(prog->aux->cgroup_storage != _map); map->prog = NULL; + prog->aux->cgroup_storage = NULL; } spin_unlock_bh(&map->lock); } -- I'll post an updated version (v7) in few minutes. Thanks to syzbot team for the report!