Article View: linux.kernel.netdev
Article #23430Re: [PATCH ipsec] xfrm/compat: pass on the translated length of a socket policy
From: Steffen Klassert
Date: Fri, 27 Nov 2026 09:24
Date: Fri, 27 Nov 2026 09:24
14 lines
9920 bytes
9920 bytes
On Mon, Nov 23, 2026 at 07:29:46PM -0800, Andrii Tereshchenko wrote:
> xfrm_user_policy() compiles a 32-bit task's translated socket policy
> with the untranslated length, 4 bytes short, so the policy loses its
> last template: an ESP-required socket policy then sends in clear
> text. Have the translator return the translated length.
>
> Made with an AI coding assistant, reviewed by the submitter.
>
> Fixes: 96392ee5a13b ("xfrm/compat: Translate 32-bit user_policy from sockptr")
> Cc: stable@vger.kernel.org
> Signed-off-by: Andrii Tereshchenko <opensource@andrii.net>
Applied, thanks a lot!
Technical Details
Message-ID:
<awlMY_jXPtnF8D2W@gauss4>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372572-linux-kernel-netdev=dewy.ruReferences:
<5249741d-fa84-4d54-bf77-45f48dbbb169@mid.andrii.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372572-linux-kernel-netdev=dewy.ru From: steffen.klassert@secunet.com (Steffen Klassert) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH ipsec] xfrm/compat: pass on the translated length of a socket policy Date: Fri, 27 Nov 2026 10:24:51 +0100 Organization: Usenet Network Message-ID: <awlMY_jXPtnF8D2W@gauss4> References: <5249741d-fa84-4d54-bf77-45f48dbbb169@mid.andrii.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: usenet.network; logging-data="694016"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:yO7lGJmcwzwyzqHcoq8asI+ZCdA= sha256:fwoEWwHbq6184BkURKXwnRtJwgW/LzKVZ+XeY3Mbp0M= sha1:u2TN+6isPOsyXGb7eU7gDqCx2O8= sha256:IO2hQwrRFbHW7wzJr3Bjz7BvT1j1azBcMBl3LzOMAkg= 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 89217125F39; Fri, 27 Nov 2026 12:25:16 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.151 X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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=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 c348Bp65ETKb; Fri, 27 Nov 2026 12:25:14 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-372572-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id C8D94125F25; Fri, 27 Nov 2026 12:25:05 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 677E426BAC; Fri, 27 Nov 2026 09:25:04 +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=1795771501; b=4a28IH+D2n6N1iT+o/6JheI32WwDQoFh+KA8nVHKwyBRICSlIJ2Xc5VnwHiy0gvrupmc KmyyTmbz2/197xk+sZTCevI3vWLjhrLIup7L/CH75/E1tILsqvkPQGpb2ULNY5fOyjoTz oNxgL6lcn6znSwUNQXruulxsFkNzwqxKDrEX93Fzp1XYc3/kgsHiZxeoirXHVgmd0kqie WXXlLPEr/fwpp8lMOsMDq929H7JITBr+5FZlYovowQ7aDV2LyBat85vqI7KxS8EwEndF3 +++v1rn70SEk6Xboemzs3i0pKJqJBmuH44q7nUop9gzzm04G9F7wPTRUAv+6CGYlWnw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795771501; h=X-Original-To:Received:DMARC-Filter:Received:X-Virus-Scanned: Received:Received:DKIM-Filter:DKIM-Signature:Received:Received:Date: From:To:CC:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy; bh=ffjaXrQgekHgaiAXYlHWxAd1hg/vdm54u7R2y3uB1e8=; b=biPpv5BMVx17IBUQ0eqzJqMyeWZfErHcryxk1EgfbCu3CD5GLKPC18YfuL+/IncFDWB2 hIWdZ0KH4GSrwuAzM2prGIfoNbY2HiVifeD+SICTfeYmlxblxDIQ8v2kOw408GJYRCZvA 9SprUfCAUQbGt+r2eMmZQ9dVK4e10b+iu/T4EGipnzNrSewJcKTl0aFF3aZdDnvtfLvcW N/+CHWA08BtqsXETXMwPdcKiVQKjoPF7ZXIeb8uyyhRxAJk7NDMVilaBil31m/q9SZef3 BjRJX3vA2Uhil95xtuNcSv3Vf0b7WMnEqd7d6te7+jORr5Z3dZ6C0ebJMtIGJJ7qvgg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=GtuuVy1j; dmarc=pass header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; 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 4EFBA606A327; Fri, 27 Nov 2026 09:25:01 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=GtuuVy1j X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=62.96.220.36 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795771495; b=4gC4wPhO9Z1YNWgmfSVeun+MgWl+VpdWvNfgKSiO3rYJqAmC5Isblvsks0TFC/mzuK+2 0IBGWT9ubCV58LZ0JRt3UHfgxLi9UX9B9cbiQDuIJpw7D/W8XipHobiuY7n0LeIvnvt0X hOMfrzQ6LtN6ME44K97pxFSuNhaQvqIdY9nsCsf+UJmoCC5hVAdK22VorO+QKYmROc3Ie Cnw712pOvyjI3RFHXoJeDWV4ZPy4NOhDbVB5jvhBL4AX+kyEcfkLvyGo9DjNVkLH1zz6z 4rBaTp7lGbxzr7YeGDvObJcgZuaJuuPaKrZ7Hl4tYuEorcWbGTGxsaKC077me5veXcQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795771495; h=DMARC-Filter:Received:X-Virus-Scanned:Received:Received:DKIM-Filter: DKIM-Signature:Received:Received:Date:From:To:CC:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy; bh=ffjaXrQgekHgaiAXYlHWxAd1hg/vdm54u7R2y3uB1e8=; b=mty0H+aKDcmbIhQSHdI3qZ+SKhBNRyVOvgOlO5LL37T70Jxe3xqW+s81Z8elEpm7hl8P 7Gy+qUaK9V7OzJ9nOwzsxfNfsjHbA1CeKXhcc5B2EbYhRklmT9ZYejKvEbOmrpgUo0JMv AtoU908+Pg4qE8hfip+/So/At+ACmuG1yxu/hDTrYqtY69qoupZIACh6jqAhKV1CUftW/ f2W5eCEEe7G4irhIdKXyeDO1QF+EWl5NaWaRAhzhGLGhTYolFnlrUXz4F//KoNyeT9qCZ 2WlsiBSUkANdp3Iqzsw8UTbS4mwlfU+UIGZs7u3iX/OT/81b576SvxdFiAR3rU2vc5A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; dkim=pass header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=GtuuVy1j; arc=none smtp.remote-ip=62.96.220.36 X-Received: from mx1.secunet.com (mx1.secunet.com [62.96.220.36]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B00CF606A321; Fri, 27 Nov 2026 09:24:54 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B00CF606A321 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 5E1FC208A6; Fri, 27 Nov 2026 10:24:53 +0100 (CET) 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 UrWwbOnHPHgB; Fri, 27 Nov 2026 10:24:52 +0100 (CET) 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 D500120894; Fri, 27 Nov 2026 10:24:52 +0100 (CET) X-DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.secunet.com D500120894 X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1795771492; bh=ffjaXrQgekHgaiAXYlHWxAd1hg/vdm54u7R2y3uB1e8=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=GtuuVy1jYqkTjFISKIRbvwGvu4BScdqaj10HE6PHMbaUe02lCFRgQzaoo2cZFlDdX lypl3Y3ZJ6oybq1sp5bBH3/UkZv40suipixwn3ZPLWRzl0OMYz9fJx9W7qebpH8Q2D V3eY+TP8StHFO645IWuEN8DY0WrvuUBWNaxrVvThK0hpZgICoE7YxYIjGCxRpBsIRt J+mi0H4/603PexmVaTH+VSyGM24npjUtrYIPX4Du/4eu06mD1cN2o4jtTBj7NLhfWe QfhWV0PaOosm8Yam9GrBMfSV72gA/tvYKVi5SO2Fqh+A58A7+ZF7qkcpNTRVTW+jNv CF/VHq0iOz4tg== X-Received: from gauss4 (10.182.7.102) 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; Fri, 27 Nov 2026 10:24:52 +0100 X-Received: (nullmailer pid 3468826 invoked by uid 1000); Fri, 27 Nov 2026 09:24:52 -0000 X-CC: Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Dmitry Safonov <0x7f454c46@gmail.com>, Sabrina Dubroca <sd@queasysnail.net>, <netdev@vger.kernel.org>, <ipsec@lists.linux.dev>, <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org> 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-In-Reply-To: <5249741d-fa84-4d54-bf77-45f48dbbb169@mid.andrii.net> X-ClientProxiedBy: EXCH-02.secunet.de (10.32.0.172) To EXCH-01.secunet.de (10.32.0.171)