{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-53759",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-08T01:18:04.280Z",
        "datePublished": "2025-12-08T01:19:20.432Z",
        "dateUpdated": "2026-08-05T09:15:51.129Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:15:51.129Z"
            },
            "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": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "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 — it is simply two or more threads calling `open()` on the same hidraw node in a loop, retryable indefinitely until the non-atomic `dev->open++` 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's 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:<uid>:rw-`). No capability, no root, no ioctl gate.\nUI:N - The attacker's 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->hidraw` dangling, and `hidraw_read()` dereferences `list->hidraw->exist` 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->wait` write list pointers into reclaimed heap memory, and a sprayed replacement object gives attacker-controlled `list_head` pointers plus a controlled `wait_queue_entry->func` call — an arbitrary write and control-flow hijack. The stale-minor path also corrupts a different, live `struct hidraw`'s 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."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/hid/hidraw.c"
                    ],
                    "versions": [
                        {
                            "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
                            "lessThan": "879e79c3aead41b8aa2e91164354b30bd1c4ef3b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
                            "lessThan": "ff348eabd97577da974d3db7038857f28c61d2bd",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
                            "lessThan": "05b47034e2488c2924e5c032e20a1979d012b5b5",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8590222e4b021054a7167a4dd35b152a8ed7018e",
                            "lessThan": "944ee77dc6ec7b0afd8ec70ffc418b238c92f12b",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/hid/hidraw.c"
                    ],
                    "versions": [
                        {
                            "version": "5.17",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.17",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.37",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3.11",
                            "lessThanOrEqual": "6.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4.1",
                            "lessThanOrEqual": "6.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.5",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.1.37"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.3.11"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.4.1"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.5"
                                }
                            ]
                        }
                    ]
                }
            ],
            "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"
            }
        }
    }
}