{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-143395",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.373Z",
        "datePublished": "2026-12-03T09:22:36.772Z",
        "dateUpdated": "2026-12-03T09:22:36.772Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T09:22:36.772Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/9p/usbg: Fix use-after-free on usb9pfs_clear_tx\n\nWhen p9_usbg_close() is called, it invokes usb9pfs_clear_tx() but does\nnot clear usb9pfs->client nor usb9pfs->in_req->context afterwards.\nThe 9p client core (p9_client_destroy) calls close() and then\nkfree(clnt), so after p9_usbg_close returns the client struct is freed.\n\nIf the USB gadget is later disabled (e.g., host disconnect),\nusb9pfs_disable calls usb9pfs_clear_tx again, which passes the dangling\nusb9pfs->client pointer to p9_client_cb. Inside p9_client_cb,\np9_req_put(c, req) dereferences the freed client to access its reqs IDR,\ncausing a use-after-free.\n\nAdditionally, usb9pfs_clear_tx does not clear usb9pfs->in_req->context\nafter calling p9_client_cb, so a second invocation finds a stale request\npointer and attempts double-completion, further compounding the UAF risk.\n\nFix by:\n1. Clearing usb9pfs->in_req->context to NULL in usb9pfs_clear_tx()\n   before checking usb9pfs->client, so that even if the client is gone\n   the stale request pointer is consumed and cannot cause\n   double-completion.\n2. Adding a NULL check on usb9pfs->client in usb9pfs_clear_tx() to skip\n   p9_client_cb() when the client has already been destroyed.\n3. Setting usb9pfs->client = NULL in p9_usbg_close() after calling\n   usb9pfs_clear_tx(), to prevent any subsequent call from dereferencing\n   the freed client pointer."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "net/9p/trans_usbg.c"
                    ],
                    "versions": [
                        {
                            "version": "a3be076dc174d9022a71a12554feb4c97b5c4d5c",
                            "lessThan": "e9c79d83affb05663925d81c83e334bf8d230191",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a3be076dc174d9022a71a12554feb4c97b5c4d5c",
                            "lessThan": "6c7901b8667af551f5efe90d67a6f3f6add0c27b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a3be076dc174d9022a71a12554feb4c97b5c4d5c",
                            "lessThan": "840ae53432e569266879dddcaf06993ec2276ec8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a3be076dc174d9022a71a12554feb4c97b5c4d5c",
                            "lessThan": "5c69297356bf6d04d8222f52717c6c4aa73e5d2c",
                            "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/9p/trans_usbg.c"
                    ],
                    "versions": [
                        {
                            "version": "6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.120",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.66",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc2",
                            "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": "6.12",
                                    "versionEndExcluding": "6.12.120"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.18.66"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "7.4-rc2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/e9c79d83affb05663925d81c83e334bf8d230191"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6c7901b8667af551f5efe90d67a6f3f6add0c27b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/840ae53432e569266879dddcaf06993ec2276ec8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5c69297356bf6d04d8222f52717c6c4aa73e5d2c"
                }
            ],
            "title": "net/9p/usbg: Fix use-after-free on usb9pfs_clear_tx",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}