# CVE-2025-21948: HID: appleir: Fix potential NULL dereference at raw event handle

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; 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.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-04-01T15:41:09.949Z
- **Modified:** 2026-06-17T08:44:41.057Z

## Who should check

- Anyone running Linux \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 6db423b00940b05df2a1265d3c7eabafe9f1734c; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 0df1ac8ee417ad76760ff076faa4518a4d861894; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< b1d95d733cd6e74f595653daddcfc357bea461e8; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 8d39eb8c5e14f2f0f441eed832ef8a7b654e6fee; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< fc69e2c3219d433caabba4b5d6371ba726a4b37f; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< d335fce8b88b2353f4bb20c631698e20384e3610; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 68cdf6710f228dfd74f66ec61fbe636da2646a73; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1
- Anyone running Linux 3.10

## Description

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

HID: appleir: Fix potential NULL dereference at raw event handle

Syzkaller reports a NULL pointer dereference issue in input\_event().

BUG: KASAN: null-ptr-deref in instrument\_atomic\_read include/linux/instrumented.h:68 \[inline\]
BUG: KASAN: null-ptr-deref in \_test\_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 \[inline\]
BUG: KASAN: null-ptr-deref in is\_event\_supported drivers/input/input.c:67 \[inline\]
BUG: KASAN: null-ptr-deref in input\_event+0x42/0xa0 drivers/input/input.c:395
Read of size 8 at addr 0000000000000028 by task syz-executor199/2949

CPU: 0 UID: 0 PID: 2949 Comm: syz-executor199 Not tainted 6.13.0-rc4-syzkaller-00076-gf097a36ef88d \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 \<IRQ\>
 \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
 dump\_stack\_lvl+0x116/0x1f0 lib/dump\_stack.c:120
 kasan\_report+0xd9/0x110 mm/kasan/report.c:602
 check\_region\_inline mm/kasan/generic.c:183 \[inline\]
 kasan\_check\_range+0xef/0x1a0 mm/kasan/generic.c:189
 instrument\_atomic\_read include/linux/instrumented.h:68 \[inline\]
 \_test\_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 \[inline\]
 is\_event\_supported drivers/input/input.c:67 \[inline\]
 input\_event+0x42/0xa0 drivers/input/input.c:395
 input\_report\_key include/linux/input.h:439 \[inline\]
 key\_down drivers/hid/hid-appleir.c:159 \[inline\]
 appleir\_raw\_event+0x3e5/0x5e0 drivers/hid/hid-appleir.c:232
 \_\_hid\_input\_report.constprop.0+0x312/0x440 drivers/hid/hid-core.c:2111
 hid\_ctrl+0x49f/0x550 drivers/hid/usbhid/hid-core.c:484
 \_\_usb\_hcd\_giveback\_urb+0x389/0x6e0 drivers/usb/core/hcd.c:1650
 usb\_hcd\_giveback\_urb+0x396/0x450 drivers/usb/core/hcd.c:1734
 dummy\_timer+0x17f7/0x3960 drivers/usb/gadget/udc/dummy\_hcd.c:1993
 \_\_run\_hrtimer kernel/time/hrtimer.c:1739 \[inline\]
 \_\_hrtimer\_run\_queues+0x20a/0xae0 kernel/time/hrtimer.c:1803
 hrtimer\_run\_softirq+0x17d/0x350 kernel/time/hrtimer.c:1820
 handle\_softirqs+0x206/0x8d0 kernel/softirq.c:561
 \_\_do\_softirq kernel/softirq.c:595 \[inline\]
 invoke\_softirq kernel/softirq.c:435 \[inline\]
 \_\_irq\_exit\_rcu+0xfa/0x160 kernel/softirq.c:662
 irq\_exit\_rcu+0x9/0x30 kernel/softirq.c:678
 instr\_sysvec\_apic\_timer\_interrupt arch/x86/kernel/apic/apic.c:1049 \[inline\]
 sysvec\_apic\_timer\_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1049
 \</IRQ\>
 \<TASK\>
 asm\_sysvec\_apic\_timer\_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
 \_\_mod\_timer+0x8f6/0xdc0 kernel/time/timer.c:1185
 add\_timer+0x62/0x90 kernel/time/timer.c:1295
 schedule\_timeout+0x11f/0x280 kernel/time/sleep\_timeout.c:98
 usbhid\_wait\_io+0x1c7/0x380 drivers/hid/usbhid/hid-core.c:645
 usbhid\_init\_reports+0x19f/0x390 drivers/hid/usbhid/hid-core.c:784
 hiddev\_ioctl+0x1133/0x15b0 drivers/hid/usbhid/hiddev.c:794
 vfs\_ioctl fs/ioctl.c:51 \[inline\]
 \_\_do\_sys\_ioctl fs/ioctl.c:906 \[inline\]
 \_\_se\_sys\_ioctl fs/ioctl.c:892 \[inline\]
 \_\_x64\_sys\_ioctl+0x190/0x200 fs/ioctl.c:892
 do\_syscall\_x64 arch/x86/entry/common.c:52 \[inline\]
 do\_syscall\_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
 \</TASK\>

