{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "765230b5f084863183aa8adb3405ab3f32c0b16e"
            },
            {
              "fixed": "027caf8870b8f1763cd804b2b6895aa4d3311579"
            },
            {
              "fixed": "0efcfd3afbd7ac3737979732099f9e1efe378a58"
            },
            {
              "fixed": "1f1a7cdcc7a9a73b5496a45390fb13b7bf7b088f"
            },
            {
              "fixed": "16da5d271322e0947ecce0edc54daa248cf8101e"
            },
            {
              "fixed": "187a62f99da29b1a55602b0d401a783d8dc86161"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.2.0"
            },
            {
              "fixed": "6.6.163"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.117"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.61"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142804.json"
  },
  "details": "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  ----------\u003e __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-\u003eep_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 ]",
  "id": "CVE-2026-142804",
  "modified": "2026-12-03T04:46:01.548192083Z",
  "published": "2026-12-03T03:11:32.613Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/027caf8870b8f1763cd804b2b6895aa4d3311579"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0efcfd3afbd7ac3737979732099f9e1efe378a58"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/16da5d271322e0947ecce0edc54daa248cf8101e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/187a62f99da29b1a55602b0d401a783d8dc86161"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1f1a7cdcc7a9a73b5496a45390fb13b7bf7b088f"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142804.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142804"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "driver core: take parent lock in async device attach"
}