# CVE-2025-40037: fbdev: simplefb: Fix use after free in simplefb\_detach\_genpds()

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.27% (percentile 13, 2026-11-26)
- **Published:** 2025-10-28T11:48:18.274Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< b1deb39cfd614fb2f278b71011692a8dbf0f05ba; \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< b6ff0d8de8452ec0e18e5bd7394c2a23e7ff7353; \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< da1bb9135213744e7ec398826c8f2e843de4fb94
- Anyone running Linux 6.8

## Description

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

fbdev: simplefb: Fix use after free in simplefb\_detach\_genpds()

The pm\_domain cleanup can not be devres managed as it uses struct
simplefb\_par which is allocated within struct fb\_info by
framebuffer\_alloc(). This allocation is explicitly freed by
unregister\_framebuffer() in simplefb\_remove().
Devres managed cleanup runs after the device remove call and thus can no
longer access struct simplefb\_par.
Call simplefb\_detach\_genpds() explicitly from simplefb\_destroy() like
the cleanup functions for clocks and regulators.

Fixes an use after free on M2 Mac mini during
aperture\_remove\_conflicting\_devices() using the downstream asahi kernel
with Debian's kernel config. For unknown reasons this started to
consistently dereference an invalid pointer in v6.16.3 based kernels.

\[    6.736134\] BUG: KASAN: slab-use-after-free in simplefb\_detach\_genpds+0x58/0x220
\[    6.743545\] Read of size 4 at addr ffff8000304743f0 by task (udev-worker)/227
\[    6.750697\]
\[    6.752182\] CPU: 6 UID: 0 PID: 227 Comm: (udev-worker) Tainted: G S                  6.16.3-asahi+ \#16 PREEMPTLAZY
\[    6.752186\] Tainted: \[S\]=CPU\_OUT\_OF\_SPEC
\[    6.752187\] Hardware name: Apple Mac mini (M2, 2023) (DT)
\[    6.752189\] Call trace:
\[    6.752190\]  show\_stack+0x34/0x98 (C)
\[    6.752194\]  dump\_stack\_lvl+0x60/0x80
\[    6.752197\]  print\_report+0x17c/0x4d8
\[    6.752201\]  kasan\_report+0xb4/0x100
\[    6.752206\]  \_\_asan\_report\_load4\_noabort+0x20/0x30
\[    6.752209\]  simplefb\_detach\_genpds+0x58/0x220
\[    6.752213\]  devm\_action\_release+0x50/0x98
\[    6.752216\]  release\_nodes+0xd0/0x2c8
\[    6.752219\]  devres\_release\_all+0xfc/0x178
\[    6.752221\]  device\_unbind\_cleanup+0x28/0x168
\[    6.752224\]  device\_release\_driver\_internal+0x34c/0x470
\[    6.752228\]  device\_release\_driver+0x20/0x38
\[    6.752231\]  bus\_remove\_device+0x1b0/0x380
\[    6.752234\]  device\_del+0x314/0x820
\[    6.752238\]  platform\_device\_del+0x3c/0x1e8
\[    6.752242\]  platform\_device\_unregister+0x20/0x50
\[    6.752246\]  aperture\_detach\_platform\_device+0x1c/0x30
\[    6.752250\]  aperture\_detach\_devices+0x16c/0x290
\[    6.752253\]  aperture\_remove\_conflicting\_devices+0x34/0x50
...
\[    6.752343\]
\[    6.967409\] Allocated by task 62:
\[    6.970724\]  kasan\_save\_stack+0x3c/0x70
\[    6.974560\]  kasan\_save\_track+0x20/0x40
\[    6.978397\]  kasan\_save\_alloc\_info+0x40/0x58
\[    6.982670\]  \_\_kasan\_kmalloc+0xd4/0xd8
\[    6.986420\]  \_\_kmalloc\_noprof+0x194/0x540
\[    6.990432\]  framebuffer\_alloc+0xc8/0x130
\[    6.994444\]  simplefb\_probe+0x258/0x2378
...
\[    7.054356\]
\[    7.055838\] Freed by task 227:
\[    7.058891\]  kasan\_save\_stack+0x3c/0x70
\[    7.062727\]  kasan\_save\_track+0x20/0x40
\[    7.066565\]  kasan\_save\_free\_info+0x4c/0x80
\[    7.070751\]  \_\_kasan\_slab\_free+0x6c/0xa0
\[    7.074675\]  kfree+0x10c/0x380
\[    7.077727\]  framebuffer\_release+0x5c/0x90
\[    7.081826\]  simplefb\_destroy+0x1b4/0x2c0
\[    7.085837\]  put\_fb\_info+0x98/0x100
\[    7.089326\]  unregister\_framebuffer+0x178/0x320
\[    7.093861\]  simplefb\_remove+0x3c/0x60
\[    7.097611\]  platform\_remove+0x60/0x98
\[    7.101361\]  device\_remove+0xb8/0x160
\[    7.105024\]  device\_release\_driver\_internal+0x2fc/0x470
\[    7.110256\]  device\_release\_driver+0x20/0x38
\[    7.114529\]  bus\_remove\_device+0x1b0/0x380
\[    7.118628\]  device\_del+0x314/0x820
\[    7.122116\]  platform\_device\_del+0x3c/0x1e8
\[    7.126302\]  platform\_device\_unregister+0x20/0x50
\[    7.131012\]  aperture\_detach\_platform\_device+0x1c/0x30
\[    7.136157\]  aperture\_detach\_devices+0x16c/0x290
\[    7.140779\]  aperture\_remove\_conflicting\_devices+0x34/0x50
...

## Affected and fixed versions

- Linux: \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< b1deb39cfd614fb2f278b71011692a8dbf0f05ba; \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< b6ff0d8de8452ec0e18e5bd7394c2a23e7ff7353; \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< da1bb9135213744e7ec398826c8f2e843de4fb94 (cvelist)
- Linux: 6.8 (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-40037. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40037.md
Affected: Linux >= 92a511a568e44cf11681a2223cae4d576a1a515d, < b1deb39cfd614fb2f278b71011692a8dbf0f05ba; >= 92a511a568e44cf11681a2223cae4d576a1a515d, < b6ff0d8de8452ec0e18e5bd7394c2a23e7ff7353; >= 92a511a568e44cf11681a2223cae4d576a1a515d, < da1bb9135213744e7ec398826c8f2e843de4fb94; Linux 6.8
Fixed in: no fixed version listed yet

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

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< b1deb39cfd614fb2f278b71011692a8dbf0f05ba; \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< b6ff0d8de8452ec0e18e5bd7394c2a23e7ff7353; \>= 92a511a568e44cf11681a2223cae4d576a1a515d, \< da1bb9135213744e7ec398826c8f2e843de4fb94; Linux 6.8.

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

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/b1deb39cfd614fb2f278b71011692a8dbf0f05ba>
- other: <https://git.kernel.org/stable/c/b6ff0d8de8452ec0e18e5bd7394c2a23e7ff7353>
- other: <https://git.kernel.org/stable/c/da1bb9135213744e7ec398826c8f2e843de4fb94>

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

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