Article View: linux.kernel.netdev
Article #2162Re: [PATCH net 1/2] vti: fix tunnel device use-after-free across async crypto resumption
From: Steffen Klassert
Date: Mon, 12 Oct 2026 07:54
Date: Mon, 12 Oct 2026 07:54
23 lines
7748 bytes
7748 bytes
On Thu, Oct 08, 2026 at 01:49:16AM +0000, Qihang wrote: > All real, and vti6 has the same problems. > > The dev_hold()/dev_put() idea assumed the callback runs exactly once > per skb, which xfrm_input() doesn't guarantee. IPTFS frees the outer > skb on its own without any callback. This is a IPTFS bug. If IPTFS frees the skb, it has to make sure to run the whole destruction path including all the callbacks. > The early drop when the SA is no > longer valid happens while family is still AF_UNSPEC, so xfrm_rcv_cb() > can't find the afinfo and never calls us. Assigning family before the early drop should fix this. > And on the success path I'd > drop the last reference before gro_cells_receive() is done with > skb->dev. I think we should unconditionally refcount skb->dev in the xfrm input path to fix that for now.
Technical Details
Message-ID:
<asySLDyakgLAKVdf@secunet.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344776-linux-kernel-netdev=dewy.ruReferences:
<20260930090813.73901-1-q.h.hack.winter@gmail.com> <20260930090813.73901-2-q.h.hack.winter@gmail.com> <179110850671.434549.2584497019282941556@kernel.org> <1791424156.460.8ed76b88c7@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344776-linux-kernel-netdev=dewy.ru From: steffen.klassert@secunet.com (Steffen Klassert) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 1/2] vti: fix tunnel device use-after-free across async crypto resumption Date: Mon, 12 Oct 2026 09:54:20 +0200 Organization: Usenet Network Message-ID: <asySLDyakgLAKVdf@secunet.com> References: <20260930090813.73901-1-q.h.hack.winter@gmail.com> <20260930090813.73901-2-q.h.hack.winter@gmail.com> <179110850671.434549.2584497019282941556@kernel.org> <1791424156.460.8ed76b88c7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: usenet.network; logging-data="1711900"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:T2BuRo7JYIlMUmTOI9BdAhqwoTM= sha256:0kNh6QoPJKGWHOek04JjhgR28dDK2vBumiUhQsDFX44= sha1:uIVody1mwnWQvnn0lPG6wniN0VQ= sha256:0iaObUdYzuNvMFymaT9u8SGS0t9bouyRVPywBfqhArk= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id D2CB610FB22; Mon, 12 Oct 2026 10:55:57 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.751 X-Spam-Status: No, score=-0.751 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=secunet.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 34qQFuAJa7Sx; Mon, 12 Oct 2026 10:55:50 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-344776-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=secunet.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 1FD2C10FB1F; Mon, 12 Oct 2026 10:55:41 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 9C9B225B1D; Mon, 12 Oct 2026 07:54:34 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C8FA440A02; Mon, 12 Oct 2026 07:54:34 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b="r99Q2mnT" X-Received: from mx1.secunet.com (mx1.secunet.com [62.96.220.36]) (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 2BEF03A0B31; Mon, 12 Oct 2026 07:54:30 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.96.220.36 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791791674; cv=none; b=OpxUZzH2tyRnic/3WKPi80agaZlq9tctEeHP9idDt2PwKnFfKl5bBSIfkSmL8bT0DkxeWS5VUzTRe/yiMSOeO2u/R+/V+zgtLJATecMGZiZBsf85y9zVd2TZCvzZuQ0unW+Ud9C8J56AROH+F0mPxW1cBoJ9cnigQd+S5z14wPY= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791791674; c=relaxed/simple; bh=iOFjYct+NA/rBCnLOOO0w4AHLEjLlBpqJJ6RJmSPcPE=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UobwRWtOU+tzCV96AGPbXYmkK9YTv9I7dzd+/7yXFCwIZk9T0rBWCHvz6QOJOvXqqbQ7i5REzjqEG5B+TvcJ9TlSUzNumYqNh2ClWWHmo7Nm9/xSxJaspxqOJocHNq3p+2vVc/G7osi2hip6QUK+qNKSp7i6XR91xvzUytfU1o4= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b=r99Q2mnT; arc=none smtp.client-ip=62.96.220.36 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=secunet.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=secunet.com X-Received: from localhost (localhost [127.0.0.1]) by mx1.secunet.com (Postfix) with ESMTP id B1DFE20523; Mon, 12 Oct 2026 09:54:22 +0200 (CEST) X-Virus-Scanned: by secunet X-Received: from mx1.secunet.com ([127.0.0.1]) by localhost (mx1.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nVQcTqQDLl-S; Mon, 12 Oct 2026 09:54:22 +0200 (CEST) X-Received: from EXCH-01.secunet.de (rl1.secunet.de [10.32.0.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.secunet.com (Postfix) with ESMTPS id 33EAF20185; Mon, 12 Oct 2026 09:54:22 +0200 (CEST) X-DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.secunet.com 33EAF20185 X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1791791662; bh=Gbthn3cQMvB39iXiyDycUbw8EvcDj5qysY1Z6LXGzp8=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=r99Q2mnTuhOt4NX66E5krF7jLIYQdyeVsuMg9DAnZEpowe6G4qhlHzxgfWtjh+gW8 pnNH+8aZDhphXp17kqczkdK4YSibTGBHXSjKszSDbfSho44XxQJwm08biPTwzrw7sQ B5AqsmaTQY8yIT8xU5GcxoMa5OPjRhC8mW3I1S/WUTYe8N39ooomXqKryLWqTWRa1C bAhPra9iI7KQM3jjXFAYYO14aAEyoZs2ZWajP+gtjNj8WLEm+dDhAP+Q6Hl2+zKeBs TiFxiHTCJhCfdm2HBQRINzg6UJ7YlRNhxSNqSIQR0niP5Cd0pXri+QkC4QEr3np4q6 g/ZUNaVKmuUPQ== X-Received: from secunet.com (10.182.7.193) by EXCH-01.secunet.de (10.32.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49; Mon, 12 Oct 2026 09:54:21 +0200 X-Received: (nullmailer pid 2341654 invoked by uid 1000); Mon, 12 Oct 2026 07:54:20 -0000 X-CC: <netdev@vger.kernel.org>, David Ahern <dsahern@kernel.org>, Ido Schimmel <idosch@nvidia.com>, Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, <linux-kernel@vger.kernel.org> X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <1791424156.460.8ed76b88c7@gmail.com> X-ClientProxiedBy: EXCH-03.secunet.de (10.32.0.183) To EXCH-01.secunet.de (10.32.0.171)