CVE-2022-50780 json
net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed
published 2025-12-24 10 mo ago modified 2026-10-15 24 d ago also EUVD-2022-55781
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 5%
- public exploits
- 0
- none known
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
Patch / fix
- Linux Linux 4.19.264, 5.4.223, 5.10.153, 5.15.77, 6.0.7, 6.1
- linux Debian 14, Debian 13, Debian 12 6.0.7-1
debian advisories DEBIAN-CVE-2022-50780
- linux Ubuntu 18.04 LTS 4.15.0-204.215
- linux Ubuntu 20.04 LTS 5.4.0-139.156
- linux Ubuntu 22.04 LTS 5.15.0-60.66
- linux-aws Ubuntu 18.04 LTS 4.15.0-1150.163
- linux-aws Ubuntu 20.04 LTS 5.4.0-1096.104
- linux-aws Ubuntu 22.04 LTS 5.15.0-1030.34
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1100.109
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1029.36
ubuntu advisories UBUNTU-CVE-2022-50780
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 9 5.14.0-427.13.1.el9_4
- rv RHEL 9 5.14.0-427.13.1.el9_4
- perf RHEL 9 5.14.0-427.13.1.el9_4
- rtla RHEL 9 5.14.0-427.13.1.el9_4
- bpftool RHEL 9 7.3.0-427.13.1.el9_4
- libperf RHEL 9 5.14.0-427.13.1.el9_4
- kernel-rt RHEL 9 5.14.0-427.13.1.el9_4
- kernel-64k RHEL 9 5.14.0-427.13.1.el9_4
red hat advisories RHSA-2024:2394
- kernel-syms SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 4.12.14-122.293.1
- kernel-source SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 4.12.14-122.293.1
- kernel-default SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS, SLE Live Patching 12 SP5 4.12.14-122.293.1
- kgraft-patch-SLE12-SP5_Update_77 SLE Live Patching 12 SP5 1-8.3.1
suse advisories SUSE-SU-2026:0473-1
- git.kernel.org/stable/c/5a2ea549be94924364f6911227d99be86e8cf34a commit
- git.kernel.org/stable/c/97ad240fd9aa9214497d14af2b91608e20856cac commit
- git.kernel.org/stable/c/c3edc6e808209aa705185f732e682a370981ced1 commit
- git.kernel.org/stable/c/a1e18acb0246bfb001b08b8b1b830b5ec92a0f13 commit
- git.kernel.org/stable/c/4a4df5e78712de39d6f90d6a64b5eb48dca03bd5 commit
- git.kernel.org/stable/c/d266935ac43d57586e311a087510fe6a084af742 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-50780 updated cvss 5.5
kernel: net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 moreaffected: no fix available “Fix deferred”
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-427.13.1.el9_4, perf 5.14.0-427.13.1.el9_4, rtla 5.14.0-427.13.1.el9_4, kernel-devel-matched 5.14.0-427.13.1.el9_4, kernel-64k-devel-matched 5.14.0-427.13.1.el9_4, kernel-debug-devel-matched 5.14.0-427.13.1.el9_4, +6 more Red Hat Enterprise Linux BaseOS (v. 9) bpftool 7.3.0-427.13.1.el9_4, kernel 5.14.0-427.13.1.el9_4, kernel-64k 5.14.0-427.13.1.el9_4, kernel-core 5.14.0-427.13.1.el9_4, kernel-tools 5.14.0-427.13.1.el9_4, python3-perf 5.14.0-427.13.1.el9_4, +28 more Red Hat Enterprise Linux CRB (v. 9) libperf 5.14.0-427.13.1.el9_4, kernel-debuginfo-common-s390x 5.14.0-427.13.1.el9_4, kernel-debuginfo-common-x86_64 5.14.0-427.13.1.el9_4, kernel-debuginfo-common-aarch64 5.14.0-427.13.1.el9_4, kernel-debuginfo-common-ppc64le 5.14.0-427.13.1.el9_4 Red Hat Enterprise Linux NFV (v. 9) kernel-rt 5.14.0-427.13.1.el9_4, kernel-rt-kvm 5.14.0-427.13.1.el9_4, kernel-rt-core 5.14.0-427.13.1.el9_4, kernel-rt-modules 5.14.0-427.13.1.el9_4, kernel-rt-debug-kvm 5.14.0-427.13.1.el9_4, kernel-rt-debug-core 5.14.0-427.13.1.el9_4, +6 more Red Hat Enterprise Linux RT (v. 9) kernel-rt 5.14.0-427.13.1.el9_4, kernel-rt-core 5.14.0-427.13.1.el9_4, kernel-rt-modules 5.14.0-427.13.1.el9_4, kernel-rt-debug-core 5.14.0-427.13.1.el9_4, kernel-rt-modules-core 5.14.0-427.13.1.el9_4, kernel-rt-debug-modules 5.14.0-427.13.1.el9_4, +4 morefixed: vendor fix RHSA-2024:2394
-
Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 24 d ago
Exploit prediction
0.16% chance of exploitation in the next 30 days, higher than 5% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
- git.kernel.org /stable/c/5a2ea549be94924364f6911227d99be86e8cf34a
- git.kernel.org /stable/c/97ad240fd9aa9214497d14af2b91608e20856cac
- git.kernel.org /stable/c/c3edc6e808209aa705185f732e682a370981ced1
- git.kernel.org /stable/c/a1e18acb0246bfb001b08b8b1b830b5ec92a0f13
- git.kernel.org /stable/c/4a4df5e78712de39d6f90d6a64b5eb48dca03bd5
- git.kernel.org /stable/c/d266935ac43d57586e311a087510fe6a084af742
Sources
- CVE List CVE-2022-50780
- NVD CVE-2022-50780
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.