{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-49672",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-02-26T02:21:30.437Z",
        "datePublished": "2025-02-26T02:24:05.284Z",
        "dateUpdated": "2026-08-05T08:56:01.503Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:56:01.503Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: tun: unlink NAPI from device on destruction\n\nSyzbot found a race between tun file and device destruction.\nNAPIs live in struct tun_file which can get destroyed before\nthe netdev so we have to del them explicitly. The current\ncode is missing deleting the NAPI if the queue was detached\nfirst."
                }
            ],
            "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 bug is triggered via local /dev/net/tun ioctls (TUNSETIFF with IFF_NAPI|IFF_MULTI_QUEUE, TUNSETQUEUE IFF_DETACH_QUEUE) and local rtnetlink RTM_DELLINK/close, not by processing packets from a remote peer.\nAC:L - The attacker fully controls both sides of the race—detaching the queue, deleting the netdev, and closing the tun fd concurrently (as in the threaded syzbot repro)—so success does not depend on external timing or victim state.\nPR:L - Creating/configuring the tun device and issuing RTM_DELLINK require only ns_capable(CAP_NET_ADMIN) in the network namespace’s user_ns, which an unprivileged user obtains via user+net namespaces; /dev/net/tun is world-accessible and IFF_NAPI does not need init-ns capable().\nUI:N - Exploitation is entirely attacker-driven through their own open/ioctl/netlink/close sequence; no separate victim action is required.\nS:U - This is a standard in-kernel use-after-free leading to local privilege escalation within the same host kernel authority, with no VM escape or IOMMU boundary crossing.\nC:H - KASAN confirms a use-after-free of the heap-allocated tun_file (containing napi_struct); reclaiming that object gives the attacker control of freed contents and enables arbitrary kernel reads.\nI:H - The same UAF leaves a dangling napi on netdev->napi_list that free_netdev/netif_napi_del list-walks and list_del’s, enabling heap spray and arbitrary write/control-flow hijack primitives.\nA:H - The dangling napi_list walk in free_netdev produces a reliable kernel oops/panic (KASAN use-after-free Read in free_netdev) even without full exploitation."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/tun.c"
                    ],
                    "versions": [
                        {
                            "version": "943170998b200190f99d3fe7e771437e2c51f319",
                            "lessThan": "82e729aee59acefe135fceffadcbc5b86dd4f1b9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "943170998b200190f99d3fe7e771437e2c51f319",
                            "lessThan": "a8cf919022373c97a84fe596bbea544f909c485d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "943170998b200190f99d3fe7e771437e2c51f319",
                            "lessThan": "bec1be0a745ab420718217e3e0d9542a75108989",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "943170998b200190f99d3fe7e771437e2c51f319",
                            "lessThan": "8145f77d38de4f88b8a69e1463f5c09ba189d77c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "943170998b200190f99d3fe7e771437e2c51f319",
                            "lessThan": "8661d4b8faa2f7ee7a559969c0a7c57f077b1728",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "943170998b200190f99d3fe7e771437e2c51f319",
                            "lessThan": "3b9bc84d311104906d2b4995a9a02d7b7ddab2db",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/tun.c"
                    ],
                    "versions": [
                        {
                            "version": "4.15",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.15",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.251",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.204",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.129",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.53",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.18.10",
                            "lessThanOrEqual": "5.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19",
                            "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": "4.15",
                                    "versionEndExcluding": "4.19.251"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.15",
                                    "versionEndExcluding": "5.4.204"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.15",
                                    "versionEndExcluding": "5.10.129"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.15",
                                    "versionEndExcluding": "5.15.53"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.15",
                                    "versionEndExcluding": "5.18.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.15",
                                    "versionEndExcluding": "5.19"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/82e729aee59acefe135fceffadcbc5b86dd4f1b9"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a8cf919022373c97a84fe596bbea544f909c485d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bec1be0a745ab420718217e3e0d9542a75108989"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8145f77d38de4f88b8a69e1463f5c09ba189d77c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8661d4b8faa2f7ee7a559969c0a7c57f077b1728"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3b9bc84d311104906d2b4995a9a02d7b7ddab2db"
                }
            ],
            "title": "net: tun: unlink NAPI from device on destruction",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}