{"api_version":"1","generated_at":"2026-12-04T03:50:19+00:00","cve":"CVE-2026-143395","urls":{"html":"https://cve.report/CVE-2026-143395","api":"https://cve.report/api/cve/CVE-2026-143395.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-143395","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-143395"},"summary":{"title":"net/9p/usbg: Fix use-after-free on usb9pfs_clear_tx","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-12-03 10:18:33","updated_at":"2026-12-03 10:18:33"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/6c7901b8667af551f5efe90d67a6f3f6add0c27b","name":"https://git.kernel.org/stable/c/6c7901b8667af551f5efe90d67a6f3f6add0c27b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e9c79d83affb05663925d81c83e334bf8d230191","name":"https://git.kernel.org/stable/c/e9c79d83affb05663925d81c83e334bf8d230191","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5c69297356bf6d04d8222f52717c6c4aa73e5d2c","name":"https://git.kernel.org/stable/c/5c69297356bf6d04d8222f52717c6c4aa73e5d2c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/840ae53432e569266879dddcaf06993ec2276ec8","name":"https://git.kernel.org/stable/c/840ae53432e569266879dddcaf06993ec2276ec8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-143395","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143395","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a3be076dc174d9022a71a12554feb4c97b5c4d5c e9c79d83affb05663925d81c83e334bf8d230191 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a3be076dc174d9022a71a12554feb4c97b5c4d5c 6c7901b8667af551f5efe90d67a6f3f6add0c27b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a3be076dc174d9022a71a12554feb4c97b5c4d5c 840ae53432e569266879dddcaf06993ec2276ec8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a3be076dc174d9022a71a12554feb4c97b5c4d5c 5c69297356bf6d04d8222f52717c6c4aa73e5d2c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.120 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.66 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.7 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"143395","cve":"CVE-2026-143395","epss":"0.003680000","percentile":"0.327720000","score_date":"2026-12-03","updated_at":"2026-12-04 00:14:18"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/9p/trans_usbg.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"e9c79d83affb05663925d81c83e334bf8d230191","status":"affected","version":"a3be076dc174d9022a71a12554feb4c97b5c4d5c","versionType":"git"},{"lessThan":"6c7901b8667af551f5efe90d67a6f3f6add0c27b","status":"affected","version":"a3be076dc174d9022a71a12554feb4c97b5c4d5c","versionType":"git"},{"lessThan":"840ae53432e569266879dddcaf06993ec2276ec8","status":"affected","version":"a3be076dc174d9022a71a12554feb4c97b5c4d5c","versionType":"git"},{"lessThan":"5c69297356bf6d04d8222f52717c6c4aa73e5d2c","status":"affected","version":"a3be076dc174d9022a71a12554feb4c97b5c4d5c","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/9p/trans_usbg.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.12"},{"lessThan":"6.12","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.120","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.66","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.7","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.120","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.66","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.7","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"6.12","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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."}],"providerMetadata":{"dateUpdated":"2026-12-03T09:22:36.772Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-143395","datePublished":"2026-12-03T09:22:36.772Z","dateReserved":"2026-12-03T03:10:28.373Z","dateUpdated":"2026-12-03T09:22:36.772Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-03 10:18:33","lastModifiedDate":"2026-12-03 10:18:33","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"143395","Ordinal":"1","Title":"net/9p/usbg: Fix use-after-free on usb9pfs_clear_tx","CVE":"CVE-2026-143395","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"143395","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"net/9p/usbg: Fix use-after-free on usb9pfs_clear_tx"}]}}}