Netdev List
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Kusuma DS <kusuma.ds@alkira.net>
Cc: stable@vger.kernel.org, netdev@vger.kernel.org,
	Chakradhar Kar <chakradhar.kar@alkira.net>,
	Ramakanth Gunuganti <ramakanth@alkira.net>,
	Sripathy Ramaswamy <sripathy@alkira.net>,
	steffen.klassert@secunet.com, sashal@kernel.org,
	dongchenchen2@huawei.com
Subject: Re: [6.12.y] Please backport 8045c0df98d4 ("xfrm: Fix dev use-after-free in xfrm async resumption")
Date: Wed, 23 Sep 2026 11:31:43 +0200	[thread overview]
Message-ID: <2026092316-mouse-scallion-6eb2@gregkh> (raw)
In-Reply-To: <CAMcJb7NLooAw=6Vyzbq-7JnE9L=gfTbLL0Y=L1pTFMTg3Vf76A@mail.gmail.com>

On Wed, Sep 23, 2026 at 01:23:01PM +0530, Kusuma DS wrote:
> Hi,
> 
> 6.12.y picked up a bug without its fix. Details below; the request is to queue
> 8045c0df98d4 for linux-6.12.y.
> 
> The issue: on every packet whose ESP decrypt goes async, dev_hold() is taken on
> the ingress device but dev_put() lands on the VTI, because vti_rcv_cb reassigns
> skb->dev without taking a reference. The VTI refcount is driven negative during
> normal traffic, and a later `ip tunnel del` then hangs forever in
> netdev_wait_allrefs_any(). The process is stuck in D state, unkillable, and the
> netdev is pinned for the rest of the boot.
> 
> Introduced in 6.12.y by:
> 
>     4236c30b437b ("xfrm: hold dev ref until after transport_finish NF_HOOK")
>     = mainline 1c428b038400, backported 2026-06-19, first in v6.12.94,
>     together with its dependency af4b8c5e9d6d
> 
> Fixed upstream by:
> 
>     8045c0df98d4 ("xfrm: Fix dev use-after-free in xfrm async resumption")
>     Fixes: 1c428b038400
>     mainline v7.2-rc1; in 7.1.y as 63a300151999
> 
> The fix was not queued alongside the commit it fixes, and is still absent from
> 6.12.y as of v6.12.111. So every 6.12.94+ kernel carries the bug.
> 
> Confirmed on 6.12.96+deb13-cloud-amd64 with a strongSwan tunnel-mode IPsec VTI
> under inbound load; kernels up to 6.12.93 do not contain the code and are
> unaffected.
> 
> The fix touches only net/xfrm/xfrm_input.c, net/ipv4/xfrm4_input.c and
> net/ipv6/xfrm6_input.c, against code 6.12.y already has, so it should apply
> cleanly. I can test a 6.12.y-rc against the reproducer if useful.

It does not apply cleanly.  Please send a working and tested version if
you wish to have this applied.

thanks,

greg k-h

  reply	other threads:[~2026-09-23  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  7:53 [6.12.y] Please backport 8045c0df98d4 ("xfrm: Fix dev use-after-free in xfrm async resumption") Kusuma DS
2026-09-23  9:31 ` Greg KH [this message]
2026-09-23  9:56   ` Kusuma DS
2026-09-23 10:27     ` Greg KH
2026-09-25 18:48       ` Sasha Levin

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=2026092316-mouse-scallion-6eb2@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=chakradhar.kar@alkira.net \
    --cc=dongchenchen2@huawei.com \
    --cc=kusuma.ds@alkira.net \
    --cc=netdev@vger.kernel.org \
    --cc=ramakanth@alkira.net \
    --cc=sashal@kernel.org \
    --cc=sripathy@alkira.net \
    --cc=stable@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /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