🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6242

Re: [PATCH net] octeontx2-pf: fix skb use-after-free with ipsec crypto offload

#6242
From: Jakub Kicinski
Date: Thu, 22 Oct 2026 00:08
11 lines
8266 bytes
On Mon, 19 Oct 2026 17:04:33 +0200 Nicolai Buchwitz wrote:
> +	/* Crypto hardware need write permission for ipsec crypto offload */
> +	if (unlikely(xfrm_offload(skb)) && skb_cloned(skb) &&
> +	    skb_ensure_writable(skb, skb->len)) {
> +		dev_kfree_skb_any(skb);
> +		return true;
> +	}

Why just for cloned packets? Frags themselves may be read only
if they are spliced filesystem pages.
Technical Details
Message-ID: <20261021170856.15bb09ff@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350316-linux-kernel-netdev=dewy.ru
References: <20261019-nb-otx2-xfrm-unshare-net-v1-1-ee9b24f9e673@tipi-net.de>

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-350316-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] octeontx2-pf: fix skb use-after-free with ipsec
 crypto offload
Date: Wed, 21 Oct 2026 17:08:56 -0700
Organization: Usenet Network
Message-ID: <20261021170856.15bb09ff@kernel.org>
References: <20261019-nb-otx2-xfrm-unshare-net-v1-1-ee9b24f9e673@tipi-net.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="92899"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:PFGuYoxoS4vsg9v0pMzU8wJl86o= sha256:cYsslCllUwfYeyC6ovpHIveTXV38xh6Mf+x2B/a/XuU=
	sha1:RCsXwnotsLZPloKsX1+dNH+a+s0= sha256:/Br/BqNlwxcTae1xmj+rpl1HC6K+rWNmkI71PjJYLkI=
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 73DA1111162; Thu, 22 Oct 2026 03:14:25 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, 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=kernel.org
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 O24b8n8rGLNQ;
	Thu, 22 Oct 2026 03:14:18 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350316-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 70EC911112F; Thu, 22 Oct 2026 03:14:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 4570C36996; Thu, 22 Oct 2026 00:09:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792627750;
	b=IqmcMfQPWbGpz6PDEukUhqywPvsaRitzt9+Vcs9HXnW0sWtHuzHc87Tt3i7mMSsKNklq
	 zvo15msOLswbOWTYtvcWyFirOTrWiiwpyNXEISEzNPTHlL/Ra7sT46Bs4FY4rA287v6wg
	 kcs1oej79cyx60f4/ilLk2pM+veBmxEzhe+LgfRe6I+oY4RYSdn+EuHc3zGwRZ8sq90v/
	 k7F91ocwIEFPpxAdmeIYQGk/R5336YeWBnaDW0l9s6tlr6tmQQ5BcepQl4zoyFB1ba9jN
	 QDRCR1YH7TX5MQtY5TPe0MqjAcUeuvwyh+NC0o7RrSsAmIwdOCwDVv0Qg+wDtUawJcg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792627750;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=hHgFhkC5mwTs1gmpMNlDj1TsT3RTcuRQrpWCX6V0XYo=;
	b=W96/0+jQuMmYQWzWfTf9YIlOiS+akFHdGexT0qFcoB/cC4T71o+buUvkFwWRB6YSfCDm
	 5C3eOFoUCj2xyZRmhfk8AU16v21vzyNO0yq38S/VkqYTk0Onv9+0wGBE96TpgVUPmcCb1
	 hOLJWH4G4LH6D8oqU6vV36p9jkpnt27PmbTBAmQtWc0kpbQDNj1yyiFmaO9yBEmcPyV9y
	 xBStrs3Luk7to3wW70BYjTCYlikAvTWGdHlMbiFHHhQV0W4mmfskZmP2ET4mI4tGJPBc8
	 nLHL1isb4HZ/2Pj6miS5x4qYtjWUpXwob37u0NhNCOND1Ohd+IQytOe1YeTeME17zLQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CuVx9ZBE;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 54199606A31A;
	Thu, 22 Oct 2026 00:09:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CuVx9ZBE
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792627738;
	b=fo0oEJMYI5eOUwUBoRNmqhkBlKrxqRv7LBUii9sr3kOcSKqsBcz8s1o+G8FXe7C6C6Qv
	 +eC2iNlfKDjMVtyGcnPgCpaEd4wSWnZLatN2nn9azkL8R6Iox8dvrwwviS7CLbwtn354d
	 rUPVOCCVXa8YEA+Vl9GSJeex/uwgnkW7R3y8W0K5sB+tS0Ss4Dqk7BUKpw7TAbVQNOXHa
	 BkcuxgLKs0q9zCLaYJxZIzcUx5jXFP1dkVj2uOvVQ4PZG8ynCY99UybGNs9ukWFGwLCng
	 5eFf3ymq/LoKKyFSJUHgnCWJnO/HrAr77zTdzUiofJXfUNs4D/pHvtv7MGZ0QgCHhkw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792627738;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 In-Reply-To:References:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=hHgFhkC5mwTs1gmpMNlDj1TsT3RTcuRQrpWCX6V0XYo=;
	b=NHBDoVNimL9ZOtnlCipX/MuzF6rfgn9DqOJsTnwtVYuZTaXb4rL0Aovt0qOhcNQPU38s
	 tKmJXVt+TwltD90UjKUYihEie9rk7ges4b2mLytTDwhKJlfsSmn5LpZOprEN7q2DXvveK
	 ZLb+kcz6a8GmxFeen6mnxrj5dbGE5V9RvVcI13QGNpqcvuaVetBLfVjX3mL+iuYCixbqF
	 RdmX9cON8N0btFFfm3YwSZ+mLjipbmalXazUBz9GT9rC1kj4mN8xrgD7+xhqBph0m+hqs
	 AMFzsOqJ2mecwkKXPIaXpZRhrQgABjP1ikytoaF8OOb4F8dSRgJpi6Ehu0C/Qhjh6cA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CuVx9ZBE;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AAF8606A319;
	Thu, 22 Oct 2026 00:08:58 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B27501F000C1;
	Thu, 22 Oct 2026 00:08:57 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792627738;
	bh=hHgFhkC5mwTs1gmpMNlDj1TsT3RTcuRQrpWCX6V0XYo=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References;
	b=CuVx9ZBEqi/DvK/9kmzVfh6xpIlzsi5DJJI05Z6RBd9914BUP99wQGZP4SyouoSaf
	 bOeK8QUp7I3uRCVMGVGh5O6suK11EWshB3BSAOXh0NsHaHnGNbXFRtHf9fTxUClO/N
	 9cv4dY3nJug9bBZUyo5l7ivijWg7dq9RClpMvbWhY8oas3TIQud+g6cVWtSP9OipU/
	 yIOeW2cBup8NA7uJQKeaT6NXesmlakixu6lyi13sqH4UCXfsVka371KMZXcc2j+nA2
	 V/KAyn0U/CzzlSIUwEnDo1VrXcUNwbhP7DfyJr0FqbMe5fvEwEPT2WrrWwIXEcW349
	 6GKE3HH27sdzA==
X-Cc: Sunil Goutham <sgoutham@marvell.com>, Geetha sowjanya
 <gakula@marvell.com>, Ratheesh Kannoth <rkannoth@marvell.com>, Subbaraya
 Sundeep <sbhatta@marvell.com>, Bharat Bhushan <bbhushan2@marvell.com>,
 Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller"
 <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Paolo Abeni
 <pabeni@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-In-Reply-To: <20261019-nb-otx2-xfrm-unshare-net-v1-1-ee9b24f9e673@tipi-net.de>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list