# CVE-2026-31471: xfrm: iptfs: only publish mode_data after clone setup

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/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.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-04-22T13:53:59.595Z
- Modified: 2026-11-11T23:10:00.263Z
- Weaknesses: CWE-415
- Assigned by: Linux

## Description

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

xfrm: iptfs: only publish mode_data after clone setup

iptfs_clone_state() stores x->mode_data before allocating the reorder
window. If that allocation fails, the code frees the cloned state and
returns -ENOMEM, leaving x->mode_data pointing at freed memory.

The xfrm clone unwind later runs destroy_state() through x->mode_data,
so the failed clone path tears down IPTFS state that clone_state()
already freed.

Keep the cloned IPTFS state private until all allocations succeed so
failed clones leave x->mode_data unset. The destroy path already
handles a NULL mode_data pointer.

(As written by CVE List.)

## Affected

- Linux Linux: from 6be02e3e4f376fea468846c8562655ca5ee18204 before 371a43c4ac70cac0de9f9b1fc5b1660b9565b9f1; from 6be02e3e4f376fea468846c8562655ca5ee18204 before 5784a1e2889c9525a8f036cb586930e232170bf7; from 6be02e3e4f376fea468846c8562655ca5ee18204 before d849a2f7309fc0616e79d13b008b0a47e0458b6e; 6.14 (not affected: before 6.14; from 6.18.21 up to 6.18.*; from 6.19.11 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.14 before 6.18.21; from 6.19 before 6.19.11; 7.0

## References

- <https://git.kernel.org/stable/c/371a43c4ac70cac0de9f9b1fc5b1660b9565b9f1> (patch)
- <https://git.kernel.org/stable/c/5784a1e2889c9525a8f036cb586930e232170bf7> (patch)
- <https://git.kernel.org/stable/c/d849a2f7309fc0616e79d13b008b0a47e0458b6e> (patch)

## Sources

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

---

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