{"api_version":"1","generated_at":"2026-12-03T05:54:41+00:00","cve":"CVE-2026-142804","urls":{"html":"https://cve.report/CVE-2026-142804","api":"https://cve.report/api/cve/CVE-2026-142804.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-142804","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-142804"},"summary":{"title":"driver core: take parent lock in async device attach","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: take parent lock in async device attach\n\nFor device types with need_parent_lock set (only USB interfaces),\nprobe() must run with the parent device locked. A synchronous attach\nafter device_add() gets this from the caller, e.g.\nusb_set_configuration() holds the udev lock while adding interfaces.\n__device_attach_async_helper() runs the probe from an async worker\ninstead, where that lock isn't held, and only takes device_lock(dev).\n\nWith async probing enabled for the hub driver (e.g. driver_async_probe=*\nor driver_async_probe=hub), this races when a multi-TT hub is\nconfigured. For multi-TT hubs, hub_probe() calls\nusb_set_interface(hdev, 0, 1) to select the TT-per-port altsetting, and\nusb_set_interface() creates the endpoint devices of the interface a\nsecond time:\n\n  usb_set_configuration()           async worker\n    [udev locked]\n    device_add(intf)\n      queues the probe  ----------> __device_attach_async_helper()\n                                      [intf locked, udev not locked]\n                                      hub_probe()\n                                        usb_set_interface(hdev, 0, 1)\n    create_intf_ep_devs(intf)             create_intf_ep_devs(intf)\n\ncreate_intf_ep_devs() checks and sets intf->ep_devs_created without a\nlock of its own. If usb_set_configuration() has created ep_81 but not\nyet set the flag, usb_set_interface() skips removing the endpoint\ndevices of the old altsetting and creates ep_81 again. With a\nsynchronous probe, hub_probe() runs inside device_add() with the udev\nlock held, and usb_set_configuration() then finds ep_devs_created\nalready set.\n\nSingle-TT hubs don't call usb_set_interface() from hub_probe() and\ndon't show this warning, but their probe runs without the udev lock as\nwell.\n\nOn an i.MX8MM board with an onboard USB2514 hub this hit 11 of 100\nboots:\n\n  sysfs: cannot create duplicate filename '.../1-1/1-1:1.0/ep_81'\n  Call trace:\n   sysfs_warn_dup\n   usb_create_ep_devs\n   create_intf_ep_devs\n   usb_set_interface\n   hub_probe\n   usb_probe_interface\n   really_probe\n   __device_attach_async_helper\n   async_run_entry_fn\n\nIt also shows on v7.3-rc6 in QEMU, with dummy_hcd and a raw-gadget\nprogram emulating a multi-TT hub: re-authorizing the hub in a loop,\nwhile a SCHED_FIFO task preempts the writing task at random points for\n3 ms, hit the warning in 29 of 6000 iterations.\n\nTake the parent lock in __device_attach_async_helper() as well, like\n__driver_attach_async_helper() does, and move\n__device_driver_lock/unlock() up for that. With this the warning was\ngone in 300 boots on the board and in 6000 iterations in QEMU.\n\n[ johan: switch to async_schedule_dev_nocall() to avoid deadlock if\n         async_schedule_dev() runs synchronously when parent lock is\n\t held ]\n[ Fold the nested conditions into a single if statement; correct commit\n  message to mention \"device types\" rather than \"buses\" for\n  \"need_parent_lock\". - Danilo ]","state":"PUBLISHED","assigner":"Linux","published_at":"2026-12-03 04:18:14","updated_at":"2026-12-03 04:18:14"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/187a62f99da29b1a55602b0d401a783d8dc86161","name":"https://git.kernel.org/stable/c/187a62f99da29b1a55602b0d401a783d8dc86161","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1f1a7cdcc7a9a73b5496a45390fb13b7bf7b088f","name":"https://git.kernel.org/stable/c/1f1a7cdcc7a9a73b5496a45390fb13b7bf7b088f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/16da5d271322e0947ecce0edc54daa248cf8101e","name":"https://git.kernel.org/stable/c/16da5d271322e0947ecce0edc54daa248cf8101e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/027caf8870b8f1763cd804b2b6895aa4d3311579","name":"https://git.kernel.org/stable/c/027caf8870b8f1763cd804b2b6895aa4d3311579","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/0efcfd3afbd7ac3737979732099f9e1efe378a58","name":"https://git.kernel.org/stable/c/0efcfd3afbd7ac3737979732099f9e1efe378a58","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-142804","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142804","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 765230b5f084863183aa8adb3405ab3f32c0b16e 027caf8870b8f1763cd804b2b6895aa4d3311579 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 765230b5f084863183aa8adb3405ab3f32c0b16e 0efcfd3afbd7ac3737979732099f9e1efe378a58 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 765230b5f084863183aa8adb3405ab3f32c0b16e 1f1a7cdcc7a9a73b5496a45390fb13b7bf7b088f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 765230b5f084863183aa8adb3405ab3f32c0b16e 16da5d271322e0947ecce0edc54daa248cf8101e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 765230b5f084863183aa8adb3405ab3f32c0b16e 187a62f99da29b1a55602b0d401a783d8dc86161 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.2","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.61 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.2 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/base/dd.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"027caf8870b8f1763cd804b2b6895aa4d3311579","status":"affected","version":"765230b5f084863183aa8adb3405ab3f32c0b16e","versionType":"git"},{"lessThan":"0efcfd3afbd7ac3737979732099f9e1efe378a58","status":"affected","version":"765230b5f084863183aa8adb3405ab3f32c0b16e","versionType":"git"},{"lessThan":"1f1a7cdcc7a9a73b5496a45390fb13b7bf7b088f","status":"affected","version":"765230b5f084863183aa8adb3405ab3f32c0b16e","versionType":"git"},{"lessThan":"16da5d271322e0947ecce0edc54daa248cf8101e","status":"affected","version":"765230b5f084863183aa8adb3405ab3f32c0b16e","versionType":"git"},{"lessThan":"187a62f99da29b1a55602b0d401a783d8dc86161","status":"affected","version":"765230b5f084863183aa8adb3405ab3f32c0b16e","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/base/dd.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.2"},{"lessThan":"4.2","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.61","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.2","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.61","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.2","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.2","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: take parent lock in async device attach\n\nFor device types with need_parent_lock set (only USB interfaces),\nprobe() must run with the parent device locked. A synchronous attach\nafter device_add() gets this from the caller, e.g.\nusb_set_configuration() holds the udev lock while adding interfaces.\n__device_attach_async_helper() runs the probe from an async worker\ninstead, where that lock isn't held, and only takes device_lock(dev).\n\nWith async probing enabled for the hub driver (e.g. driver_async_probe=*\nor driver_async_probe=hub), this races when a multi-TT hub is\nconfigured. For multi-TT hubs, hub_probe() calls\nusb_set_interface(hdev, 0, 1) to select the TT-per-port altsetting, and\nusb_set_interface() creates the endpoint devices of the interface a\nsecond time:\n\n  usb_set_configuration()           async worker\n    [udev locked]\n    device_add(intf)\n      queues the probe  ----------> __device_attach_async_helper()\n                                      [intf locked, udev not locked]\n                                      hub_probe()\n                                        usb_set_interface(hdev, 0, 1)\n    create_intf_ep_devs(intf)             create_intf_ep_devs(intf)\n\ncreate_intf_ep_devs() checks and sets intf->ep_devs_created without a\nlock of its own. If usb_set_configuration() has created ep_81 but not\nyet set the flag, usb_set_interface() skips removing the endpoint\ndevices of the old altsetting and creates ep_81 again. With a\nsynchronous probe, hub_probe() runs inside device_add() with the udev\nlock held, and usb_set_configuration() then finds ep_devs_created\nalready set.\n\nSingle-TT hubs don't call usb_set_interface() from hub_probe() and\ndon't show this warning, but their probe runs without the udev lock as\nwell.\n\nOn an i.MX8MM board with an onboard USB2514 hub this hit 11 of 100\nboots:\n\n  sysfs: cannot create duplicate filename '.../1-1/1-1:1.0/ep_81'\n  Call trace:\n   sysfs_warn_dup\n   usb_create_ep_devs\n   create_intf_ep_devs\n   usb_set_interface\n   hub_probe\n   usb_probe_interface\n   really_probe\n   __device_attach_async_helper\n   async_run_entry_fn\n\nIt also shows on v7.3-rc6 in QEMU, with dummy_hcd and a raw-gadget\nprogram emulating a multi-TT hub: re-authorizing the hub in a loop,\nwhile a SCHED_FIFO task preempts the writing task at random points for\n3 ms, hit the warning in 29 of 6000 iterations.\n\nTake the parent lock in __device_attach_async_helper() as well, like\n__driver_attach_async_helper() does, and move\n__device_driver_lock/unlock() up for that. With this the warning was\ngone in 300 boots on the board and in 6000 iterations in QEMU.\n\n[ johan: switch to async_schedule_dev_nocall() to avoid deadlock if\n         async_schedule_dev() runs synchronously when parent lock is\n\t held ]\n[ Fold the nested conditions into a single if statement; correct commit\n  message to mention \"device types\" rather than \"buses\" for\n  \"need_parent_lock\". - Danilo ]"}],"providerMetadata":{"dateUpdated":"2026-12-03T03:11:32.613Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/027caf8870b8f1763cd804b2b6895aa4d3311579"},{"url":"https://git.kernel.org/stable/c/0efcfd3afbd7ac3737979732099f9e1efe378a58"},{"url":"https://git.kernel.org/stable/c/1f1a7cdcc7a9a73b5496a45390fb13b7bf7b088f"},{"url":"https://git.kernel.org/stable/c/16da5d271322e0947ecce0edc54daa248cf8101e"},{"url":"https://git.kernel.org/stable/c/187a62f99da29b1a55602b0d401a783d8dc86161"}],"title":"driver core: take parent lock in async device attach","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-142804","datePublished":"2026-12-03T03:11:32.613Z","dateReserved":"2026-12-03T03:10:28.330Z","dateUpdated":"2026-12-03T03:11:32.613Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-03 04:18:14","lastModifiedDate":"2026-12-03 04:18:14","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"142804","Ordinal":"1","Title":"driver core: take parent lock in async device attach","CVE":"CVE-2026-142804","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"142804","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: take parent lock in async device attach\n\nFor device types with need_parent_lock set (only USB interfaces),\nprobe() must run with the parent device locked. A synchronous attach\nafter device_add() gets this from the caller, e.g.\nusb_set_configuration() holds the udev lock while adding interfaces.\n__device_attach_async_helper() runs the probe from an async worker\ninstead, where that lock isn't held, and only takes device_lock(dev).\n\nWith async probing enabled for the hub driver (e.g. driver_async_probe=*\nor driver_async_probe=hub), this races when a multi-TT hub is\nconfigured. For multi-TT hubs, hub_probe() calls\nusb_set_interface(hdev, 0, 1) to select the TT-per-port altsetting, and\nusb_set_interface() creates the endpoint devices of the interface a\nsecond time:\n\n  usb_set_configuration()           async worker\n    [udev locked]\n    device_add(intf)\n      queues the probe  ----------> __device_attach_async_helper()\n                                      [intf locked, udev not locked]\n                                      hub_probe()\n                                        usb_set_interface(hdev, 0, 1)\n    create_intf_ep_devs(intf)             create_intf_ep_devs(intf)\n\ncreate_intf_ep_devs() checks and sets intf->ep_devs_created without a\nlock of its own. If usb_set_configuration() has created ep_81 but not\nyet set the flag, usb_set_interface() skips removing the endpoint\ndevices of the old altsetting and creates ep_81 again. With a\nsynchronous probe, hub_probe() runs inside device_add() with the udev\nlock held, and usb_set_configuration() then finds ep_devs_created\nalready set.\n\nSingle-TT hubs don't call usb_set_interface() from hub_probe() and\ndon't show this warning, but their probe runs without the udev lock as\nwell.\n\nOn an i.MX8MM board with an onboard USB2514 hub this hit 11 of 100\nboots:\n\n  sysfs: cannot create duplicate filename '.../1-1/1-1:1.0/ep_81'\n  Call trace:\n   sysfs_warn_dup\n   usb_create_ep_devs\n   create_intf_ep_devs\n   usb_set_interface\n   hub_probe\n   usb_probe_interface\n   really_probe\n   __device_attach_async_helper\n   async_run_entry_fn\n\nIt also shows on v7.3-rc6 in QEMU, with dummy_hcd and a raw-gadget\nprogram emulating a multi-TT hub: re-authorizing the hub in a loop,\nwhile a SCHED_FIFO task preempts the writing task at random points for\n3 ms, hit the warning in 29 of 6000 iterations.\n\nTake the parent lock in __device_attach_async_helper() as well, like\n__driver_attach_async_helper() does, and move\n__device_driver_lock/unlock() up for that. With this the warning was\ngone in 300 boots on the board and in 6000 iterations in QEMU.\n\n[ johan: switch to async_schedule_dev_nocall() to avoid deadlock if\n         async_schedule_dev() runs synchronously when parent lock is\n\t held ]\n[ Fold the nested conditions into a single if statement; correct commit\n  message to mention \"device types\" rather than \"buses\" for\n  \"need_parent_lock\". - Danilo ]","Type":"Description","Title":"driver core: take parent lock in async device attach"}]}}}