CVE-2023-53759 (GCVE-0-2023-53759)
Vulnerability from cvelistv5
Published
2025-12-08 01:19
Modified
2026-08-05 09:15
Summary
In the Linux kernel, the following vulnerability has been resolved: HID: hidraw: fix data race on device refcount The hidraw_open() function increments the hidraw device reference counter. The counter has no dedicated synchronization mechanism, resulting in a potential data race when concurrently opening a device. The race is a regression introduced by commit 8590222e4b02 ("HID: hidraw: Replace hidraw device table mutex with a rwsem"). While minors_rwsem is intended to protect the hidraw_table itself, by instead acquiring the lock for writing, the reference counter is also protected. This is symmetrical to hidraw_release().
Impacted products
Vendor Product Version
Linux Linux Version: 8590222e4b021054a7167a4dd35b152a8ed7018e
Version: 8590222e4b021054a7167a4dd35b152a8ed7018e
Version: 8590222e4b021054a7167a4dd35b152a8ed7018e
Version: 8590222e4b021054a7167a4dd35b152a8ed7018e
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/hid/hidraw.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "879e79c3aead41b8aa2e91164354b30bd1c4ef3b",
              "status": "affected",
              "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
              "versionType": "git"
            },
            {
              "lessThan": "ff348eabd97577da974d3db7038857f28c61d2bd",
              "status": "affected",
              "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
              "versionType": "git"
            },
            {
              "lessThan": "05b47034e2488c2924e5c032e20a1979d012b5b5",
              "status": "affected",
              "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
              "versionType": "git"
            },
            {
              "lessThan": "944ee77dc6ec7b0afd8ec70ffc418b238c92f12b",
              "status": "affected",
              "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/hid/hidraw.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.17"
            },
            {
              "lessThan": "5.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.37",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.3.*",
              "status": "unaffected",
              "version": "6.3.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.4.*",
              "status": "unaffected",
              "version": "6.4.1",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.5",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.37",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.3.11",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.4.1",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.5",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nHID: hidraw: fix data race on device refcount\n\nThe hidraw_open() function increments the hidraw device reference\ncounter. The counter has no dedicated synchronization mechanism,\nresulting in a potential data race when concurrently opening a device.\n\nThe race is a regression introduced by commit 8590222e4b02 (\"HID:\nhidraw: Replace hidraw device table mutex with a rwsem\"). While\nminors_rwsem is intended to protect the hidraw_table itself, by instead\nacquiring the lock for writing, the reference counter is also protected.\nThis is symmetrical to hidraw_release()."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is reached by `open()`/`read()`/`poll()`/`close()` on the `/dev/hidrawN` character device, requiring local access to the system. No network or physical interaction with the bus is needed to drive the race itself.\nAC:L - The attacker controls both sides of the race \u2014 it is simply two or more threads calling `open()` on the same hidraw node in a loop, retryable indefinitely until the non-atomic `dev-\u003eopen++` loses an update. The race is known to trigger accidentally during normal FIDO2 device probing (systemd issue #27947), and HID hot-unplug/Bluetooth-link-loss events needed to convert the refcount skew into a free are routine and inducible.\nPR:L - An unprivileged local user needs only read access to a hidraw node; systemd\u0027s uaccess/seat udev rules grant the logged-in user an ACL on hidraw devices for FIDO2 tokens, hardware wallets, 3D mice and game controllers (empirically confirmed: `crw-rw----+` with `user:\u003cuid\u003e:rw-`). No capability, no root, no ioctl gate.\nUI:N - The attacker\u0027s own threads perform every step of the attack; no victim action is required. Device detach events occur spontaneously (Bluetooth link loss, dongle removal, uhid teardown) or can be caused by the attacker themselves.\nS:U - The refcount corruption and resulting use-after-free are confined to kernel memory within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - The premature `kfree(struct hidraw)` leaves `list-\u003ehidraw` dangling, and `hidraw_read()` dereferences `list-\u003ehidraw-\u003eexist` and the embedded wait queue on reclaimed memory; a UAF on a small kmalloc object with attacker-sprayed contents yields an arbitrary-read primitive and kernel memory disclosure.\nI:H - `add_wait_queue()`/`remove_wait_queue()` on the freed `hidraw-\u003ewait` write list pointers into reclaimed heap memory, and a sprayed replacement object gives attacker-controlled `list_head` pointers plus a controlled `wait_queue_entry-\u003efunc` call \u2014 an arbitrary write and control-flow hijack. The stale-minor path also corrupts a different, live `struct hidraw`\u0027s refcount.\nA:H - `hidraw_release()` on the orphaned fd dereferences a NULL `hidraw_table[minor]` for a guaranteed oops, and the UAF crashes the kernel outright; additionally the refcount underflow permanently leaks hidraw minors (only 64 exist), denying hidraw registration to all future HID devices."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T09:15:51.129Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/879e79c3aead41b8aa2e91164354b30bd1c4ef3b"
        },
        {
          "url": "https://git.kernel.org/stable/c/ff348eabd97577da974d3db7038857f28c61d2bd"
        },
        {
          "url": "https://git.kernel.org/stable/c/05b47034e2488c2924e5c032e20a1979d012b5b5"
        },
        {
          "url": "https://git.kernel.org/stable/c/944ee77dc6ec7b0afd8ec70ffc418b238c92f12b"
        }
      ],
      "title": "HID: hidraw: fix data race on device refcount",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-53759",
    "datePublished": "2025-12-08T01:19:20.432Z",
    "dateReserved": "2025-12-08T01:18:04.280Z",
    "dateUpdated": "2026-08-05T09:15:51.129Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…