CVE-2026-53240: xfrm: iptfs: fix use-after-free on first_skb in __input_process_payload
In the Linux kernel, the following vulnerability has been resolved:
xfrm: iptfs: fix use-after-free on firstskb in inputprocesspayload
inputprocesspayload() stores firstskb into xtfs->ranewskb under droplock when starting partial reassembly, then unlocks and breaks out of the processing loop. The post-loop check reads xtfs->ranewskb without the lock to decide whether firstskb is still owned:
if (firstskb && firstiplen && !defer && firstskb != xtfs->ranewskb)
Between spinunlock and this read, a concurrent CPU running iptfsreassemcont() (or the droptimer hrtimer) can complete reassembly, NULL xtfs->ranewskb, and free the skb. The check then evaluates firstskb != NULL as true, and pskbtrim/ipsummed/consumeskb operate on the freed skb — a use-after-free in skbuffheadcache.
Replace the unlocked read with a local bool that records whether firstskb was handed to the reassembly state in the current call. The flag is set after the existing spinunlock, before the break, using the pointer equality that is stable at that point (firstskb == skb iff firstskb was stored in ranewskb).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux kernel xfrm: iptfsto a version that resolves this vulnerability.Patch xfrm: iptfs: fix use-after-free on first_skb in __input_process_payload
Event History
Frequently Asked Questions
What is the severity of CVE-2026-53240?
The severity of CVE-2026-53240 is rated at risk 47.
What type of vulnerability is CVE-2026-53240?
CVE-2026-53240 is categorized as a Use After Free vulnerability.
How does CVE-2026-53240 affect the Linux kernel?
CVE-2026-53240 affects the Linux kernel by creating a use-after-free condition in the __input_process_payload function.
How do I fix CVE-2026-53240?
To fix CVE-2026-53240, apply the latest patch provided in the Linux kernel updates.
When was CVE-2026-53240 published?
CVE-2026-53240 was published on June 25, 2026.