From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (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 C98522D1F72; Tue, 26 Aug 2025 16:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756226951; cv=none; b=CO72U7/W2D+6O6GYvxh/p6QfthWJwnno0piBnuJ/jZF8aB8lXxxc+FQBIKL7/TrrOGkoJi2uXFnCljqUeBCMx/g2zyNXAXFICK9/GEA0+Z6Qabhv1Sx9fGKFuzkgTznIW8R0QPg86XM93NqxeIp36mTjNwONCzK5LK3uSfXPvvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756226951; c=relaxed/simple; bh=FbtgspGfYt9UA/lnvGQ/5V+qJoWUxs9gMT5psT2ukWU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OFvDj5x4wLc+l8h+nUUvGmydwn3Eyw7vgyXb7vu3SQg7fArCEqnEdi1AF05jVrM0DwqwetZLgze6Vf/NcVomOvUu0tNlxXKKtQZg4z2L3mbA6BVO28v1YPxKtKrMBsL2uk2aONAD1AV+KSqBo4+nEJ0Y+nkgRNzAzOtk0U8VA7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id 8E9B060B46; Tue, 26 Aug 2025 18:49:06 +0200 (CEST) Date: Tue, 26 Aug 2025 18:49:06 +0200 From: Florian Westphal To: qianjiaru77@gmail.com Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] Reference Counting Vulnerability in Linux XFRM PolicyManagement Message-ID: References: <20250826162500.34292-1-qianjiaru77@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250826162500.34292-1-qianjiaru77@gmail.com> qianjiaru77@gmail.com wrote: > diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c > index c5035a9bc..50943fa4e 100644 > --- a/net/xfrm/xfrm_policy.c > +++ b/net/xfrm/xfrm_policy.c > @@ -3786,6 +3786,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, > if (IS_ERR(pols[1])) { > XFRM_INC_STATS(net, LINUX_MIB_XFRMINPOLERROR); > xfrm_pol_put(pols[0]); > + pols[0] = NULL; // Clear pointer to prevent reuse > return 0; > } This change makes no sense to me. pols[] has automatic storage duration; its existence isn't visible to the callers of __xfrm_policy_check(). Is this report generated by some tool? If that tool is syzkaller, please share the full backtrace.