{"api_version":"1","generated_at":"2026-08-02T17:40:03+00:00","cve":"CVE-2026-64347","urls":{"html":"https://cve.report/CVE-2026-64347","api":"https://cve.report/api/cve/CVE-2026-64347.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-64347","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-64347"},"summary":{"title":"usb: gadget: composite: fix dead empty check in the USB_DT_OTG handler","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: composite: fix dead empty check in the USB_DT_OTG handler\n\nThe OTG branch of composite_setup() falls back to the first\nconfiguration when none is selected:\n\n\tif (cdev->config)\n\t\tconfig = cdev->config;\n\telse\n\t\tconfig = list_first_entry(&cdev->configs,\n\t\t\t\t\t  struct usb_configuration, list);\n\tif (!config)\n\t\tgoto done;\n\t...\n\tmemcpy(req->buf, config->descriptors[0], value);\n\nlist_first_entry() never returns NULL. On an empty list it returns\ncontainer_of() of the list head. So the \"if (!config)\" check is dead.\n\nWhen cdev->configs is empty, config points at the head inside struct\nusb_composite_dev. config->descriptors[0] reads whatever sits at that\noffset. The memcpy copies up to w_length bytes of it into the response\nbuffer.\n\ncdev->configs can be empty in two cases. One is a teardown race on\ngadget unbind with a control transfer in flight. The other is a driver\nthat sets is_otg before it adds a config. A reproducer that holds\ncdev->configs empty triggers a KASAN fault in this branch.\n\nUse list_first_entry_or_null() so the existing check does its job.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-07-25 10:17:16","updated_at":"2026-07-25 10:17:16"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/01feaf024f29618d5ffa7ab0fd858e0579dcbf7b","name":"https://git.kernel.org/stable/c/01feaf024f29618d5ffa7ab0fd858e0579dcbf7b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/91b3ecd34b60f950c50c560974945b6596a6f207","name":"https://git.kernel.org/stable/c/91b3ecd34b60f950c50c560974945b6596a6f207","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2454264b2ab4cf0055c0bfd39e79f830452bd0db","name":"https://git.kernel.org/stable/c/2454264b2ab4cf0055c0bfd39e79f830452bd0db","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/56add2b9b2e89ec61c0761165d758f73004fdfdf","name":"https://git.kernel.org/stable/c/56add2b9b2e89ec61c0761165d758f73004fdfdf","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fcb21bf747640c9d6bd1eda9da85420f076d59c1","name":"https://git.kernel.org/stable/c/fcb21bf747640c9d6bd1eda9da85420f076d59c1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d3e72cfef2e38bd588055739a8100d14f9773b17","name":"https://git.kernel.org/stable/c/d3e72cfef2e38bd588055739a8100d14f9773b17","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f8f680609c2b3ab795ffcd6f21585b6dfc46d395","name":"https://git.kernel.org/stable/c/f8f680609c2b3ab795ffcd6f21585b6dfc46d395","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8ac463fe6c0f85bdb1ce8c30e8c9e060802e4483","name":"https://git.kernel.org/stable/c/8ac463fe6c0f85bdb1ce8c30e8c9e060802e4483","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-64347","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64347","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd 2454264b2ab4cf0055c0bfd39e79f830452bd0db git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd d3e72cfef2e38bd588055739a8100d14f9773b17 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd 8ac463fe6c0f85bdb1ce8c30e8c9e060802e4483 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd 56add2b9b2e89ec61c0761165d758f73004fdfdf git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd 91b3ecd34b60f950c50c560974945b6596a6f207 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd 01feaf024f29618d5ffa7ab0fd858e0579dcbf7b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd fcb21bf747640c9d6bd1eda9da85420f076d59c1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 53e6242db8d60da0587d36951cc9434d1a1c21dd f8f680609c2b3ab795ffcd6f21585b6dfc46d395 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.3","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.3 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.261 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.212 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.178 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.145 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.96 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.39 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1.4 7.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2-rc3 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"64347","cve":"CVE-2026-64347","epss":"0.001770000","percentile":"0.075070000","score_date":"2026-07-28","updated_at":"2026-07-29 00:05:33"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/usb/gadget/composite.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"2454264b2ab4cf0055c0bfd39e79f830452bd0db","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"},{"lessThan":"d3e72cfef2e38bd588055739a8100d14f9773b17","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"},{"lessThan":"8ac463fe6c0f85bdb1ce8c30e8c9e060802e4483","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"},{"lessThan":"56add2b9b2e89ec61c0761165d758f73004fdfdf","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"},{"lessThan":"91b3ecd34b60f950c50c560974945b6596a6f207","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"},{"lessThan":"01feaf024f29618d5ffa7ab0fd858e0579dcbf7b","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"},{"lessThan":"fcb21bf747640c9d6bd1eda9da85420f076d59c1","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"},{"lessThan":"f8f680609c2b3ab795ffcd6f21585b6dfc46d395","status":"affected","version":"53e6242db8d60da0587d36951cc9434d1a1c21dd","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/usb/gadget/composite.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.3"},{"lessThan":"4.3","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.261","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.212","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.178","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.145","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.96","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.39","versionType":"semver"},{"lessThanOrEqual":"7.1.*","status":"unaffected","version":"7.1.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.2-rc3","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.261","versionStartIncluding":"4.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.212","versionStartIncluding":"4.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.178","versionStartIncluding":"4.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.145","versionStartIncluding":"4.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.96","versionStartIncluding":"4.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.39","versionStartIncluding":"4.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1.4","versionStartIncluding":"4.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2-rc3","versionStartIncluding":"4.3","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: composite: fix dead empty check in the USB_DT_OTG handler\n\nThe OTG branch of composite_setup() falls back to the first\nconfiguration when none is selected:\n\n\tif (cdev->config)\n\t\tconfig = cdev->config;\n\telse\n\t\tconfig = list_first_entry(&cdev->configs,\n\t\t\t\t\t  struct usb_configuration, list);\n\tif (!config)\n\t\tgoto done;\n\t...\n\tmemcpy(req->buf, config->descriptors[0], value);\n\nlist_first_entry() never returns NULL. On an empty list it returns\ncontainer_of() of the list head. So the \"if (!config)\" check is dead.\n\nWhen cdev->configs is empty, config points at the head inside struct\nusb_composite_dev. config->descriptors[0] reads whatever sits at that\noffset. The memcpy copies up to w_length bytes of it into the response\nbuffer.\n\ncdev->configs can be empty in two cases. One is a teardown race on\ngadget unbind with a control transfer in flight. The other is a driver\nthat sets is_otg before it adds a config. A reproducer that holds\ncdev->configs empty triggers a KASAN fault in this branch.\n\nUse list_first_entry_or_null() so the existing check does its job."}],"providerMetadata":{"dateUpdated":"2026-07-25T08:50:08.338Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/2454264b2ab4cf0055c0bfd39e79f830452bd0db"},{"url":"https://git.kernel.org/stable/c/d3e72cfef2e38bd588055739a8100d14f9773b17"},{"url":"https://git.kernel.org/stable/c/8ac463fe6c0f85bdb1ce8c30e8c9e060802e4483"},{"url":"https://git.kernel.org/stable/c/56add2b9b2e89ec61c0761165d758f73004fdfdf"},{"url":"https://git.kernel.org/stable/c/91b3ecd34b60f950c50c560974945b6596a6f207"},{"url":"https://git.kernel.org/stable/c/01feaf024f29618d5ffa7ab0fd858e0579dcbf7b"},{"url":"https://git.kernel.org/stable/c/fcb21bf747640c9d6bd1eda9da85420f076d59c1"},{"url":"https://git.kernel.org/stable/c/f8f680609c2b3ab795ffcd6f21585b6dfc46d395"}],"title":"usb: gadget: composite: fix dead empty check in the USB_DT_OTG handler","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-64347","datePublished":"2026-07-25T08:50:08.338Z","dateReserved":"2026-07-19T15:36:31.782Z","dateUpdated":"2026-07-25T08:50:08.338Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-07-25 10:17:16","lastModifiedDate":"2026-07-25 10:17:16","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"64347","Ordinal":"1","Title":"usb: gadget: composite: fix dead empty check in the USB_DT_OTG h","CVE":"CVE-2026-64347","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"64347","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: composite: fix dead empty check in the USB_DT_OTG handler\n\nThe OTG branch of composite_setup() falls back to the first\nconfiguration when none is selected:\n\n\tif (cdev->config)\n\t\tconfig = cdev->config;\n\telse\n\t\tconfig = list_first_entry(&cdev->configs,\n\t\t\t\t\t  struct usb_configuration, list);\n\tif (!config)\n\t\tgoto done;\n\t...\n\tmemcpy(req->buf, config->descriptors[0], value);\n\nlist_first_entry() never returns NULL. On an empty list it returns\ncontainer_of() of the list head. So the \"if (!config)\" check is dead.\n\nWhen cdev->configs is empty, config points at the head inside struct\nusb_composite_dev. config->descriptors[0] reads whatever sits at that\noffset. The memcpy copies up to w_length bytes of it into the response\nbuffer.\n\ncdev->configs can be empty in two cases. One is a teardown race on\ngadget unbind with a control transfer in flight. The other is a driver\nthat sets is_otg before it adds a config. A reproducer that holds\ncdev->configs empty triggers a KASAN fault in this branch.\n\nUse list_first_entry_or_null() so the existing check does its job.","Type":"Description","Title":"usb: gadget: composite: fix dead empty check in the USB_DT_OTG h"}]}}}