Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp408698imp; Wed, 20 Feb 2019 02:24:28 -0800 (PST) X-Google-Smtp-Source: AHgI3IYWY33kw/aMQf0JceGB5BmslIlh5ozKFFIQTZjiFBUZHKghJPzMeZYJ2g04WDHtLOrw9Gke X-Received: by 2002:a63:4d4f:: with SMTP id n15mr28555979pgl.327.1550658268422; Wed, 20 Feb 2019 02:24:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550658268; cv=none; d=google.com; s=arc-20160816; b=nNRAJG55tE7xHuGHEIXzJq3y9t6w9huUTURzRm87+u0MXWHalpcQ6g0cpPgl77LRJU HP8Ch9NXvUQHtmSynRGmrcqhifMvWFLWYi0Nv0m5jZMBVweqEx8Q5bUUH7lehHg02zy9 Xz57SRhPFWmPhta4hLJcZ7TllDjJH8j2bu1uV7lgvjKCreRSDK8O6JC9nQ78zwf64g/6 zcXAC/P6pbqHky0bCES6eURxxNyhxIC2MeIZk9rH4aOH7Bidcpcir3sEuaBpGSxlVqnY LCUocGJFb0hadcy3UsXvWL9JLb9rp9Zf7P8KhTJH2weFhOxWAZvSpbRRX3dmb1kCzrKu IZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gSBa7aD4yHRrUePkyJcSnor2d9MzbHKe/7gOHfpIe0Q=; b=Y26MXyZJIi9gG2Q4QfmxQOp1OAPUOFnBlfFILOBOH8DZeCULUr6XjN9dcQk3HE218R sl1eLo8Odti2588ZM3eense0WI/6XfN8rWM3yVMns5GQfNbWwb516EeJYh0CubdIxbjo mWIJwlIH+tns5PhHZk0rpvuYUrk2CkQtUcGuumvzlsBm29/y+dFygza6bMV2yNQ31WDV x2k5JAayqDN4wtffRJ6oLZQZV5jcwRmLxosLbkXFgfokTtMa9lA0oM5X+c97XtOIPm+4 dOcuLh5p5JWFjsgG2f5imUWYIK1aUM//MT1fkNjIpSYmH8+buAxAKuYhXu8QJJ+olP5Q J2/Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si18072403pgc.186.2019.02.20.02.24.13; Wed, 20 Feb 2019 02:24:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727157AbfBTKXv (ORCPT + 99 others); Wed, 20 Feb 2019 05:23:51 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:41702 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbfBTKXu (ORCPT ); Wed, 20 Feb 2019 05:23:50 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1gwP2R-0005kS-Qr; Wed, 20 Feb 2019 18:23:39 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1gwP2F-00022M-7l; Wed, 20 Feb 2019 18:23:27 +0800 Date: Wed, 20 Feb 2019 18:23:27 +0800 From: Herbert Xu To: Dmitry Vyukov Cc: Nikolay Aleksandrov , Thomas Graf , syzbot , bridge@lists.linux-foundation.org, David Miller , LKML , netdev , Roopa Prabhu , syzkaller-bugs Subject: Re: KASAN: use-after-free Read in br_mdb_ip_get Message-ID: <20190220102327.lq2zyqups2fso75z@gondor.apana.org.au> References: <000000000000862b160580765e94@google.com> <3c44c1ff-2790-ec06-35c6-3572b92170c7@cumulusnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2019 at 09:28:36AM +0100, Dmitry Vyukov wrote: > > > Weird, this is the kfree() on the error path of br_multicast_new_group() > > when rhashtable_lookup_insert_fast() fails, which means the entry should > > not be linked in the rhashtable or the hlist. > > All other frees are via kfree_rcu. I'll keep looking.. > > Humm.... +rhashtable.c maintianers > > The code in br_multicast_new_group is effectively: > > mp = kzalloc(sizeof(*mp), GFP_ATOMIC); > err = rhashtable_lookup_insert_fast(&br->mdb_hash_tbl, &mp->rhnode, > br_mdb_rht_params); > if (err) > kfree(mp); > > So it looks like rhashtable_lookup_insert_fast both returned an error > and left the new object linked in the table. Since it happened only > once, it may have something to do with concurrent resizing/shrinking. I've looked through the rhashtable code in question and everything looks OK. So I suspect some earlier corruption has occured to cause this anomalous result. Is it possible to collect earlier alloc/free stack traces on the object in question? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt