🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6334

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

#6334
From: Nicolai Buchwitz
Date: Thu, 22 Oct 2026 08:57
21 lines
9166 bytes
On 22.10.2026 02:08, Jakub Kicinski wrote:
> 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.

Right, spliced or zerocopy pages would be encrypted in place too. I'll 
send a v2.

Thanks,
Nicolai

--
pw-bot: cr
Technical Details
Message-ID: <88ca4db1ebc01483bdcc7702f2a542f2@tipi-net.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350438-linux-kernel-netdev=dewy.ru
References: <20261019-nb-otx2-xfrm-unshare-net-v1-1-ee9b24f9e673@tipi-net.de> <20261021170856.15bb09ff@kernel.org>

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-350438-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] octeontx2-pf: fix skb use-after-free with ipsec
 crypto offload
Date: Thu, 22 Oct 2026 10:57:48 +0200
Organization: Usenet Network
Message-ID: <88ca4db1ebc01483bdcc7702f2a542f2@tipi-net.de>
References: <20261019-nb-otx2-xfrm-unshare-net-v1-1-ee9b24f9e673@tipi-net.de>
 <20261021170856.15bb09ff@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="168901"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:rjxpny78G1S0TcoS7eW8H98y0Gk= sha256:toc9oQjYSh/uk7fynzGafgxQsNXMx+6c2nS9Dl8aYdU=
	sha1:DRrSKisSQKa3AyJjLnMVzLhko4g= sha256:CyfT/Fi9n6YFBlpnJNZa3VGdfdhjw9ejPNC4Ko8qqF4=
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 EAFEA1111E9; Thu, 22 Oct 2026 11:58:43 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=tipi-net.de
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 psc5M9KO2FC1;
	Thu, 22 Oct 2026 11:58:41 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350438-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id DE3A71111BD; Thu, 22 Oct 2026 11:58:30 +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 00EF4303CF; Thu, 22 Oct 2026 08:58:02 +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=1792659482;
	b=BynTozWE74q4IYlRyv+QDl3aZOqztj93WmPkE42Gc66DUeHkadF5WQgYfTWIz3/DSmyU
	 QQrxkeR9+WMZ8aedARM9A66eXM3KtB56fdZZ1TC1FUmTCHHEKpwuC24WNi9ATZpQur4wn
	 aXStxAOJa+/2bb1uv3RBoAgTknl9BwJeaws0Aceist7ZB16/spogZjTAdhUsL9SDHpoNP
	 hkTOYarTG78IXM9swv+hI3P2ucDhDJ3arE0fYjywRkJPgQlIvNxdyfYDsq4xcdhARUZzD
	 CjFGGELSbyWzdmHlS3vwMZ9uIUq6Tt8AQiakHTZka/OdS7kKvKIEHUTuo6S0V6lBMjw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792659482;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=OGYrtd+SjkywYOsHd1goE1rmxbPf3oWPnIKBnt53Dsg=;
	b=aUtifyZR4c14yzwK5mrfuY1K5HGGMX7ZLrVQguHvlk/5IGRTgPogEImJcYrJrqPL9CBx
	 gvKlGOvpvqReveM7bR1zLs0cJAaPoAA2Py03Wl9FkkuSSJZ62Ht4LPNJt8zoLJaUgNx5h
	 6ou0wA4CQnHRa81FIbADtjgs6GVWWJ+t5xM1XpQLa6ZIqnpa2l6etfYljq3QRSD7CJn4L
	 x5OzrWYUi/FE/q7y4RRACTwL5tyREnXEJwAy/7+jowEZ2nXZcsr0lQD6AfzeeKBw6tdWI
	 xEmbqJM327aQYiQy/m/oeGjlKjk3BGi47JD0GbFSWbsuAbDA4blw70tK2MUpFXwJgHg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=Y4SJiwun;
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	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 CBCC8606A326;
	Thu, 22 Oct 2026 08:58:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=Y4SJiwun
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792659477;
	b=UhaRKydRefm4OgZHi8Riw4LxsLY12p/yPRRu8viqBwA8nzJSU2YR8h0b6sbIJPIS+ybk
	 oJmX15pabID/ter87uboZ9gvxzTh5TsKhlFUvO64T+fAAafdkawRAX96y04TXExQGnhEi
	 3i9BFFs1C2fVfnp7YqG7vBU2bpU1LfBg9ydu174M7bhryq55nyIF6V4Y+wa+28yVJeQ2B
	 vKoFDTD8wLV1iyjlZYmQSvqH+SmMOFVJe20ccv4JDUiTSI1VcIL0+x0thbDU4rAvY/qpc
	 TTwlDEqxo56qhmxba8uNnL270IypwwlJobamrCmYgqqydNdJ20Vj4kdBQURfjkzb1Rg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792659477;
	h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=OGYrtd+SjkywYOsHd1goE1rmxbPf3oWPnIKBnt53Dsg=;
	b=ORpDgrp0R5+1sUveww5V8hHXg+m/D3p2jUaqirSv0ym6FoV0FQ/vBavt/VEHVPGJb7Df
	 47+y5KhAB7wYXfFL4/MhROJVDRgzGWZDlrVYM6LNrv5kWA13uWaMQlWgikNmF1/qKsAr0
	 dklYZkIWPvg3H/ffFkvr9FVg2npPN+9c/VQFC+bWlmqTBSLxOuO2dKnez4+yuUh1ZXW/y
	 EzTpzHuscveH+4ytV1qcCuJsuCjPuBYYljQkDJk7O2zfuxCLIMTU0ihn7IKRQixnxkawT
	 4X870UWAPzP+fpDaD0lr8QHOxM8tVdoYAhWWMClue0r/Np35H6nIPHoAV0KushRDVgg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=Y4SJiwun;
	arc=none smtp.remote-ip=194.13.80.246
X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246])
	(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 339E0606A31A;
	Thu, 22 Oct 2026 08:57:55 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 339E0606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de
X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id AC266A0190;
	Thu, 22 Oct 2026 10:57:48 +0200 (CEST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1792659474; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=OGYrtd+SjkywYOsHd1goE1rmxbPf3oWPnIKBnt53Dsg=;
	b=Y4SJiwun9ohaxRsgL6Pk2l2pVdNKLier3sWhqd1hXDz90K7AwFB37pfUzJJWG3Kend2hvj
	gbrv7NA+iRS0zwdHkh8aN6IGhCg1VQDIShO6OgymhHwXvEuOASQu6568InGab2fds9ZPS4
	5zg8DQrQ2RlRU+tk+DkIZyHGsWtNFHFF0lzCgngyrmDuZrAnRRrn/CWUWHFWr7+m+Fy2ei
	nl3dwgOEvaFIgtVL9+xncVy3IeJYnaEFe3MJ77TbTlakTtqH1g1jhIGMsFwgXw8I31ld/X
	VZRwd91GP5TPBO/W7m5qS9mX5sJ+qh7yScg+0BS6j+stVfpL/gC+sAVTkVXGJQ==
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
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: <20261021170856.15bb09ff@kernel.org>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3