From: Wentao Liang <vulab@iscas.ac.cn>
To: andrew+netdev@lunn.ch
Cc: anthony.l.nguyen@intel.com, davem@davemloft.net,
edumazet@google.com, intel-wired-lan@lists.osuosl.org,
kuba@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com,
przemyslaw.kitszel@intel.com, sln@onemain.com,
Wentao Liang <vulab@iscas.ac.cn>,
stable@vger.kernel.org
Subject: [PATCH] ixgbe: fix xfrm_state reference leak in ixgbe_ipsec_rx()
Date: Thu, 17 Sep 2026 11:13:17 +0000 [thread overview]
Message-ID: <20260917111317.2148568-1-vulab@iscas.ac.cn> (raw)
ixgbe_ipsec_find_rx_state() returns the state with an extra reference,
which is handed over to the secpath on the success path. When
secpath_set() fails, the state has not been stored anywhere yet and the
reference is dropped on the floor.
Release it before returning.
Fixes: 92103199f10a3 ("ixgbe: process the Rx ipsec offload")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
index bd397b3d7dea..e44d5eed9ab5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
@@ -1197,8 +1197,10 @@ void ixgbe_ipsec_rx(struct ixgbe_ring *rx_ring,
return;
sp = secpath_set(skb);
- if (unlikely(!sp))
+ if (unlikely(!sp)) {
+ xfrm_state_put(xs);
return;
+ }
sp->xvec[sp->len++] = xs;
sp->olen++;
--
2.34.1
next reply other threads:[~2026-09-17 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 11:13 Wentao Liang [this message]
2026-09-21 10:33 ` [PATCH] ixgbe: fix xfrm_state reference leak in ixgbe_ipsec_rx() Simon Horman
2026-09-21 15:29 ` Loktionov, Aleksandr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260917111317.2148568-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sln@onemain.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox