Article View: linux.kernel.netdev
Article #3105Re: [PATCH ipsec v2] xfrm: espintcp: reorder operations within espintcp_init_sk
From: Steffen Klassert
Date: Wed, 14 Oct 2026 07:39
Date: Wed, 14 Oct 2026 07:39
27 lines
7866 bytes
7866 bytes
On Thu, Oct 08, 2026 at 02:38:32PM +0200, Sabrina Dubroca wrote:
> When enabled on a socket, espintcp sets the socket callbacks to its
> own before it has finished setting up its context and published it as
> icsk_ulp_data. Any one of those callbacks that gets called before will
> dereference a NULL icsk_ulp_data.
>
> Fix this by reording the operations, and add memory barriers to ensure
> callers will have a struct espintcp_ctx available. Add a few
> WRITE_ONCE/READ_ONCE too while we're there.
>
> Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)")
> Cc: stable@vger.kernel.org
> Reported-by: Yuan Tan <yuantan098@gmail.com>
> Reported-by: Yifan Wu <yifanwucs@gmail.com>
> Reported-by: Juefei Pu <tomapufckgml@gmail.com>
> Reported-by: Xin Liu <bird@lzu.edu.cn>
> Reported-by: Peihan Liu <ronbogo@outlook.com>
> Reported-by: Yilin Zhu <zylzyl2333@gmail.com>
> Reported-by: Ren Wei <n05ec@lzu.edu.cn>
> Reported-by: Eulgyu Kim <eulgyukim@snu.ac.kr>
> Reported-by: Jaeyoung Chung <jjy600901@snu.ac.kr>
> Link: https://lore.kernel.org/all/c30b645074a1b379e0f7fe297f917c66137d9964.1778464688.git.zylzyl2333@gmail.com/
> Link: https://lore.kernel.org/all/20260819155349.3555804-1-jjy600901@snu.ac.kr
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Applied, thanks a lot Sabrina!
Technical Details
Message-ID:
<as8xmn5QhJfMwo2m@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-346082-linux-kernel-netdev=dewy.ruReferences:
<41fee34088a7ae150f255493b40f54ecbdc300df.1791462408.git.sd@queasysnail.net>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-346082-linux-kernel-netdev=dewy.ru From: steffen.klassert@secunet.com (Steffen Klassert) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH ipsec v2] xfrm: espintcp: reorder operations within espintcp_init_sk Date: Wed, 14 Oct 2026 09:39:06 +0200 Organization: Usenet Network Message-ID: <as8xmn5QhJfMwo2m@secunet.com> References: <41fee34088a7ae150f255493b40f54ecbdc300df.1791462408.git.sd@queasysnail.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: usenet.network; logging-data="2243133"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:lWdlG3t8hGjlV3D3orwu2Hvsyz4= sha256:K/4s/tw/rK4PZ+Xi6gnRN9itRc9jrz78JAvdlsQR1Ts= sha1:LcgoP2Bn3OPtlQuYZ+FY4/t+xXg= sha256:YNf0h2VLJqeKVSFz8dufk0NhfsQfuqQq0kbYE6CzD2A= 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 7D978110064; Wed, 14 Oct 2026 10:39:47 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.75 X-Spam-Status: No, score=-0.75 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, 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 oasAFRWl2CSe; Wed, 14 Oct 2026 10:39:44 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-346082-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 A26F9110046; Wed, 14 Oct 2026 10:39:34 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 1879D3D1FD; Wed, 14 Oct 2026 07:39:23 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C24C4915B1; Wed, 14 Oct 2026 07:39:19 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b="JSrjZFcA" 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 7B9EF44C661 for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 07:39:16 +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=1791963559; cv=none; b=fro+LTKQQmdraP8ee4CirjqYmkGjmpyHwmvW1YiPYXNtqz7ZhD/kXz21UpAYRmANzVzNS29saWguCqAktrz3qh97Av0mV/o4m/murn+9tYi2bv7IPdGFZizIWwefbWOhDt0WfpIQe4347Hsu/WyPA38WLR1GGOzSZ19Crw5iRgI= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791963559; c=relaxed/simple; bh=tXmjl1dAb/phXW54xGGz5IzlHD8mbsf0iACKL18Lc7w=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WlOY9APN3v5uLuRRf2XpAOi6OYhGO9CWDjNMuXbBK7vz/bQnHU5Dwjk2HY8sOuyzBCb4R0EzC45A++PktDM0Pk6sOkSdxyLhiQm7Pz//v8WYUGMv5Dw/6OpEY03RRPMGTI9uCzW9hbpOabbqKpA4X1yODQqQCMyrm0ShuGHCFYo= 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=JSrjZFcA; 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 088D8201E4; Wed, 14 Oct 2026 09:39:14 +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 Ik0DS_-sErUy; Wed, 14 Oct 2026 09:39:08 +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 A63AF201C7; Wed, 14 Oct 2026 09:39:08 +0200 (CEST) X-DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.secunet.com A63AF201C7 X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1791963548; bh=cPtlbxQ8lVOc4doU3xbjvuIhhvryDaYUeNBDO5y+W64=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=JSrjZFcAHh889lj6RyjkINCwLX87XLBenKsue7eeS/+GNRFBPBFzXLLwKfgk0NXye 4UndccMG6V3VxHHStyju4HHzJn1hZOnjn7rMCKpajOUoONVVj6awgtXPf0iWYdb0lW G2x4G/xKDjQ70+/aarDT15VHVDDupZ7gYiym1c6H6XSVj4z86h+mybm43s+AU3nruY M5zBUuMHWzKQRNZKz527YQN/KFkAsXMLG1lH4VJa5/1v57RM8LS0UaGr10BtMiX26T kaic8QTjTseEysloJ/JoiFaQkaCcA9fDv/SfjEws5LmaKUjT6dv1HqBzk2ujUCNVRN Adpwus2rg4o9A== 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; Wed, 14 Oct 2026 09:39:07 +0200 X-Received: (nullmailer pid 1275093 invoked by uid 1000); Wed, 14 Oct 2026 07:39:06 -0000 X-CC: <netdev@vger.kernel.org>, Herbert Xu <herbert@gondor.apana.org.au> 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: <41fee34088a7ae150f255493b40f54ecbdc300df.1791462408.git.sd@queasysnail.net> X-ClientProxiedBy: EXCH-04.secunet.de (10.32.0.184) To EXCH-01.secunet.de (10.32.0.171)