This happens due to the malformed report items sent by the emulated device
which results in a report, that has no fields, being added to the report list.
Due to this appleir\_input\_configured() is never called, hidinput\_connect()
fails which results in the HID\_CLAIMED\_INPUT flag is not being set. However,
it  does not make appleir\_probe() fail and lets the event callback to be
called without the associated input device.

Thus, add a check for the HID\_CLAIMED\_INPUT flag and leave the event hook
early if the driver didn't claim any input\_dev for some reason. Moreover,
some other hid drivers accessing input\_dev in their event callbacks do have
similar checks, too.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

## Affected and fixed versions

- Linux: \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 6db423b00940b05df2a1265d3c7eabafe9f1734c; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 0df1ac8ee417ad76760ff076faa4518a4d861894; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< b1d95d733cd6e74f595653daddcfc357bea461e8; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 8d39eb8c5e14f2f0f441eed832ef8a7b654e6fee; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< fc69e2c3219d433caabba4b5d6371ba726a4b37f; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< d335fce8b88b2353f4bb20c631698e20384e3610; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 68cdf6710f228dfd74f66ec61fbe636da2646a73; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1 (cvelist)
- Linux: 3.10 (cvelist)

## Mitigation

- Upgrade Linux to 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1 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-21948. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21948.md
Affected: Linux >= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, < 6db423b00940b05df2a1265d3c7eabafe9f1734c; >= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, < 0df1ac8ee417ad76760ff076faa4518a4d861894; >= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, < b1d95d733cd6e74f595653daddcfc357bea461e8; >= 9a4a5574ce427c364d81746…
Fixed in: Linux 6db423b00940b05df2a1265d3c7eabafe9f1734c, Linux 0df1ac8ee417ad76760ff076faa4518a4d861894, Linux 8d39eb8c5e14f2f0f441eed832ef8a7b654e6fee, Linux 68cdf6710f228dfd74f66ec61fbe636da2646a73, Linux 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1

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

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

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

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 6db423b00940b05df2a1265d3c7eabafe9f1734c; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 0df1ac8ee417ad76760ff076faa4518a4d861894; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< b1d95d733cd6e74f595653daddcfc357bea461e8; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 8d39eb8c5e14f2f0f441eed832ef8a7b654e6fee; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< fc69e2c3219d433caabba4b5d6371ba726a4b37f; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< d335fce8b88b2353f4bb20c631698e20384e3610; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 68cdf6710f228dfd74f66ec61fbe636da2646a73; \>= 9a4a5574ce427c364d81746fc7fb82d86b5f1a7e, \< 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1; Linux 3.10.

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

Yes. Fixed in Linux 6db423b00940b05df2a1265d3c7eabafe9f1734c, Linux 0df1ac8ee417ad76760ff076faa4518a4d861894, Linux 8d39eb8c5e14f2f0f441eed832ef8a7b654e6fee, Linux 68cdf6710f228dfd74f66ec61fbe636da2646a73, Linux 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1. Upgrade Linux to 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1 or later.

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

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/6db423b00940b05df2a1265d3c7eabafe9f1734c>
- patch: <https://git.kernel.org/stable/c/0df1ac8ee417ad76760ff076faa4518a4d861894>
- patch: <https://git.kernel.org/stable/c/b1d95d733cd6e74f595653daddcfc357bea461e8>
- patch: <https://git.kernel.org/stable/c/8d39eb8c5e14f2f0f441eed832ef8a7b654e6fee>
- patch: <https://git.kernel.org/stable/c/fc69e2c3219d433caabba4b5d6371ba726a4b37f>
- patch: <https://git.kernel.org/stable/c/d335fce8b88b2353f4bb20c631698e20384e3610>
- patch: <https://git.kernel.org/stable/c/68cdf6710f228dfd74f66ec61fbe636da2646a73>
- patch: <https://git.kernel.org/stable/c/2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>

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

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