CVE-2022-50780 (GCVE-0-2022-50780)
Vulnerability from cvelistv5
Published
2025-12-24 13:06
Modified
2025-12-24 13:06
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed
When the ops_init() interface is invoked to initialize the net, but
ops->init() fails, data is released. However, the ptr pointer in
net->gen is invalid. In this case, when nfqnl_nf_hook_drop() is invoked
to release the net, invalid address access occurs.
The process is as follows:
setup_net()
ops_init()
data = kzalloc(...) ---> alloc "data"
net_assign_generic() ---> assign "date" to ptr in net->gen
...
ops->init() ---> failed
...
kfree(data); ---> ptr in net->gen is invalid
...
ops_exit_list()
...
nfqnl_nf_hook_drop()
*q = nfnl_queue_pernet(net) ---> q is invalid
The following is the Call Trace information:
BUG: KASAN: use-after-free in nfqnl_nf_hook_drop+0x264/0x280
Read of size 8 at addr ffff88810396b240 by task ip/15855
Call Trace:
<TASK>
dump_stack_lvl+0x8e/0xd1
print_report+0x155/0x454
kasan_report+0xba/0x1f0
nfqnl_nf_hook_drop+0x264/0x280
nf_queue_nf_hook_drop+0x8b/0x1b0
__nf_unregister_net_hook+0x1ae/0x5a0
nf_unregister_net_hooks+0xde/0x130
ops_exit_list+0xb0/0x170
setup_net+0x7ac/0xbd0
copy_net_ns+0x2e6/0x6b0
create_new_namespaces+0x382/0xa50
unshare_nsproxy_namespaces+0xa6/0x1c0
ksys_unshare+0x3a4/0x7e0
__x64_sys_unshare+0x2d/0x40
do_syscall_64+0x35/0x80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
</TASK>
Allocated by task 15855:
kasan_save_stack+0x1e/0x40
kasan_set_track+0x21/0x30
__kasan_kmalloc+0xa1/0xb0
__kmalloc+0x49/0xb0
ops_init+0xe7/0x410
setup_net+0x5aa/0xbd0
copy_net_ns+0x2e6/0x6b0
create_new_namespaces+0x382/0xa50
unshare_nsproxy_namespaces+0xa6/0x1c0
ksys_unshare+0x3a4/0x7e0
__x64_sys_unshare+0x2d/0x40
do_syscall_64+0x35/0x80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
Freed by task 15855:
kasan_save_stack+0x1e/0x40
kasan_set_track+0x21/0x30
kasan_save_free_info+0x2a/0x40
____kasan_slab_free+0x155/0x1b0
slab_free_freelist_hook+0x11b/0x220
__kmem_cache_free+0xa4/0x360
ops_init+0xb9/0x410
setup_net+0x5aa/0xbd0
copy_net_ns+0x2e6/0x6b0
create_new_namespaces+0x382/0xa50
unshare_nsproxy_namespaces+0xa6/0x1c0
ksys_unshare+0x3a4/0x7e0
__x64_sys_unshare+0x2d/0x40
do_syscall_64+0x35/0x80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
References
Impacted products
| Vendor | Product | Version | ||
|---|---|---|---|---|
| Linux | Linux |
Version: f875bae065334907796da12523f9df85c89f5712 Version: f875bae065334907796da12523f9df85c89f5712 Version: f875bae065334907796da12523f9df85c89f5712 Version: f875bae065334907796da12523f9df85c89f5712 Version: f875bae065334907796da12523f9df85c89f5712 Version: f875bae065334907796da12523f9df85c89f5712 |
||
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"net/core/net_namespace.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "5a2ea549be94924364f6911227d99be86e8cf34a",
"status": "affected",
"version": "f875bae065334907796da12523f9df85c89f5712",
"versionType": "git"
},
{
"lessThan": "97ad240fd9aa9214497d14af2b91608e20856cac",
"status": "affected",
"version": "f875bae065334907796da12523f9df85c89f5712",
"versionType": "git"
},
{
"lessThan": "c3edc6e808209aa705185f732e682a370981ced1",
"status": "affected",
"version": "f875bae065334907796da12523f9df85c89f5712",
"versionType": "git"
},
{
"lessThan": "a1e18acb0246bfb001b08b8b1b830b5ec92a0f13",
"status": "affected",
"version": "f875bae065334907796da12523f9df85c89f5712",
"versionType": "git"
},
{
"lessThan": "4a4df5e78712de39d6f90d6a64b5eb48dca03bd5",
"status": "affected",
"version": "f875bae065334907796da12523f9df85c89f5712",
"versionType": "git"
},
{
"lessThan": "d266935ac43d57586e311a087510fe6a084af742",
"status": "affected",
"version": "f875bae065334907796da12523f9df85c89f5712",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"net/core/net_namespace.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "2.6.33"
},
{
"lessThan": "2.6.33",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.19.*",
"status": "unaffected",
"version": "4.19.264",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.4.*",
"status": "unaffected",
"version": "5.4.223",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.10.*",
"status": "unaffected",
"version": "5.10.153",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.15.*",
"status": "unaffected",
"version": "5.15.77",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.0.*",
"status": "unaffected",
"version": "6.0.7",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.1",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.19.264",
"versionStartIncluding": "2.6.33",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.4.223",
"versionStartIncluding": "2.6.33",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.10.153",
"versionStartIncluding": "2.6.33",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.15.77",
"versionStartIncluding": "2.6.33",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.0.7",
"versionStartIncluding": "2.6.33",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.1",
"versionStartIncluding": "2.6.33",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed\n\nWhen the ops_init() interface is invoked to initialize the net, but\nops-\u003einit() fails, data is released. However, the ptr pointer in\nnet-\u003egen is invalid. In this case, when nfqnl_nf_hook_drop() is invoked\nto release the net, invalid address access occurs.\n\nThe process is as follows:\nsetup_net()\n\tops_init()\n\t\tdata = kzalloc(...) ---\u003e alloc \"data\"\n\t\tnet_assign_generic() ---\u003e assign \"date\" to ptr in net-\u003egen\n\t\t...\n\t\tops-\u003einit() ---\u003e failed\n\t\t...\n\t\tkfree(data); ---\u003e ptr in net-\u003egen is invalid\n\t...\n\tops_exit_list()\n\t\t...\n\t\tnfqnl_nf_hook_drop()\n\t\t\t*q = nfnl_queue_pernet(net) ---\u003e q is invalid\n\nThe following is the Call Trace information:\nBUG: KASAN: use-after-free in nfqnl_nf_hook_drop+0x264/0x280\nRead of size 8 at addr ffff88810396b240 by task ip/15855\nCall Trace:\n\u003cTASK\u003e\ndump_stack_lvl+0x8e/0xd1\nprint_report+0x155/0x454\nkasan_report+0xba/0x1f0\nnfqnl_nf_hook_drop+0x264/0x280\nnf_queue_nf_hook_drop+0x8b/0x1b0\n__nf_unregister_net_hook+0x1ae/0x5a0\nnf_unregister_net_hooks+0xde/0x130\nops_exit_list+0xb0/0x170\nsetup_net+0x7ac/0xbd0\ncopy_net_ns+0x2e6/0x6b0\ncreate_new_namespaces+0x382/0xa50\nunshare_nsproxy_namespaces+0xa6/0x1c0\nksys_unshare+0x3a4/0x7e0\n__x64_sys_unshare+0x2d/0x40\ndo_syscall_64+0x35/0x80\nentry_SYSCALL_64_after_hwframe+0x46/0xb0\n\u003c/TASK\u003e\n\nAllocated by task 15855:\nkasan_save_stack+0x1e/0x40\nkasan_set_track+0x21/0x30\n__kasan_kmalloc+0xa1/0xb0\n__kmalloc+0x49/0xb0\nops_init+0xe7/0x410\nsetup_net+0x5aa/0xbd0\ncopy_net_ns+0x2e6/0x6b0\ncreate_new_namespaces+0x382/0xa50\nunshare_nsproxy_namespaces+0xa6/0x1c0\nksys_unshare+0x3a4/0x7e0\n__x64_sys_unshare+0x2d/0x40\ndo_syscall_64+0x35/0x80\nentry_SYSCALL_64_after_hwframe+0x46/0xb0\n\nFreed by task 15855:\nkasan_save_stack+0x1e/0x40\nkasan_set_track+0x21/0x30\nkasan_save_free_info+0x2a/0x40\n____kasan_slab_free+0x155/0x1b0\nslab_free_freelist_hook+0x11b/0x220\n__kmem_cache_free+0xa4/0x360\nops_init+0xb9/0x410\nsetup_net+0x5aa/0xbd0\ncopy_net_ns+0x2e6/0x6b0\ncreate_new_namespaces+0x382/0xa50\nunshare_nsproxy_namespaces+0xa6/0x1c0\nksys_unshare+0x3a4/0x7e0\n__x64_sys_unshare+0x2d/0x40\ndo_syscall_64+0x35/0x80\nentry_SYSCALL_64_after_hwframe+0x46/0xb0"
}
],
"providerMetadata": {
"dateUpdated": "2025-12-24T13:06:08.552Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/5a2ea549be94924364f6911227d99be86e8cf34a"
},
{
"url": "https://git.kernel.org/stable/c/97ad240fd9aa9214497d14af2b91608e20856cac"
},
{
"url": "https://git.kernel.org/stable/c/c3edc6e808209aa705185f732e682a370981ced1"
},
{
"url": "https://git.kernel.org/stable/c/a1e18acb0246bfb001b08b8b1b830b5ec92a0f13"
},
{
"url": "https://git.kernel.org/stable/c/4a4df5e78712de39d6f90d6a64b5eb48dca03bd5"
},
{
"url": "https://git.kernel.org/stable/c/d266935ac43d57586e311a087510fe6a084af742"
}
],
"title": "net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2022-50780",
"datePublished": "2025-12-24T13:06:08.552Z",
"dateReserved": "2025-12-24T13:02:21.548Z",
"dateUpdated": "2025-12-24T13:06:08.552Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"nvd": "{\"cve\":{\"id\":\"CVE-2022-50780\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-24T13:16:04.843\",\"lastModified\":\"2025-12-24T13:16:04.843\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed\\n\\nWhen the ops_init() interface is invoked to initialize the net, but\\nops-\u003einit() fails, data is released. However, the ptr pointer in\\nnet-\u003egen is invalid. In this case, when nfqnl_nf_hook_drop() is invoked\\nto release the net, invalid address access occurs.\\n\\nThe process is as follows:\\nsetup_net()\\n\\tops_init()\\n\\t\\tdata = kzalloc(...) ---\u003e alloc \\\"data\\\"\\n\\t\\tnet_assign_generic() ---\u003e assign \\\"date\\\" to ptr in net-\u003egen\\n\\t\\t...\\n\\t\\tops-\u003einit() ---\u003e failed\\n\\t\\t...\\n\\t\\tkfree(data); ---\u003e ptr in net-\u003egen is invalid\\n\\t...\\n\\tops_exit_list()\\n\\t\\t...\\n\\t\\tnfqnl_nf_hook_drop()\\n\\t\\t\\t*q = nfnl_queue_pernet(net) ---\u003e q is invalid\\n\\nThe following is the Call Trace information:\\nBUG: KASAN: use-after-free in nfqnl_nf_hook_drop+0x264/0x280\\nRead of size 8 at addr ffff88810396b240 by task ip/15855\\nCall Trace:\\n\u003cTASK\u003e\\ndump_stack_lvl+0x8e/0xd1\\nprint_report+0x155/0x454\\nkasan_report+0xba/0x1f0\\nnfqnl_nf_hook_drop+0x264/0x280\\nnf_queue_nf_hook_drop+0x8b/0x1b0\\n__nf_unregister_net_hook+0x1ae/0x5a0\\nnf_unregister_net_hooks+0xde/0x130\\nops_exit_list+0xb0/0x170\\nsetup_net+0x7ac/0xbd0\\ncopy_net_ns+0x2e6/0x6b0\\ncreate_new_namespaces+0x382/0xa50\\nunshare_nsproxy_namespaces+0xa6/0x1c0\\nksys_unshare+0x3a4/0x7e0\\n__x64_sys_unshare+0x2d/0x40\\ndo_syscall_64+0x35/0x80\\nentry_SYSCALL_64_after_hwframe+0x46/0xb0\\n\u003c/TASK\u003e\\n\\nAllocated by task 15855:\\nkasan_save_stack+0x1e/0x40\\nkasan_set_track+0x21/0x30\\n__kasan_kmalloc+0xa1/0xb0\\n__kmalloc+0x49/0xb0\\nops_init+0xe7/0x410\\nsetup_net+0x5aa/0xbd0\\ncopy_net_ns+0x2e6/0x6b0\\ncreate_new_namespaces+0x382/0xa50\\nunshare_nsproxy_namespaces+0xa6/0x1c0\\nksys_unshare+0x3a4/0x7e0\\n__x64_sys_unshare+0x2d/0x40\\ndo_syscall_64+0x35/0x80\\nentry_SYSCALL_64_after_hwframe+0x46/0xb0\\n\\nFreed by task 15855:\\nkasan_save_stack+0x1e/0x40\\nkasan_set_track+0x21/0x30\\nkasan_save_free_info+0x2a/0x40\\n____kasan_slab_free+0x155/0x1b0\\nslab_free_freelist_hook+0x11b/0x220\\n__kmem_cache_free+0xa4/0x360\\nops_init+0xb9/0x410\\nsetup_net+0x5aa/0xbd0\\ncopy_net_ns+0x2e6/0x6b0\\ncreate_new_namespaces+0x382/0xa50\\nunshare_nsproxy_namespaces+0xa6/0x1c0\\nksys_unshare+0x3a4/0x7e0\\n__x64_sys_unshare+0x2d/0x40\\ndo_syscall_64+0x35/0x80\\nentry_SYSCALL_64_after_hwframe+0x46/0xb0\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/4a4df5e78712de39d6f90d6a64b5eb48dca03bd5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5a2ea549be94924364f6911227d99be86e8cf34a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/97ad240fd9aa9214497d14af2b91608e20856cac\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a1e18acb0246bfb001b08b8b1b830b5ec92a0f13\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c3edc6e808209aa705185f732e682a370981ced1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d266935ac43d57586e311a087510fe6a084af742\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…