Received: by 2002:a05:7412:d384:b0:fc:a2b0:25d7 with SMTP id bq4csp5023rdb; Wed, 21 Feb 2024 13:48:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUsDcZaBoqRqsbgXfrxMslNZA12Sy2bZ4QPeWX17HkyMQG2IShccRf2JQ9IOpEPXNTRv4Qs8wRoSDVXNVKq9zOa7toK3YAPqU8MnuPc1A== X-Google-Smtp-Source: AGHT+IE16j3jlJhumxKNtl5Fr98h6AdyELfbK7n769Au0F3aUD0wnIhe1o2zqtwrLTb3VOggjhqN X-Received: by 2002:a05:6359:a388:b0:17b:59f4:f640 with SMTP id ky8-20020a056359a38800b0017b59f4f640mr3629262rwc.1.1708552134722; Wed, 21 Feb 2024 13:48:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708552134; cv=pass; d=google.com; s=arc-20160816; b=nAaVo2v7YgW880WargeVecEFm11iJUzUYTFX5QsjlXCsdbqvn/jJy5sAe1eXprXp38 w6drk0S6kxMJNY4j0O29Vpfxykfq2shCXM3xA9z+kNWHqYO2CmPFWPqDMABIYKYfWOsj Qvh9QN8GF0ceE5MoO/4mGMWYeN0FbQq20DKAYjFuGfKm6Gbs0453DvUTiXh/mt3VGSVB QJ05PaAm3iGDP9YixfoELXQ5Uc3IhLWJi/vGK01EbHBmAYaCe6QOEbGWFI5iZKyjFoIm H94AauiftVN0RqhgcaguKPG5n2Dfmiv6NLei0fKM/yra7+q43IgCUIjA6qnA88vhY9Ki JYXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=c1sqBk9cUpb7FBrM1kD7RfbGlz50iXb0WINw3+0JEPw=; fh=i5ueXHTvFR/cctc8TEXlU5NR7ajdCnxSIm/N87jhjKI=; b=q87r/QyNpUOaSGQBFbyo+q0Yhn52gKsvd5WHPMmipTzZhuyS1nLa1qikbnir+56QWR 2OoqkFMae76nfbhGtUgvXreGr1RneH0LisB/p9Oge2H+9U4ND9PaHDna6WeTA02bjl8L 2k3krCmCEJdDLdAZw+0oYZYmRECSHUh3qnC2VN+lx5ncDJ64GsSzn412Sm2MwHK0/14z 2BO/b1NNGrtklRKO+10G7DL+YX4KG/eYcIFuEUGJ8pV76V3rrZasmzxTAxYESBiLp/hi 3LA5zi2lOus0vfIjavUIHl/2q+MzWmS7JBycJXnGv4SqsGEFwo+OtlsiNyTDeYmTSdXv va5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JmT3tKpU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a22-20020a637056000000b005dc734294f4si8883553pgn.244.2024.02.21.13.48.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 13:48:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JmT3tKpU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D49D7B266EB for ; Wed, 21 Feb 2024 21:37:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA59712AAF5; Wed, 21 Feb 2024 21:29:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JmT3tKpU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F21C128366; Wed, 21 Feb 2024 21:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708550958; cv=none; b=ECNziEnhoeMnoc7ZbRob5mA65M7Ilm2A9WbXJY3moXxowCcg6xYrJ4SE7uGkckanIiMC/W7tn7xAUK+TVyd4jUW/7Vu1ZcHNfZzmJbk9OE7PdNPl2Q8rIf/d4hMo9oe9i24eCMRtXKr/C+9dDrEg/eTYqH7d6rEYV3/AKwCjBXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708550958; c=relaxed/simple; bh=JRgcBVS5XHMkL/8pMwqIfJAZLHXQePimKuWk2NELukw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PfACVVGnuZjCNM6WAbUUyeXRIEubN+cJnKByoHTdOw0p0byWD9xPf8yVAbFquXjXwDg8j8GXWXEWKyMPNyPiyyl3sOLc/Fn1ZoDvWd0Qbjv0U/icnjwmSogPqD3iOwpS0bPGG+1pgZ/8qBln/mQ8R1nZh7W1fssLvXzsNX+lbbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JmT3tKpU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C8ABC433C7; Wed, 21 Feb 2024 21:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708550957; bh=JRgcBVS5XHMkL/8pMwqIfJAZLHXQePimKuWk2NELukw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JmT3tKpUUTmJMlBp4m8Rc90NH8SM6G61jzplm6+nsKJOLZW4UPY0Gc2tC6Jt8SG9a mCYtlXTXStCkRjYRbI4b2E58hh2Z0gp89qDPBKRUPNoL1veS18Ib0VG6zkcWKbL285 6RY0zfyUJXv7VfWdlUtSzGP3qQ9Uy82eGgv3VTSjRzMMiuQRQsD7GPvnw55s6usZGN /Jy6Dan0/n1EdJBgedESk6YXpPOOubw/tD2+en+fPtCCL0Jy9vmUkRCWPk1+wjN8ld cVTiu+MnFB7niZt8NgwkT9VeN1ezVIkSQRGWdQsA40QZZmUQA4xWlbLRemp9L2Q3th W4Z3AICHinHhg== Date: Wed, 21 Feb 2024 13:29:16 -0800 From: Jakub Kicinski To: Thomas Gleixner Cc: syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, netdev@vger.kernel.org, Paolo Abeni , "David S. Miller" Subject: Re: [syzbot] [kernel?] BUG: unable to handle kernel NULL pointer dereference in hrtimer_active Message-ID: <20240221132916.6c7c4219@kernel.org> In-Reply-To: <875xytjnio.ffs@tglx> References: <00000000000014671906112cb2ef@google.com> <875xytjnio.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 13 Feb 2024 00:01:03 +0100 Thomas Gleixner wrote: > So something in that syzbot test case manages to tear down a napi > context which has not yet been fully initialized. While the rest of > napi_disable() does not care much as long as neither NAPIF_STATE_SCHED > nor NAPIF_STATE_NPSVC are set in napi->state, hrtimer_cancel() pretty > much cares as demonstrated by the NULL pointer dereference. > > While it would be trivial to harden the hrtimer code for the case that a > non-initialized hrtimer is canceled, I wonder whether this invocation of > napi_disable() is harmless (aside of the hrtimer issue) or if there are > some hidden subtle issues with that. Thanks for the forward, I stared at it for a bit and I can see one way to make veth disable unregistered NAPI. I'll send a fix shortly.