Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3241454pxb; Mon, 18 Oct 2021 10:59:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ6kXrNjV/DfkD7S/Xhqn+XsQ6RUj1vMRHlyLN35W9ZKlxgF63BwjdsxM6lAhOtL5AIdfs X-Received: by 2002:a17:90a:7d0a:: with SMTP id g10mr405288pjl.73.1634579991895; Mon, 18 Oct 2021 10:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634579991; cv=none; d=google.com; s=arc-20160816; b=CCAG8bfm0Nlj9VxMMTu4/jWXMuRB87kU/Z0ZtbBArnhomtTLGvCOdc2Mbrht7SQocU Nq2NoMrNYfOVh9ctetN8z43qFTvs/t8wvxq4gVlid4/2AL0otkdSvQcsrreFJN6E+WuP gObxikrlIHqy4Jh8nTYwXmIqbGUApsLO1DnfKYSpOJFayq6ghqxLbCAL1GmTOMpJLxfa Oj3Pv61Yb0ta2kVTnovk9MihRD84lXE0wU0xsOB5dZ7zuhm4VL95Idb54QoYWlFpSz2T szljF29q4v81KaaJ3UeU5kPJqNzoFHC3fehEGUK88YY6PVK5LSJqYquvCbg/MuNkPLSY LPyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=LUaKPtNy/6q7g9YZ/bMmFahRtkJUa4KaDWPUxn43Ac0=; b=ASOBCMmzfUkLS9zBh0tBx9NLXIZUjYLdvMA+zrH4pl75nc7cs9EzTbNxk/VGTBdJpv 1sCrwOznjjoEyJTZPrXYaj1fkS3QorgaIMpI/l+qRD6POWFX2IQ/NdzcmAy1kbtuTxxb d6R0PxWh8A2yqoNGWIjDeb+RUu02C96cZg9Jk1RxDeFyD4DzkcNSWP7ac77WBS3hDfoC VTukDcyvHS2nB5kxr+zrOz5Efw4dA610q4X68LO6a/DW5mMWG0OEYqoWrvI4jVZG4mji Ww7TBG5bjoweVZfO/+wRgnvFCHT9ZeK1fu2FstNl4FNrJ2DolZ2EBOgg12KSPyS/UEwB LeQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J0b+jKDJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si20926342pfc.324.2021.10.18.10.59.33; Mon, 18 Oct 2021 10:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J0b+jKDJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231915AbhJRSAr (ORCPT + 99 others); Mon, 18 Oct 2021 14:00:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:42604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbhJRSAo (ORCPT ); Mon, 18 Oct 2021 14:00:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7426760F02; Mon, 18 Oct 2021 17:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634579913; bh=ge+eIkzzAkuGhHb3uX/+iTHVZpyor7eLDw73yDW8zVk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=J0b+jKDJTxhPz+zxQoRFENjkyEms1lsDQCvHNboAWtZ6smpjRdU/iVYJlJ0NXBdVi TesR83//fy7mZx9OIVtyK5rIvkS0La9w/4rK6iWfVI0zApxa1yL9Kngw5MCe7poFNt cQa5MYhELZI4bXksNPVQe0wZXBRVYQPb8kPQra+POBwVRVPFTGn/71UYLayKsWXdPf 1pG0W6vK7MD2YI/Cwn+fyGwzKTfJNgbvlhApP12w0AsD+td4nfFf83Jm6QXq1LB1Za Qq0TueVhWGBEfQAF8CqPGKrKjobdBQ/whNiW/IP7WoHx3t7Yi5nem0+JoGL2gpcBxL LAVnkCCYUkGrg== Date: Mon, 18 Oct 2021 10:58:31 -0700 From: Jakub Kicinski To: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= Cc: Vlad Buslov , Paolo Abeni , Daniel Borkmann , syzbot , andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, davem@davemloft.net, hawk@kernel.org, john.fastabend@gmail.com, kafai@fb.com, kpsingh@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, songliubraving@fb.com, syzkaller-bugs@googlegroups.com, yhs@fb.com, joamaki@gmail.com, Saeed Mahameed , Maxim Mikityanskiy Subject: Re: [syzbot] BUG: corrupted list in netif_napi_add Message-ID: <20211018105831.77cde2ad@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <87lf2qi63r.fsf@toke.dk> References: <0000000000005639cd05ce3a6d4d@google.com> <20211018084201.4c7e5be1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <87lf2qi63r.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Oct 2021 19:40:40 +0200 Toke H=C3=B8iland-J=C3=B8rgensen wrote: > Jakub Kicinski writes: >=20 > > On Mon, 18 Oct 2021 17:04:19 +0300 Vlad Buslov wrote: =20 > >> We got a use-after-free with very similar trace [0] during nightly > >> regression. The issue happens when ip link up/down state is flipped > >> several times in loop and doesn't reproduce for me manually. The fact > >> that it didn't reproduce for me after running test ten times suggests > >> that it is either very hard to reproduce or that it is a result of some > >> interaction between several tests in our suite. > >>=20 > >> [0]: > >>=20 > >> [ 3187.779569] mlx5_core 0000:08:00.0 enp8s0f0: Link up > >> [ 3187.890694] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> [ 3187.892518] BUG: KASAN: use-after-free in __list_add_valid+0xc3/0x= f0 > >> [ 3187.894132] Read of size 8 at addr ffff8881150b3fb8 by task ip/119= 618 =20 > > > > Hm, not sure how similar it is. This one looks like channel was freed > > without deleting NAPI. Do you have list debug enabled? =20 >=20 > Well, the other report[0] also kinda looks like the NAPI thread keeps > running after it should have been disabled, so maybe they are in fact > related? >=20 > [0] https://lore.kernel.org/r/000000000000c1524005cdeacc5f@google.com Could be, if napi->state gets corrupted it may lose NAPI_STATE_LISTED. 719c57197010 ("net: make napi_disable() symmetric with enable") 3765996e4f0b ("napi: fix race inside napi_enable") is the only thing that comes to mind, but they look fine to me.