# CVE-2026-53240: xfrm: iptfs: fix use-after-free on first_skb in __input_process_payload

- Severity: High 8.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.56%, higher than 41% of CVEs (2026-11-30)
- Published: 2026-06-25T08:39:35.809Z
- Modified: 2026-08-05T12:34:26.772Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

xfrm: iptfs: fix use-after-free on first_skb in __input_process_payload

__input_process_payload() stores first_skb into xtfs->ra_newskb under
drop_lock when starting partial reassembly, then unlocks and breaks out
of the processing loop. The post-loop check reads xtfs->ra_newskb
without the lock to decide whether first_skb is still owned:

    if (first_skb && first_iplen && !defer && first_skb != xtfs->ra_newskb)

Between spin_unlock and this read, a concurrent CPU running
iptfs_reassem_cont() (or the drop_timer hrtimer) can complete
reassembly, NULL xtfs->ra_newskb, and free the skb. The check then
evaluates first_skb != NULL as true, and pskb_trim/ip_summed/consume_skb
operate on the freed skb — a use-after-free in skbuff_head_cache.

Replace the unlocked read with a local bool that records whether
first_skb was handed to the reassembly state in the current call. The
flag is set after the existing spin_unlock, before the break, using the
pointer equality that is stable at that point (first_skb == skb iff
first_skb was stored in ra_newskb).

(As written by CVE List.)

## Affected

- Linux Linux: from 3f3339885fb343b7b42d7c34717108ce07da24ae before 8d9a79fbf5172d9c4c0146057af2360913265a11; from 3f3339885fb343b7b42d7c34717108ce07da24ae before ff2ee35b6ce5fa8a8e24ea50b15733d5c8780198; from 3f3339885fb343b7b42d7c34717108ce07da24ae before eb48730bb827d1550401a5d391903f9d90b493c8; 6.14 (not affected: before 6.14; from 6.18.36 up to 6.18.*; from 7.0.13 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.14 before 6.18.36; from 6.19 before 7.0.13; 7.1

## References

- <https://git.kernel.org/stable/c/8d9a79fbf5172d9c4c0146057af2360913265a11> (patch)
- <https://git.kernel.org/stable/c/ff2ee35b6ce5fa8a8e24ea50b15733d5c8780198> (patch)
- <https://git.kernel.org/stable/c/eb48730bb827d1550401a5d391903f9d90b493c8> (patch)

## Sources

- CVE List: [CVE-2026-53240](https://www.cve.org/CVERecord?id=CVE-2026-53240), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2026-53240](https://nvd.nist.gov/vuln/detail/CVE-2026-53240), Public domain, modified 2026-07-08

---

Page: https://cve.day/CVE-2026-53240 · Whole record: https://cve.day/CVE-2026-53240.json · Rebuilt by cve.day 2026-11-25T22:59:26.328Z
