Files
vuln-cve/data/2025/21xxx/CVE-2025-21958.json
T

161 lines
9.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2025-21958",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2024-12-29T08:45:45.791Z",
"datePublished": "2025-04-01T15:46:57.268Z",
"dateUpdated": "2026-08-05T11:55:36.868Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T11:55:36.868Z"
},
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"openvswitch: switch to per-action label counting in conntrack\"\n\nCurrently, ovs_ct_set_labels() is only called for confirmed conntrack\nentries (ct) within ovs_ct_commit(). However, if the conntrack entry\ndoes not have the labels_ext extension, attempting to allocate it in\novs_ct_get_conn_labels() for a confirmed entry triggers a warning in\nnf_ct_ext_add():\n\n WARN_ON(nf_ct_is_confirmed(ct));\n\nThis happens when the conntrack entry is created externally before OVS\nincrements net->ct.labels_used. The issue has become more likely since\ncommit fcb1aa5163b1 (\"openvswitch: switch to per-action label counting\nin conntrack\"), which changed to use per-action label counting and\nincrement net->ct.labels_used when a flow with ct action is added.\n\nSince there’s no straightforward way to fully resolve this issue at the\nmoment, this reverts the commit to avoid breaking existing use cases."
}
],
"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 installing an OVS datapath flow carrying a ct action with a non-zero label mask via the openvswitch generic-netlink interface, which is a local operation. Although the packet that fires the bug can arrive from the wire on an OVS/OVN host, the necessary local netlink configuration step makes Local the defensible vector.\nAC:L - The attacker fully controls the ordering that creates the bug — create the conntrack entry while net->ct.labels_used is zero, then install the ct-label flow, then re-send a packet of that connection — and equally controls the concurrent traffic that turns the krealloc of a hash-visible ct->ext into a use-after-free. No condition lies outside attacker influence.\nPR:L - All OVS datapath/flow/vport netlink commands use GENL_UNS_ADMIN_PERM, i.e. CAP_NET_ADMIN in the netns owner user namespace, which any unprivileged user obtains with unshare -Urn; nftables in the same namespace supplies the externally created conntrack entry.\nUI:N - The attacker performs every step — namespace setup, flow installation and packet injection — with no action from any other user.\nS:U - The corruption is confined to kernel heap objects belonging to the same kernel security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - nf_ct_ext_add() reallocates ct->ext on a confirmed, hash-table-visible conntrack with no RCU grace period, so lock-free readers such as nf_conn_acct_find(), nfct_nat(), nf_ct_ecache_find() and nf_ct_labels_find() dereference freed memory, giving a use-after-free read that can be groomed to disclose arbitrary kernel heap contents.\nI:H - The same window is a use-after-free write — nf_ct_acct_update() performs atomic64_add() into the freed extension block, and nf_ct_ext_add() itself writes offsets and memsets into a buffer another CPU may already have reallocated — yielding heap corruption exploitable for control-flow hijack.\nA:H - The WARN_ON(nf_ct_is_confirmed(ct)) splat is an immediate kernel warning that panics the machine under panic_on_warn, and the underlying use-after-free readily causes oopses and slab corruption crashes."
}
]
}
],
"affected": [
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "unaffected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"net/openvswitch/conntrack.c",
"net/openvswitch/datapath.h"
],
"versions": [
{
"version": "fcb1aa5163b1ae4cf2864b688b08927aac51f51e",
"lessThan": "9e79fdabd52cfce1a021640a81256878a2c516a2",
"status": "affected",
"versionType": "git"
},
{
"version": "fcb1aa5163b1ae4cf2864b688b08927aac51f51e",
"lessThan": "d91bfc64a4886102746e74d2c6f3a61e9a77fd7d",
"status": "affected",
"versionType": "git"
},
{
"version": "fcb1aa5163b1ae4cf2864b688b08927aac51f51e",
"lessThan": "1063ae07383c0ddc5bcce170260c143825846b03",
"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/openvswitch/conntrack.c",
"net/openvswitch/datapath.h"
],
"versions": [
{
"version": "6.12",
"status": "affected"
},
{
"version": "0",
"lessThan": "6.12",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.12.20",
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.13.8",
"lessThanOrEqual": "6.13.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.14",
"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": "6.12",
"versionEndExcluding": "6.12.20"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.12",
"versionEndExcluding": "6.13.8"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.12",
"versionEndExcluding": "6.14"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/9e79fdabd52cfce1a021640a81256878a2c516a2"
},
{
"url": "https://git.kernel.org/stable/c/d91bfc64a4886102746e74d2c6f3a61e9a77fd7d"
},
{
"url": "https://git.kernel.org/stable/c/1063ae07383c0ddc5bcce170260c143825846b03"
}
],
"title": "Revert \"openvswitch: switch to per-action label counting in conntrack\"",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
}
}