xfrm: iptfs: only publish mode_data after clone setup
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.18.21, 6.19.11
- CVEs
- CVE-2026-31471
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 15:24 UTC · Revision 1
Source evidence
xfrm: iptfs: only publish mode_data after clone setup
core-osv · Original sourcePublished 22 Apr 2026, 13:53 UTC
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.
osv:CVE-2026-31471
Kernel
Fixed versions: 6.18.21, 6.19.11
Complete source record
{
"id": "58b219baeda36665682b0f948a9f13c69f6f91d0f0075cf74edb90a09181427b",
"url": "https://osv.dev/vulnerability/CVE-2026-31471",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "xfrm: iptfs: only publish mode_data after clone setup",
"summary": "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.",
"evidence": "osv:CVE-2026-31471",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.18.21",
"evidence": "/affected/1/ranges"
},
{
"value": "6.19.11",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2026-31471",
"aliases": [
"CVE-2026-31471"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6be02e3e4f376fea468846c8562655ca5ee18204"
},
{
"fixed": "371a43c4ac70cac0de9f9b1fc5b1660b9565b9f1"
},
{
"fixed": "5784a1e2889c9525a8f036cb586930e232170bf7"
},
{
"fixed": "d849a2f7309fc0616e79d13b008b0a47e0458b6e"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31471.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.14.0"
},
{
"fixed": "6.18.21"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "6.19.11"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31471.json"
}
}
],
"modified": "2026-10-28T02:30:36.795453310Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/371a43c4ac70cac0de9f9b1fc5b1660b9565b9f1",
"https://git.kernel.org/stable/c/5784a1e2889c9525a8f036cb586930e232170bf7",
"https://git.kernel.org/stable/c/d849a2f7309fc0616e79d13b008b0a47e0458b6e",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31471.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-31471",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31471.json"
}
},
"related_cves": [
{
"value": "CVE-2026-31471",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504101,
"published_at": "2026-04-22T13:53:59.595+00:00"
}