Files
vuln-cve/data/2021/47xxx/CVE-2021-47394.json
T

194 lines
9.9 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-2021-47394",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2024-05-21T14:58:30.814Z",
"datePublished": "2024-05-21T15:03:51.503Z",
"dateUpdated": "2026-08-05T08:47:37.812Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T08:47:37.812Z"
},
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_tables: unlink table before deleting it\n\nsyzbot reports following UAF:\nBUG: KASAN: use-after-free in memcmp+0x18f/0x1c0 lib/string.c:955\n nla_strcmp+0xf2/0x130 lib/nlattr.c:836\n nft_table_lookup.part.0+0x1a2/0x460 net/netfilter/nf_tables_api.c:570\n nft_table_lookup net/netfilter/nf_tables_api.c:4064 [inline]\n nf_tables_getset+0x1b3/0x860 net/netfilter/nf_tables_api.c:4064\n nfnetlink_rcv_msg+0x659/0x13f0 net/netfilter/nfnetlink.c:285\n netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504\n\nProblem is that all get operations are lockless, so the commit_mutex\nheld by nft_rcv_nl_event() isn't enough to stop a parallel GET request\nfrom doing read-accesses to the table object even after synchronize_rcu().\n\nTo avoid this, unlink the table first and store the table objects in\non-stack scratch space."
}
],
"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 - The bug is reached only through the local nfnetlink/nftables control plane (NETLINK_NETFILTER create of an owned table, lockless GET*, and socket close triggering NETLINK_URELEASE→nft_rcv_nl_event), not via remote packet processing.\nAC:L - The attacker controls both sides of the race—creating an NFT_TABLE_F_OWNER table, spamming parallel RCU GET lookups from another netlink socket, and closing the owner socket—so the post-synchronize_rcu free-while-still-linked window is reliably hittable.\nPR:L - nfnetlink_rcv() requires CAP_NET_ADMIN via netlink_net_capable() against the network namespace’s user_ns, which an unprivileged user obtains with unshare -Urn; nftables is fully usable per-netns.\nUI:N - Exploitation needs no victim action; the attacker creates the owned table, drives concurrent GET requests, and closes their own netlink socket to trigger the UAF.\nS:U - Impact is confined to the local kernel privilege boundary (heap UAF / local privilege escalation) with no VM, IOMMU, or cross-authority escape.\nC:H - The race frees the still-linked nft_table (and its name/contents) while lockless nft_table_lookup reads it via nla_strcmp; this classic UAF enables heap spray and arbitrary kernel read primitives.\nI:H - __nft_release_table destroys the table and nested objects while concurrent GET paths can still observe and follow those pointers, yielding reclaimable UAF/write primitives suitable for control-flow hijacking.\nA:H - Use-after-free of the table during GET lookup causes kernel oops/panic (as shown by the KASAN report in memcmp/nla_strcmp), and the attacker can trigger it repeatedly."
}
]
}
],
"affected": [
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "unaffected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"net/netfilter/nf_tables_api.c"
],
"versions": [
{
"version": "6001a930ce0378b62210d4f83583fc88a903d89d",
"lessThan": "f65c73d3aabb87d4353e0bc4a718b5ae8c43fd04",
"status": "affected",
"versionType": "git"
},
{
"version": "6001a930ce0378b62210d4f83583fc88a903d89d",
"lessThan": "a499b03bf36b0c2e3b958a381d828678ab0ffc5e",
"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/netfilter/nf_tables_api.c"
],
"versions": [
{
"version": "5.12",
"status": "affected"
},
{
"version": "0",
"lessThan": "5.12",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "5.14.10",
"lessThanOrEqual": "5.14.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "5.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": "5.12",
"versionEndExcluding": "5.14.10"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.12",
"versionEndExcluding": "5.15"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/f65c73d3aabb87d4353e0bc4a718b5ae8c43fd04"
},
{
"url": "https://git.kernel.org/stable/c/a499b03bf36b0c2e3b958a381d828678ab0ffc5e"
}
],
"title": "netfilter: nf_tables: unlink table before deleting it",
"x_generator": {
"engine": "bippy-1.2.0"
}
},
"adp": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2021-47394",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-05-28T18:27:57.258962Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2024-06-04T17:13:40.569Z"
}
},
{
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-04T05:39:59.375Z"
},
"title": "CVE Program Container",
"references": [
{
"url": "https://git.kernel.org/stable/c/f65c73d3aabb87d4353e0bc4a718b5ae8c43fd04",
"tags": [
"x_transferred"
]
},
{
"url": "https://git.kernel.org/stable/c/a499b03bf36b0c2e3b958a381d828678ab0ffc5e",
"tags": [
"x_transferred"
]
}
]
}
]
}
}