{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-50310",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-09-15T14:18:36.813Z",
        "datePublished": "2025-09-15T14:46:05.486Z",
        "dateUpdated": "2026-08-05T08:58:08.862Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:58:08.862Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nip6mr: fix UAF issue in ip6mr_sk_done() when addrconf_init_net() failed\n\nIf the initialization fails in calling addrconf_init_net(), devconf_all is\nthe pointer that has been released. Then ip6mr_sk_done() is called to\nrelease the net, accessing devconf->mc_forwarding directly causes invalid\npointer access.\n\nThe process is as follows:\nsetup_net()\n\tops_init()\n\t\taddrconf_init_net()\n\t\tall = kmemdup(...)           ---> alloc \"all\"\n\t\t...\n\t\tnet->ipv6.devconf_all = all;\n\t\t__addrconf_sysctl_register() ---> failed\n\t\t...\n\t\tkfree(all);                  ---> ipv6.devconf_all invalid\n\t\t...\n\tops_exit_list()\n\t\t...\n\t\tip6mr_sk_done()\n\t\t\tdevconf = net->ipv6.devconf_all;\n\t\t\t//devconf is invalid pointer\n\t\t\tif (!devconf || !atomic_read(&devconf->mc_forwarding))\n\nThe following is the Call Trace information:\nBUG: KASAN: use-after-free in ip6mr_sk_done+0x112/0x3a0\nRead of size 4 at addr ffff888075508e88 by task ip/14554\nCall Trace:\n<TASK>\ndump_stack_lvl+0x8e/0xd1\nprint_report+0x155/0x454\nkasan_report+0xba/0x1f0\nkasan_check_range+0x35/0x1b0\nip6mr_sk_done+0x112/0x3a0\nrawv6_close+0x48/0x70\ninet_release+0x109/0x230\ninet6_release+0x4c/0x70\nsock_release+0x87/0x1b0\nigmp6_net_exit+0x6b/0x170\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\nRIP: 0033:0x7f7963322547\n\n</TASK>\nAllocated by task 14554:\nkasan_save_stack+0x1e/0x40\nkasan_set_track+0x21/0x30\n__kasan_kmalloc+0xa1/0xb0\n__kmalloc_node_track_caller+0x4a/0xb0\nkmemdup+0x28/0x60\naddrconf_init_net+0x1be/0x840\nops_init+0xa5/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 14554:\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\naddrconf_init_net+0x623/0x840\nops_init+0xa5/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": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "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.\nAC: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.\nPR: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.\nUI: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.\nS: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.\nC: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.\nI: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.\nA: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."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "net/ipv6/addrconf.c"
                    ],
                    "versions": [
                        {
                            "version": "7d9b1b578d67a14ae7a7a526ee115b233fa264c4",
                            "lessThan": "22a68c3b9362eaac7b035eba09e95e6b3f7a912c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7d9b1b578d67a14ae7a7a526ee115b233fa264c4",
                            "lessThan": "1ca695207ed2271ecbf8ee6c641970f621c157cc",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "net/ipv6/addrconf.c"
                    ],
                    "versions": [
                        {
                            "version": "5.18",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.18",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.6",
                            "lessThanOrEqual": "6.0.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.0.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/22a68c3b9362eaac7b035eba09e95e6b3f7a912c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1ca695207ed2271ecbf8ee6c641970f621c157cc"
                }
            ],
            "title": "ip6mr: fix UAF issue in ip6mr_sk_done() when addrconf_init_net() failed",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}