xfrm: input: hold netns during deferred transport reinjection
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7b3801927e52f8621de311277f7fc727635019e7 · < 9f7ebb45a83afc3216e855e57d51bb4bc9b5232e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfrm: input: hold netns during deferred transport reinjection
Transport-mode reinjection stores a struct net pointer in skb->cb and uses it later from xfrm_trans_reinject(). That pointer must stay valid until the deferred callback runs.
Take a netns reference when queueing deferred reinjection work and drop it after the callback completes. Use maybe_get_net() so the queueing path does not revive a namespace that is already being torn down.
This keeps the existing workqueue design and fixes the netns lifetime handling in one place for all users of xfrm_trans_queue_net().
From the CVE record · Linux
The Linux kernel's xfrm transport-mode reinjection can retain a network namespace pointer without keeping the namespace alive until a deferred callback runs. If the namespace is torn down first, the callback may use an invalid pointer. The input does not establish how an attacker could trigger this or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their vendor advisory for affected versions; none are specified here.