# CVE-2023-52866: HID: uclogic: Fix user-memory-access bug in uclogic\_params\_ugee\_v2\_init\_event\_hooks()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2024-05-21T15:31:57.191Z
- **Modified:** 2026-06-17T06:43:46.343Z

## Who should check

- Anyone running Linux \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 64da1f6147dac7f8499d4937a0d7ea990bf569e8; \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 6c8f953728d75104d994893f58801c457274335a; \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6
- Anyone running Linux 6.3

## Description

In the Linux kernel, the following vulnerability has been resolved:

HID: uclogic: Fix user-memory-access bug in uclogic\_params\_ugee\_v2\_init\_event\_hooks()

When CONFIG\_HID\_UCLOGIC=y and CONFIG\_KUNIT\_ALL\_TESTS=y, launch kernel and
then the below user-memory-access bug occurs.

In hid\_test\_uclogic\_params\_cleanup\_event\_hooks(),it call
uclogic\_params\_ugee\_v2\_init\_event\_hooks() with the first arg=NULL, so
when it calls uclogic\_params\_ugee\_v2\_has\_battery(), the hid\_get\_drvdata()
will access hdev-\>dev with hdev=NULL, which will cause below
user-memory-access.

So add a fake\_device with quirks member and call hid\_set\_drvdata()
to assign hdev-\>dev-\>driver\_data which avoids the null-ptr-def bug
for drvdata-\>quirks in uclogic\_params\_ugee\_v2\_has\_battery(). After applying
this patch, the below user-memory-access bug never occurs.

 general protection fault, probably for non-canonical address 0xdffffc0000000329: 0000 \[\#1\] PREEMPT SMP KASAN
 KASAN: probably user-memory-access in range \[0x0000000000001948-0x000000000000194f\]
 CPU: 5 PID: 2189 Comm: kunit\_try\_catch Tainted: G    B   W        N 6.6.0-rc2+ \#30
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
 RIP: 0010:uclogic\_params\_ugee\_v2\_init\_event\_hooks+0x87/0x600
 Code: f3 f3 65 48 8b 14 25 28 00 00 00 48 89 54 24 60 31 d2 48 89 fa c7 44 24 30 00 00 00 00 48 c7 44 24 28 02 f8 02 01 48 c1 ea 03 \<80\> 3c 02 00 0f 85 2c 04 00 00 48 8b 9d 48 19 00 00 48 b8 00 00 00
 RSP: 0000:ffff88810679fc88 EFLAGS: 00010202
 RAX: dffffc0000000000 RBX: 0000000000000004 RCX: 0000000000000000
 RDX: 0000000000000329 RSI: ffff88810679fd88 RDI: 0000000000001948
 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffed1020f639f0
 R10: ffff888107b1cf87 R11: 0000000000000400 R12: 1ffff11020cf3f92
 R13: ffff88810679fd88 R14: ffff888100b97b08 R15: ffff8881030bb080
 FS:  0000000000000000(0000) GS:ffff888119e80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000000000000000 CR3: 0000000005286001 CR4: 0000000000770ee0
 DR0: ffffffff8fdd6cf4 DR1: ffffffff8fdd6cf5 DR2: ffffffff8fdd6cf6
 DR3: ffffffff8fdd6cf7 DR6: 00000000fffe0ff0 DR7: 0000000000000600
 PKRU: 55555554
 Call Trace:
  \<TASK\>
  ? die\_addr+0x3d/0xa0
  ? exc\_general\_protection+0x144/0x220
  ? asm\_exc\_general\_protection+0x22/0x30
  ? uclogic\_params\_ugee\_v2\_init\_event\_hooks+0x87/0x600
  ? sched\_clock\_cpu+0x69/0x550
  ? uclogic\_parse\_ugee\_v2\_desc\_gen\_params+0x70/0x70
  ? load\_balance+0x2950/0x2950
  ? rcu\_trc\_cmpxchg\_need\_qs+0x67/0xa0
  hid\_test\_uclogic\_params\_cleanup\_event\_hooks+0x9e/0x1a0
  ? uclogic\_params\_ugee\_v2\_init\_event\_hooks+0x600/0x600
  ? \_\_switch\_to+0x5cf/0xe60
  ? migrate\_enable+0x260/0x260
  ? \_\_kthread\_parkme+0x83/0x150
  ? kunit\_try\_run\_case\_cleanup+0xe0/0xe0
  kunit\_generic\_run\_threadfn\_adapter+0x4a/0x90
  ? kunit\_try\_catch\_throw+0x80/0x80
  kthread+0x2b5/0x380
  ? kthread\_complete\_and\_exit+0x20/0x20
  ret\_from\_fork+0x2d/0x70
  ? kthread\_complete\_and\_exit+0x20/0x20
  ret\_from\_fork\_asm+0x11/0x20
  \</TASK\>
 Modules linked in:
 Dumping ftrace buffer:
    (ftrace buffer empty)
 ---\[ end trace 0000000000000000 \]---
 RIP: 0010:uclogic\_params\_ugee\_v2\_init\_event\_hooks+0x87/0x600
 Code: f3 f3 65 48 8b 14 25 28 00 00 00 48 89 54 24 60 31 d2 48 89 fa c7 44 24 30 00 00 00 00 48 c7 44 24 28 02 f8 02 01 48 c1 ea 03 \<80\> 3c 02 00 0f 85 2c 04 00 00 48 8b 9d 48 19 00 00 48 b8 00 00 00
 RSP: 0000:ffff88810679fc88 EFLAGS: 00010202
 RAX: dffffc0000000000 RBX: 0000000000000004 RCX: 0000000000000000
 RDX: 0000000000000329 RSI: ffff88810679fd88 RDI: 0000000000001948
 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffed1020f639f0
 R10: ffff888107b1cf87 R11: 0000000000000400 R12: 1ffff11020cf3f92
 R13: ffff88810679fd88 R14: ffff888100b97b08 R15: ffff8881030bb080
 FS:  0000000000000000(0000) GS:ffff888119e80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000000000000000 CR3: 0000000005286001 CR4: 0000000000770ee0
 DR0: ffffffff8fdd6cf4 DR1: 
---truncated---

## Affected and fixed versions

- Linux: \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 64da1f6147dac7f8499d4937a0d7ea990bf569e8; \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 6c8f953728d75104d994893f58801c457274335a; \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6 (cvelist)
- Linux: 6.3 (cvelist)

## Mitigation

- Upgrade Linux to 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52866. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52866.md
Affected: Linux >= a251d6576d2a29fc0806ef4775719e3b6e672d91, < 64da1f6147dac7f8499d4937a0d7ea990bf569e8; >= a251d6576d2a29fc0806ef4775719e3b6e672d91, < 6c8f953728d75104d994893f58801c457274335a; >= a251d6576d2a29fc0806ef4775719e3b6e672d91, < 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6; Linux 6.3
Fixed in: Linux 64da1f6147dac7f8499d4937a0d7ea990bf569e8, Linux 6c8f953728d75104d994893f58801c457274335a, Linux 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52866 being exploited?

There is no confirmed exploitation: CVE-2023-52866 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-52866?

High: CVSS 7.1 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52866?

Linux \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 64da1f6147dac7f8499d4937a0d7ea990bf569e8; \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 6c8f953728d75104d994893f58801c457274335a; \>= a251d6576d2a29fc0806ef4775719e3b6e672d91, \< 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6; Linux 6.3.

### Is there a fix for CVE-2023-52866?

Yes. Fixed in Linux 64da1f6147dac7f8499d4937a0d7ea990bf569e8, Linux 6c8f953728d75104d994893f58801c457274335a, Linux 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6. Upgrade Linux to 91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6 or later.

### How do I check if I'm affected by CVE-2023-52866?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/64da1f6147dac7f8499d4937a0d7ea990bf569e8>
- patch: <https://git.kernel.org/stable/c/6c8f953728d75104d994893f58801c457274335a>
- patch: <https://git.kernel.org/stable/c/91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52866>

HTML: <https://flawdb.com/CVE-2023-52866> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52866>
