CVE-2026-31471
Received Received - Intake
Use-After-Free in Linux Kernel IPTFS Clone State Handling

Publication date: 2026-04-22

Last updated on: 2026-04-27

Assigner: kernel.org

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-22
Last Modified
2026-04-27
Generated
2026-05-06
AI Q&A
2026-04-22
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Linux kernel's xfrm subsystem related to IPTFS (IP Tunnel Fast Segment). The issue occurs because the function iptfs_clone_state() stores a pointer to mode_data before successfully allocating a reorder window. If the allocation fails, the cloned state is freed but the mode_data pointer still references the freed memory. Later, when the destroy_state() function is called through this mode_data pointer, it attempts to tear down IPTFS state that has already been freed, leading to potential use-after-free or memory corruption.

The fix involves keeping the cloned IPTFS state private until all allocations succeed, ensuring that if cloning fails, the mode_data pointer remains unset (NULL). The destroy path is designed to safely handle a NULL mode_data pointer, preventing the issue.


How can this vulnerability impact me? :

This vulnerability can lead to use-after-free conditions or memory corruption within the Linux kernel's networking subsystem. Such issues may cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or escalate privileges if they can trigger the faulty clone operation.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability is resolved by ensuring that the cloned IPTFS state is kept private until all allocations succeed, preventing mode_data from pointing to freed memory.

To mitigate this vulnerability immediately, update your Linux kernel to a version that includes the fix for this issue.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart