{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-22057",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-12-29T08:45:45.812Z",
        "datePublished": "2025-04-16T14:12:14.234Z",
        "dateUpdated": "2026-08-05T11:56:25.007Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:56:25.007Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: decrease cached dst counters in dst_release\n\nUpstream fix ac888d58869b (\"net: do not delay dst_entries_add() in\ndst_release()\") moved decrementing the dst count from dst_destroy to\ndst_release to avoid accessing already freed data in case of netns\ndismantle. However in case CONFIG_DST_CACHE is enabled and OvS+tunnels\nare used, this fix is incomplete as the same issue will be seen for\ncached dsts:\n\n  Unable to handle kernel paging request at virtual address ffff5aabf6b5c000\n  Call trace:\n   percpu_counter_add_batch+0x3c/0x160 (P)\n   dst_release+0xec/0x108\n   dst_cache_destroy+0x68/0xd8\n   dst_destroy+0x13c/0x168\n   dst_destroy_rcu+0x1c/0xb0\n   rcu_do_batch+0x18c/0x7d0\n   rcu_core+0x174/0x378\n   rcu_core_si+0x18/0x30\n\nFix this by invalidating the cache, and thus decrementing cached dst\ncounters, in dst_release too."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - Triggering requires local configuration of a metadata tunnel (tc `action tunnel_key set`, nft tunnel object, or OVS set_tunnel) via netlink plus a network-namespace dismantle; received packets alone cannot populate the dst_cache since RX-allocated tun_dsts have no cache initialized.\nAC:L - The attacker controls both sides — they configure the cached tunnel dst and they trigger the netns teardown that frees the percpu counter — and `cleanup_net()` performs no rcu_barrier() between device-op exit (which queues dst_destroy_rcu) and ip6_route_net_exit(), so the window is wide and the whole sequence can be repeated in a loop until it lands.\nPR:L - tc actions, nftables tunnel objects, tunnel device creation and netns teardown are all gated by `netlink_net_capable(skb, CAP_NET_ADMIN)`, which checks against `sock_net(sk)->user_ns`, so an unprivileged local user obtains everything needed via `unshare -Urn`.\nUI:N - The attacker performs the entire sequence — namespace creation, tunnel/action setup, traffic generation, and namespace destruction — with no action by any other user.\nS:U - The use-after-free corrupts kernel memory within the same kernel security authority; no VM, IOMMU, or hypervisor boundary is crossed.\nC:H - `percpu_counter_add_batch()` reads freed percpu memory through the dangling `fbc->counters` pointer and folds that value into a kernel counter; per use-after-free scoring this yields potential disclosure of reclaimed kernel heap contents.\nI:H - The stale `this_cpu_write()` performs a use-after-free write into a freed percpu chunk that other percpu allocations can reclaim, corrupting unrelated kernel state (e.g. counters/refcounts) in an attacker-groomable way.\nA:H - The reported failure is a fatal kernel paging fault in `percpu_counter_add_batch()` from an RCU softirq callback, which panics or oopses the machine in unrecoverable context."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "net/core/dst.c"
                    ],
                    "versions": [
                        {
                            "version": "d71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8",
                            "lessThan": "ccc331fd5bcae131d2627d5ef099d4a1f6540aea",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8",
                            "lessThan": "92a5c18513117be69bc00419dd1724c1940f8fcd",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8",
                            "lessThan": "836415a8405c9665ae55352fc5ba865c242f5e4f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8",
                            "lessThan": "e833e7ad64eb2f63867f65303be49ca30ee8819e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8",
                            "lessThan": "3a0a3ff6593d670af2451ec363ccb7b18aec0c0a",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "net/core/dst.c"
                    ],
                    "versions": [
                        {
                            "version": "4.6",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.6",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.87",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.23",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.11",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14.2",
                            "lessThanOrEqual": "6.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.6",
                                    "versionEndExcluding": "6.6.87"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.6",
                                    "versionEndExcluding": "6.12.23"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.6",
                                    "versionEndExcluding": "6.13.11"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.6",
                                    "versionEndExcluding": "6.14.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.6",
                                    "versionEndExcluding": "6.15"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/ccc331fd5bcae131d2627d5ef099d4a1f6540aea"
                },
                {
                    "url": "https://git.kernel.org/stable/c/92a5c18513117be69bc00419dd1724c1940f8fcd"
                },
                {
                    "url": "https://git.kernel.org/stable/c/836415a8405c9665ae55352fc5ba865c242f5e4f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e833e7ad64eb2f63867f65303be49ca30ee8819e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3a0a3ff6593d670af2451ec363ccb7b18aec0c0a"
                }
            ],
            "title": "net: decrease cached dst counters in dst_release",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}