xfrm: iptfs: only publish mode_data after clone setup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.216.19.117.0In 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.
From the CVE record · Linux
The Linux kernel's XFRM IPTFS clone path can leave a pointer to freed state when reorder-window allocation fails. Subsequent clone cleanup can free that state again. The input does not establish whether an attacker can trigger this path or what access would be required.
Engineers running Linux kernels with XFRM IPTFS should check their versions against the vendor advisory; affected versions are not specified.