# CVE-2025-38557: HID: apple: validate feature-report field count to prevent NULL pointer dereference

> 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, NVD) `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.26% (percentile 11, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-08-19T17:02:35.641Z
- **Modified:** 2026-11-05T22:17:18.180Z

## Who should check

- Anyone running Linux \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< ba08cc6801ec5fb98f2d02b5f0c614c931845325; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 7e15d1eaa88179c5185e57a38ab05fe852d0cb8d; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 00896c3f41cb6b74fec853386076115ba50baf0a; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 1bb3363da862e0464ec050eea2fb5472a36ad86b
- Anyone running Linux 6.11

## Description

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

HID: apple: validate feature-report field count to prevent NULL pointer dereference

A malicious HID device with quirk APPLE\_MAGIC\_BACKLIGHT can trigger a NULL
pointer dereference whilst the power feature-report is toggled and sent to
the device in apple\_magic\_backlight\_report\_set(). The power feature-report
is expected to have two data fields, but if the descriptor declares one
field then accessing field\[1\] and dereferencing it in
apple\_magic\_backlight\_report\_set() becomes invalid
since field\[1\] will be NULL.

An example of a minimal descriptor which can cause the crash is something
like the following where the report with ID 3 (power report) only
references a single 1-byte field. When hid core parses the descriptor it
will encounter the final feature tag, allocate a hid\_report (all members
of field\[\] will be zeroed out), create field structure and populate it,
increasing the maxfield to 1. The subsequent field\[1\] access and
dereference causes the crash.

  Usage Page (Vendor Defined 0xFF00)
  Usage (0x0F)
  Collection (Application)
    Report ID (1)
    Usage (0x01)
    Logical Minimum (0)
    Logical Maximum (255)
    Report Size (8)
    Report Count (1)
    Feature (Data,Var,Abs)

    Usage (0x02)
    Logical Maximum (32767)
    Report Size (16)
    Report Count (1)
    Feature (Data,Var,Abs)

    Report ID (3)
    Usage (0x03)
    Logical Minimum (0)
    Logical Maximum (1)
    Report Size (8)
    Report Count (1)
    Feature (Data,Var,Abs)
  End Collection

Here we see the KASAN splat when the kernel dereferences the
NULL pointer and crashes:

  \[   15.164723\] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 \[\#1\] SMP KASAN NOPTI
  \[   15.165691\] KASAN: null-ptr-deref in range \[0x0000000000000030-0x0000000000000037\]
  \[   15.165691\] CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.15.0 \#31 PREEMPT(voluntary)
  \[   15.165691\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
  \[   15.165691\] RIP: 0010:apple\_magic\_backlight\_report\_set+0xbf/0x210
  \[   15.165691\] Call Trace:
  \[   15.165691\]  \<TASK\>
  \[   15.165691\]  apple\_probe+0x571/0xa20
  \[   15.165691\]  hid\_device\_probe+0x2e2/0x6f0
  \[   15.165691\]  really\_probe+0x1ca/0x5c0
  \[   15.165691\]  \_\_driver\_probe\_device+0x24f/0x310
  \[   15.165691\]  driver\_probe\_device+0x4a/0xd0
  \[   15.165691\]  \_\_device\_attach\_driver+0x169/0x220
  \[   15.165691\]  bus\_for\_each\_drv+0x118/0x1b0
  \[   15.165691\]  \_\_device\_attach+0x1d5/0x380
  \[   15.165691\]  device\_initial\_probe+0x12/0x20
  \[   15.165691\]  bus\_probe\_device+0x13d/0x180
  \[   15.165691\]  device\_add+0xd87/0x1510
  \[...\]

To fix this issue we should validate the number of fields that the
backlight and power reports have and if they do not have the required
number of fields then bail.

## Affected and fixed versions

- Linux: \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< ba08cc6801ec5fb98f2d02b5f0c614c931845325; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 7e15d1eaa88179c5185e57a38ab05fe852d0cb8d; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 00896c3f41cb6b74fec853386076115ba50baf0a; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 1bb3363da862e0464ec050eea2fb5472a36ad86b (cvelist)
- Linux: 6.11 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-38557.md
Affected: Linux >= 394ba612f9419ec5bfebbffb72212fd3b2094986, < ba08cc6801ec5fb98f2d02b5f0c614c931845325; >= 394ba612f9419ec5bfebbffb72212fd3b2094986, < 7e15d1eaa88179c5185e57a38ab05fe852d0cb8d; >= 394ba612f9419ec5bfebbffb72212fd3b2094986, < 00896c3f41cb6b74fec853386076115ba50baf0a; >= 394ba612f9419ec5bfebbff…
Fixed in: Linux 7e15d1eaa88179c5185e57a38ab05fe852d0cb8d, Linux 00896c3f41cb6b74fec853386076115ba50baf0a, Linux 1bb3363da862e0464ec050eea2fb5472a36ad86b

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

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

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

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

Linux \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< ba08cc6801ec5fb98f2d02b5f0c614c931845325; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 7e15d1eaa88179c5185e57a38ab05fe852d0cb8d; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 00896c3f41cb6b74fec853386076115ba50baf0a; \>= 394ba612f9419ec5bfebbffb72212fd3b2094986, \< 1bb3363da862e0464ec050eea2fb5472a36ad86b; Linux 6.11.

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

Yes. Fixed in Linux 7e15d1eaa88179c5185e57a38ab05fe852d0cb8d, Linux 00896c3f41cb6b74fec853386076115ba50baf0a, Linux 1bb3363da862e0464ec050eea2fb5472a36ad86b. Upgrade Linux to 1bb3363da862e0464ec050eea2fb5472a36ad86b or later.

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

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/ba08cc6801ec5fb98f2d02b5f0c614c931845325>
- patch: <https://git.kernel.org/stable/c/7e15d1eaa88179c5185e57a38ab05fe852d0cb8d>
- patch: <https://git.kernel.org/stable/c/00896c3f41cb6b74fec853386076115ba50baf0a>
- patch: <https://git.kernel.org/stable/c/1bb3363da862e0464ec050eea2fb5472a36ad86b>

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

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