CVE-2022-50310
published high CVSS 3.1 · 7.8ip6mr: fix UAF issue in ip6mr_sk_done() when addrconf_init_net() failed
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux75561afeb9ca9f442021fdfe2c9d10482585ccf3 to < 7cd0f52ee4813854cad75775b78476b32f679abb · 60a319d4606bb505a5f9f2e26983f157b0c908dc to < 339f3a03547ac65efe828168c7b94f25bf030ef1 · 7d9b1b578d67a14ae7a7a526ee115b233fa264c4 to < 22a68c3b9362eaac7b035eba09e95e6b3f7a912c · 7d9b1b578d67a14ae7a7a526ee115b233fa264c4 to < 1ca695207ed2271ecbf8ee6c641970f621c157cc · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.18 (affected) · 0 to < 5.18 (unaffected · semver) · 6.0.6 through 6.0.* (unaffected · semver) · 6.1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
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
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The UAF is triggered through the local unshare(CLONE_NEWNET) syscall path (ksys_unshare → copy_net_ns → setup_net → addrconf_init_net failure → igmp6_net_exit → ip6mr_sk_done), not via network packet processing or adjacent-link protocols. AC:L - An unprivileged attacker can induce memory pressure to make __addrconf_sysctl_register() fail, then repeatedly call unshare to hit the dangling-devconf_all path; synchronize_rcu() between the free and use also gives a controllable heap-spray window, so success does not depend on conditions outside the attacker’s influence. PR:L - Creating a network namespace only requires CAP_SYS_ADMIN in the caller’s user namespace, which an unprivileged user obtains via unshare(CLONE_NEWUSER|CLONE_NEWNET); real init-namespace root is not required. UI:N - The attacker triggers the failing netns creation and cleanup entirely with their own unshare syscall; no separate victim action such as mounting a filesystem or opening a device is required. S:U - Impact is confined to the host kernel’s memory/control-flow authority (use-after-free of ipv6_devconf in the same OS security domain), with no VM escape, IOMMU bypass, or other cross-authority boundary crossing. C:H - ip6mr_sk_done() performs a use-after-free read of the freed ipv6_devconf (mc_forwarding); with heap reuse after synchronize_rcu(), this UAF yields a high-impact kernel information-disclosure primitive per UAF scoring guidance. I:H - Use-after-free of a reclaimable slab object enables heap spraying and further corruption (including a potential atomic_dec write on sprayed non-zero mc_forwarding), which is scored as high integrity impact suitable for control-flow hijacking. A:H - The demonstrated KASAN use-after-free in ip6mr_sk_done causes a kernel oops/panic during netns setup rollback, fully denying system availability even when not fully exploited for code execution.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 75561afeb9ca9f442021fdfe2c9d10482585ccf3 to < 7cd0f52ee4813854cad75775b78476b32f679abb (affected · git)60a319d4606bb505a5f9f2e26983f157b0c908dc to < 339f3a03547ac65efe828168c7b94f25bf030ef1 (affected · git)7d9b1b578d67a14ae7a7a526ee115b233fa264c4 to < 22a68c3b9362eaac7b035eba09e95e6b3f7a912c (affected · git)7d9b1b578d67a14ae7a7a526ee115b233fa264c4 to < 1ca695207ed2271ecbf8ee6c641970f621c157cc (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.18 (affected)0 to < 5.18 (unaffected · semver)6.0.6 through 6.0.* (unaffected · semver)6.1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
1Linux · cna
ip6mr: fix UAF issue in ip6mr_sk_done() when addrconf_init_net() failed
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 197fb77f493d1cc8e6b1a808f86152644541b3a377e6bb6a61fc97cabbdb58a1
- Ingested
- 23 Nov 2026, 13:59:31 UTC
- Source record
- Official CVE record