# CVE-2025-38394: HID: appletb-kbd: fix memory corruption of input\_handler\_list

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.26% (percentile 10, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2025-07-25T12:53:39.017Z
- **Modified:** 2026-06-17T09:16:46.237Z

## Who should check

- Anyone running Linux \>= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, \< 6ad40b07e15c29712d9a4b8096914ccd82e3fc17; \>= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, \< c80f2b047d5cc42fbd2dff9d1942d4ba7545100f
- Anyone running Linux 6.15

## Description

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

HID: appletb-kbd: fix memory corruption of input\_handler\_list

In appletb\_kbd\_probe an input handler is initialised and then registered
with input core through input\_register\_handler(). When this happens input
core will add the input handler (specifically its node) to the global
input\_handler\_list. The input\_handler\_list is central to the functionality
of input core and is traversed in various places in input core. An example
of this is when a new input device is plugged in and gets registered with
input core.

The input\_handler in probe is allocated as device managed memory. If a
probe failure occurs after input\_register\_handler() the input\_handler
memory is freed, yet it will remain in the input\_handler\_list. This
effectively means the input\_handler\_list contains a dangling pointer
to data belonging to a freed input handler.

This causes an issue when any other input device is plugged in - in my
case I had an old PixArt HP USB optical mouse and I decided to
plug it in after a failure occurred after input\_register\_handler().
This lead to the registration of this input device via
input\_register\_device which involves traversing over every handler
in the corrupted input\_handler\_list and calling input\_attach\_handler(),
giving each handler a chance to bind to newly registered device.

The core of this bug is a UAF which causes memory corruption of
input\_handler\_list and to fix it we must ensure the input handler is
unregistered from input core, this is done through
input\_unregister\_handler().

\[   63.191597\] ==================================================================
\[   63.192094\] BUG: KASAN: slab-use-after-free in input\_attach\_handler.isra.0+0x1a9/0x1e0
\[   63.192094\] Read of size 8 at addr ffff888105ea7c80 by task kworker/0:2/54
\[   63.192094\]
\[   63.192094\] CPU: 0 UID: 0 PID: 54 Comm: kworker/0:2 Not tainted 6.16.0-rc2-00321-g2aa6621d
\[   63.192094\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.164
\[   63.192094\] Workqueue: usb\_hub\_wq hub\_event
\[   63.192094\] Call Trace:
\[   63.192094\]  \<TASK\>
\[   63.192094\]  dump\_stack\_lvl+0x53/0x70
\[   63.192094\]  print\_report+0xce/0x670
\[   63.192094\]  kasan\_report+0xce/0x100
\[   63.192094\]  input\_attach\_handler.isra.0+0x1a9/0x1e0
\[   63.192094\]  input\_register\_device+0x76c/0xd00
\[   63.192094\]  hidinput\_connect+0x686d/0xad60
\[   63.192094\]  hid\_connect+0xf20/0x1b10
\[   63.192094\]  hid\_hw\_start+0x83/0x100
\[   63.192094\]  hid\_device\_probe+0x2d1/0x680
\[   63.192094\]  really\_probe+0x1c3/0x690
\[   63.192094\]  \_\_driver\_probe\_device+0x247/0x300
\[   63.192094\]  driver\_probe\_device+0x49/0x210
\[   63.192094\]  \_\_device\_attach\_driver+0x160/0x320
\[   63.192094\]  bus\_for\_each\_drv+0x10f/0x190
\[   63.192094\]  \_\_device\_attach+0x18e/0x370
\[   63.192094\]  bus\_probe\_device+0x123/0x170
\[   63.192094\]  device\_add+0xd4d/0x1460
\[   63.192094\]  hid\_add\_device+0x30b/0x910
\[   63.192094\]  usbhid\_probe+0x920/0xe00
\[   63.192094\]  usb\_probe\_interface+0x363/0x9a0
\[   63.192094\]  really\_probe+0x1c3/0x690
\[   63.192094\]  \_\_driver\_probe\_device+0x247/0x300
\[   63.192094\]  driver\_probe\_device+0x49/0x210
\[   63.192094\]  \_\_device\_attach\_driver+0x160/0x320
\[   63.192094\]  bus\_for\_each\_drv+0x10f/0x190
\[   63.192094\]  \_\_device\_attach+0x18e/0x370
\[   63.192094\]  bus\_probe\_device+0x123/0x170
\[   63.192094\]  device\_add+0xd4d/0x1460
\[   63.192094\]  usb\_set\_configuration+0xd14/0x1880
\[   63.192094\]  usb\_generic\_driver\_probe+0x78/0xb0
\[   63.192094\]  usb\_probe\_device+0xaa/0x2e0
\[   63.192094\]  really\_probe+0x1c3/0x690
\[   63.192094\]  \_\_driver\_probe\_device+0x247/0x300
\[   63.192094\]  driver\_probe\_device+0x49/0x210
\[   63.192094\]  \_\_device\_attach\_driver+0x160/0x320
\[   63.192094\]  bus\_for\_each\_drv+0x10f/0x190
\[   63.192094\]  \_\_device\_attach+0x18e/0x370
\[   63.192094\]  bus\_probe\_device+0x123/0x170
\[   63.192094\]  device\_add+0xd4d/0x1460
\[   63.192094\]  usb\_new\_device+0x7b4/0x1000
\[   63.192094\]  hub\_event+0x234d/0x3
---truncated---

## Affected and fixed versions

- Linux: \>= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, \< 6ad40b07e15c29712d9a4b8096914ccd82e3fc17; \>= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, \< c80f2b047d5cc42fbd2dff9d1942d4ba7545100f (cvelist)
- Linux: 6.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38394.md
Affected: Linux >= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, < 6ad40b07e15c29712d9a4b8096914ccd82e3fc17; >= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, < c80f2b047d5cc42fbd2dff9d1942d4ba7545100f; Linux 6.15
Fixed in: Linux 6ad40b07e15c29712d9a4b8096914ccd82e3fc17

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-2025-38394 being exploited?

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

### How serious is CVE-2025-38394?

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

### Which versions are affected by CVE-2025-38394?

Linux \>= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, \< 6ad40b07e15c29712d9a4b8096914ccd82e3fc17; \>= 7d62ba8deacf94f546a0b9dd9bc86617343187a3, \< c80f2b047d5cc42fbd2dff9d1942d4ba7545100f; Linux 6.15.

### Is there a fix for CVE-2025-38394?

Yes. Fixed in Linux 6ad40b07e15c29712d9a4b8096914ccd82e3fc17. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-38394?

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/6ad40b07e15c29712d9a4b8096914ccd82e3fc17>
- patch: <https://git.kernel.org/stable/c/c80f2b047d5cc42fbd2dff9d1942d4ba7545100f>

## 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-2025-38394>

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