# CVE-2025-38378: HID: appletb-kbd: fix slab use-after-free bug in appletb\_kbd\_probe

> 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-416
- **Published:** 2025-07-25T12:53:20.144Z
- **Modified:** 2026-06-17T09:16:44.343Z

## Who should check

- Anyone running Linux \>= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, \< 51720dee3a61ebace36c3dcdd0b4a488e0970f29; \>= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, \< 38224c472a038fa9ccd4085511dd9f3d6119dbf9
- Anyone running Linux 6.15

## Description

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

HID: appletb-kbd: fix slab use-after-free bug in appletb\_kbd\_probe

In probe appletb\_kbd\_probe() a "struct appletb\_kbd \*kbd" is allocated
via devm\_kzalloc() to store touch bar keyboard related data.
Later on if backlight\_device\_get\_by\_name() finds a backlight device
with name "appletb\_backlight" a timer (kbd-\>inactivity\_timer) is setup
with appletb\_inactivity\_timer() and the timer is armed to run after
appletb\_tb\_dim\_timeout (60) seconds.

A use-after-free is triggered when failure occurs after the timer is
armed. This ultimately means probe failure occurs and as a result the
"struct appletb\_kbd \*kbd" which is device managed memory is freed.
After 60 seconds the timer will have expired and \_\_run\_timers will
attempt to access the timer (kbd-\>inactivity\_timer) however the kdb
structure has been freed causing a use-after free.

\[   71.636938\] ==================================================================
\[   71.637915\] BUG: KASAN: slab-use-after-free in \_\_run\_timers+0x7ad/0x890
\[   71.637915\] Write of size 8 at addr ffff8881178c5958 by task swapper/1/0
\[   71.637915\]
\[   71.637915\] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.16.0-rc2-00318-g739a6c93cc75-dirty \#12 PREEMPT(voluntary)
\[   71.637915\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
\[   71.637915\] Call Trace:
\[   71.637915\]  \<IRQ\>
\[   71.637915\]  dump\_stack\_lvl+0x53/0x70
\[   71.637915\]  print\_report+0xce/0x670
\[   71.637915\]  ? \_\_run\_timers+0x7ad/0x890
\[   71.637915\]  kasan\_report+0xce/0x100
\[   71.637915\]  ? \_\_run\_timers+0x7ad/0x890
\[   71.637915\]  \_\_run\_timers+0x7ad/0x890
\[   71.637915\]  ? \_\_pfx\_\_\_run\_timers+0x10/0x10
\[   71.637915\]  ? update\_process\_times+0xfc/0x190
\[   71.637915\]  ? \_\_pfx\_update\_process\_times+0x10/0x10
\[   71.637915\]  ? \_raw\_spin\_lock\_irq+0x80/0xe0
\[   71.637915\]  ? \_raw\_spin\_lock\_irq+0x80/0xe0
\[   71.637915\]  ? \_\_pfx\_\_raw\_spin\_lock\_irq+0x10/0x10
\[   71.637915\]  run\_timer\_softirq+0x141/0x240
\[   71.637915\]  ? \_\_pfx\_run\_timer\_softirq+0x10/0x10
\[   71.637915\]  ? \_\_pfx\_\_\_hrtimer\_run\_queues+0x10/0x10
\[   71.637915\]  ? kvm\_clock\_get\_cycles+0x18/0x30
\[   71.637915\]  ? ktime\_get+0x60/0x140
\[   71.637915\]  handle\_softirqs+0x1b8/0x5c0
\[   71.637915\]  ? \_\_pfx\_handle\_softirqs+0x10/0x10
\[   71.637915\]  irq\_exit\_rcu+0xaf/0xe0
\[   71.637915\]  sysvec\_apic\_timer\_interrupt+0x6c/0x80
\[   71.637915\]  \</IRQ\>
\[   71.637915\]
\[   71.637915\] Allocated by task 39:
\[   71.637915\]  kasan\_save\_stack+0x33/0x60
\[   71.637915\]  kasan\_save\_track+0x14/0x30
\[   71.637915\]  \_\_kasan\_kmalloc+0x8f/0xa0
\[   71.637915\]  \_\_kmalloc\_node\_track\_caller\_noprof+0x195/0x420
\[   71.637915\]  devm\_kmalloc+0x74/0x1e0
\[   71.637915\]  appletb\_kbd\_probe+0x37/0x3c0
\[   71.637915\]  hid\_device\_probe+0x2d1/0x680
\[   71.637915\]  really\_probe+0x1c3/0x690
\[   71.637915\]  \_\_driver\_probe\_device+0x247/0x300
\[   71.637915\]  driver\_probe\_device+0x49/0x210
\[...\]
\[   71.637915\]
\[   71.637915\] Freed by task 39:
\[   71.637915\]  kasan\_save\_stack+0x33/0x60
\[   71.637915\]  kasan\_save\_track+0x14/0x30
\[   71.637915\]  kasan\_save\_free\_info+0x3b/0x60
\[   71.637915\]  \_\_kasan\_slab\_free+0x37/0x50
\[   71.637915\]  kfree+0xcf/0x360
\[   71.637915\]  devres\_release\_group+0x1f8/0x3c0
\[   71.637915\]  hid\_device\_probe+0x315/0x680
\[   71.637915\]  really\_probe+0x1c3/0x690
\[   71.637915\]  \_\_driver\_probe\_device+0x247/0x300
\[   71.637915\]  driver\_probe\_device+0x49/0x210
\[...\]

The root cause of the issue is that the timer is not disarmed
on failure paths leading to it remaining active and accessing
freed memory. To fix this call timer\_delete\_sync() to deactivate
the timer.

Another small issue is that timer\_delete\_sync is called
unconditionally in appletb\_kbd\_remove(), fix this by checking
for a valid kbd-\>backlight\_dev before calling timer\_delete\_sync.

## Affected and fixed versions

- Linux: \>= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, \< 51720dee3a61ebace36c3dcdd0b4a488e0970f29; \>= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, \< 38224c472a038fa9ccd4085511dd9f3d6119dbf9 (cvelist)
- Linux: 6.15 (cvelist)

## Mitigation

- Upgrade Linux to 38224c472a038fa9ccd4085511dd9f3d6119dbf9 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38378.md
Affected: Linux >= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, < 51720dee3a61ebace36c3dcdd0b4a488e0970f29; >= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, < 38224c472a038fa9ccd4085511dd9f3d6119dbf9; Linux 6.15
Fixed in: Linux 51720dee3a61ebace36c3dcdd0b4a488e0970f29, Linux 38224c472a038fa9ccd4085511dd9f3d6119dbf9

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-38378 being exploited?

There is no confirmed exploitation: CVE-2025-38378 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-38378?

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

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

Linux \>= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, \< 51720dee3a61ebace36c3dcdd0b4a488e0970f29; \>= 93a0fc48948107e0cc34e1de22c3cb363a8f2783, \< 38224c472a038fa9ccd4085511dd9f3d6119dbf9; Linux 6.15.

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

Yes. Fixed in Linux 51720dee3a61ebace36c3dcdd0b4a488e0970f29, Linux 38224c472a038fa9ccd4085511dd9f3d6119dbf9. Upgrade Linux to 38224c472a038fa9ccd4085511dd9f3d6119dbf9 or later.

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

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/51720dee3a61ebace36c3dcdd0b4a488e0970f29>
- patch: <https://git.kernel.org/stable/c/38224c472a038fa9ccd4085511dd9f3d6119dbf9>

## 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-38378>

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