# CVE-2022-50780: net: fix UAF issue in nfqnl\_nf\_hook\_drop() when ops\_init() failed

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **Published:** 2025-12-24T13:06:08.552Z
- **Modified:** 2026-10-15T22:17:34.070Z

## Who should check

- Anyone running Linux \>= f875bae065334907796da12523f9df85c89f5712, \< 5a2ea549be94924364f6911227d99be86e8cf34a; \>= f875bae065334907796da12523f9df85c89f5712, \< 97ad240fd9aa9214497d14af2b91608e20856cac; \>= f875bae065334907796da12523f9df85c89f5712, \< c3edc6e808209aa705185f732e682a370981ced1; \>= f875bae065334907796da12523f9df85c89f5712, \< a1e18acb0246bfb001b08b8b1b830b5ec92a0f13; \>= f875bae065334907796da12523f9df85c89f5712, \< 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5; \>= f875bae065334907796da12523f9df85c89f5712, \< d266935ac43d57586e311a087510fe6a084af742
- Anyone running Linux 2.6.33

## Description

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

## Affected and fixed versions

- Linux: \>= f875bae065334907796da12523f9df85c89f5712, \< 5a2ea549be94924364f6911227d99be86e8cf34a; \>= f875bae065334907796da12523f9df85c89f5712, \< 97ad240fd9aa9214497d14af2b91608e20856cac; \>= f875bae065334907796da12523f9df85c89f5712, \< c3edc6e808209aa705185f732e682a370981ced1; \>= f875bae065334907796da12523f9df85c89f5712, \< a1e18acb0246bfb001b08b8b1b830b5ec92a0f13; \>= f875bae065334907796da12523f9df85c89f5712, \< 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5; \>= f875bae065334907796da12523f9df85c89f5712, \< d266935ac43d57586e311a087510fe6a084af742 (cvelist)
- Linux: 2.6.33 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50780. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50780.md
Affected: Linux >= f875bae065334907796da12523f9df85c89f5712, < 5a2ea549be94924364f6911227d99be86e8cf34a; >= f875bae065334907796da12523f9df85c89f5712, < 97ad240fd9aa9214497d14af2b91608e20856cac; >= f875bae065334907796da12523f9df85c89f5712, < c3edc6e808209aa705185f732e682a370981ced1; >= f875bae065334907796da12…
Fixed in: Linux 5a2ea549be94924364f6911227d99be86e8cf34a, Linux 97ad240fd9aa9214497d14af2b91608e20856cac, Linux 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50780 being exploited?

There is no confirmed exploitation: CVE-2022-50780 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50780?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50780?

Linux \>= f875bae065334907796da12523f9df85c89f5712, \< 5a2ea549be94924364f6911227d99be86e8cf34a; \>= f875bae065334907796da12523f9df85c89f5712, \< 97ad240fd9aa9214497d14af2b91608e20856cac; \>= f875bae065334907796da12523f9df85c89f5712, \< c3edc6e808209aa705185f732e682a370981ced1; \>= f875bae065334907796da12523f9df85c89f5712, \< a1e18acb0246bfb001b08b8b1b830b5ec92a0f13; \>= f875bae065334907796da12523f9df85c89f5712, \< 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5; \>= f875bae065334907796da12523f9df85c89f5712, \< d266935ac43d57586e311a087510fe6a084af742; Linux 2.6.33.

### Is there a fix for CVE-2022-50780?

Yes. Fixed in Linux 5a2ea549be94924364f6911227d99be86e8cf34a, Linux 97ad240fd9aa9214497d14af2b91608e20856cac, Linux 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50780?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/5a2ea549be94924364f6911227d99be86e8cf34a>
- other: <https://git.kernel.org/stable/c/97ad240fd9aa9214497d14af2b91608e20856cac>
- other: <https://git.kernel.org/stable/c/c3edc6e808209aa705185f732e682a370981ced1>
- other: <https://git.kernel.org/stable/c/a1e18acb0246bfb001b08b8b1b830b5ec92a0f13>
- other: <https://git.kernel.org/stable/c/4a4df5e78712de39d6f90d6a64b5eb48dca03bd5>
- other: <https://git.kernel.org/stable/c/d266935ac43d57586e311a087510fe6a084af742>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50780>

HTML: <https://flawdb.com/CVE-2022-50780> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50780>
