# CVE-2022-50310: ip6mr: fix UAF issue in ip6mr\_sk\_done() when addrconf\_init\_net() 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.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-09-15T14:46:05.486Z
- **Modified:** 2026-11-23T08:17:09.463Z

## Who should check

- Anyone running Linux \>= 75561afeb9ca9f442021fdfe2c9d10482585ccf3, \< 7cd0f52ee4813854cad75775b78476b32f679abb; \>= 60a319d4606bb505a5f9f2e26983f157b0c908dc, \< 339f3a03547ac65efe828168c7b94f25bf030ef1; \>= 7d9b1b578d67a14ae7a7a526ee115b233fa264c4, \< 22a68c3b9362eaac7b035eba09e95e6b3f7a912c; \>= 7d9b1b578d67a14ae7a7a526ee115b233fa264c4, \< 1ca695207ed2271ecbf8ee6c641970f621c157cc
- Anyone running Linux 5.18

## Description

In the Linux kernel, the following vulnerability has been resolved:

ip6mr: fix UAF issue in ip6mr\_sk\_done() when addrconf\_init\_net() failed

If the initialization fails in calling addrconf\_init\_net(), devconf\_all is
the pointer that has been released. Then ip6mr\_sk\_done() is called to
release the net, accessing devconf-\>mc\_forwarding directly causes invalid
pointer access.

The process is as follows:
setup\_net()
	ops\_init()
		addrconf\_init\_net()
		all = kmemdup(...)           ---\> alloc "all"
		...
		net-\>ipv6.devconf\_all = all;
		\_\_addrconf\_sysctl\_register() ---\> failed
		...
		kfree(all);                  ---\> ipv6.devconf\_all invalid
		...
	ops\_exit\_list()
		...
		ip6mr\_sk\_done()
			devconf = net-\>ipv6.devconf\_all;
			//devconf is invalid pointer
			if (!devconf \|\| !atomic\_read(&devconf-\>mc\_forwarding))

The following is the Call Trace information:
BUG: KASAN: use-after-free in ip6mr\_sk\_done+0x112/0x3a0
Read of size 4 at addr ffff888075508e88 by task ip/14554
Call Trace:
\<TASK\>
dump\_stack\_lvl+0x8e/0xd1
print\_report+0x155/0x454
kasan\_report+0xba/0x1f0
kasan\_check\_range+0x35/0x1b0
ip6mr\_sk\_done+0x112/0x3a0
rawv6\_close+0x48/0x70
inet\_release+0x109/0x230
inet6\_release+0x4c/0x70
sock\_release+0x87/0x1b0
igmp6\_net\_exit+0x6b/0x170
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
RIP: 0033:0x7f7963322547

\</TASK\>
Allocated by task 14554:
kasan\_save\_stack+0x1e/0x40
kasan\_set\_track+0x21/0x30
\_\_kasan\_kmalloc+0xa1/0xb0
\_\_kmalloc\_node\_track\_caller+0x4a/0xb0
kmemdup+0x28/0x60
addrconf\_init\_net+0x1be/0x840
ops\_init+0xa5/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 14554:
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
addrconf\_init\_net+0x623/0x840
ops\_init+0xa5/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: \>= 75561afeb9ca9f442021fdfe2c9d10482585ccf3, \< 7cd0f52ee4813854cad75775b78476b32f679abb; \>= 60a319d4606bb505a5f9f2e26983f157b0c908dc, \< 339f3a03547ac65efe828168c7b94f25bf030ef1; \>= 7d9b1b578d67a14ae7a7a526ee115b233fa264c4, \< 22a68c3b9362eaac7b035eba09e95e6b3f7a912c; \>= 7d9b1b578d67a14ae7a7a526ee115b233fa264c4, \< 1ca695207ed2271ecbf8ee6c641970f621c157cc (cvelist)
- Linux: 5.18 (cvelist)

## Mitigation

- Upgrade Linux to 1ca695207ed2271ecbf8ee6c641970f621c157cc or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-50310.md
Affected: Linux >= 75561afeb9ca9f442021fdfe2c9d10482585ccf3, < 7cd0f52ee4813854cad75775b78476b32f679abb; >= 60a319d4606bb505a5f9f2e26983f157b0c908dc, < 339f3a03547ac65efe828168c7b94f25bf030ef1; >= 7d9b1b578d67a14ae7a7a526ee115b233fa264c4, < 22a68c3b9362eaac7b035eba09e95e6b3f7a912c; >= 7d9b1b578d67a14ae7a7a52…
Fixed in: Linux 7cd0f52ee4813854cad75775b78476b32f679abb, Linux 339f3a03547ac65efe828168c7b94f25bf030ef1, Linux 22a68c3b9362eaac7b035eba09e95e6b3f7a912c, Linux 1ca695207ed2271ecbf8ee6c641970f621c157cc

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-50310 being exploited?

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

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

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

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

Linux \>= 75561afeb9ca9f442021fdfe2c9d10482585ccf3, \< 7cd0f52ee4813854cad75775b78476b32f679abb; \>= 60a319d4606bb505a5f9f2e26983f157b0c908dc, \< 339f3a03547ac65efe828168c7b94f25bf030ef1; \>= 7d9b1b578d67a14ae7a7a526ee115b233fa264c4, \< 22a68c3b9362eaac7b035eba09e95e6b3f7a912c; \>= 7d9b1b578d67a14ae7a7a526ee115b233fa264c4, \< 1ca695207ed2271ecbf8ee6c641970f621c157cc; Linux 5.18.

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

Yes. Fixed in Linux 7cd0f52ee4813854cad75775b78476b32f679abb, Linux 339f3a03547ac65efe828168c7b94f25bf030ef1, Linux 22a68c3b9362eaac7b035eba09e95e6b3f7a912c, Linux 1ca695207ed2271ecbf8ee6c641970f621c157cc. Upgrade Linux to 1ca695207ed2271ecbf8ee6c641970f621c157cc or later.

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

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

- patch: <https://git.kernel.org/stable/c/22a68c3b9362eaac7b035eba09e95e6b3f7a912c>
- patch: <https://git.kernel.org/stable/c/1ca695207ed2271ecbf8ee6c641970f621c157cc>
- other: <https://git.kernel.org/stable/c/7cd0f52ee4813854cad75775b78476b32f679abb>
- other: <https://git.kernel.org/stable/c/339f3a03547ac65efe828168c7b94f25bf030ef1>

## 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-50310>

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