# CVE-2023-53235: drm/tests: helpers: Avoid a driver uaf

> 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, CNA) `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.22% (percentile 8, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-09-15T14:22:08.322Z
- **Modified:** 2026-06-17T06:44:35.293Z

## Who should check

- Anyone running Linux \>= d98780310719bf4076d975c2ff65c44c7c0d929e, \< c9d8be0e533738b744abb669263c4750d4830009; \>= d98780310719bf4076d975c2ff65c44c7c0d929e, \< 139a27854bf5ce93ff9805f9f7683b88c13074dc
- Anyone running Linux 6.3

## Description

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

drm/tests: helpers: Avoid a driver uaf

when using \_\_drm\_kunit\_helper\_alloc\_drm\_device() the driver may be
dereferenced by device-managed resources up until the device is
freed, which is typically later than the kunit-managed resource code
frees it. Fix this by simply make the driver device-managed as well.

In short, the sequence leading to the UAF is as follows:

INIT:
Code allocates a struct device as a kunit-managed resource.
Code allocates a drm driver as a kunit-managed resource.
Code allocates a drm device as a device-managed resource.

EXIT:
Kunit resource cleanup frees the drm driver
Kunit resource cleanup puts the struct device, which starts a
      device-managed resource cleanup
device-managed cleanup calls drm\_dev\_put()
drm\_dev\_put() dereferences the (now freed) drm driver -\> Boom.

Related KASAN message:
\[55272.551542\] ==================================================================
\[55272.551551\] BUG: KASAN: slab-use-after-free in drm\_dev\_put.part.0+0xd4/0xe0 \[drm\]
\[55272.551603\] Read of size 8 at addr ffff888127502828 by task kunit\_try\_catch/10353

\[55272.551612\] CPU: 4 PID: 10353 Comm: kunit\_try\_catch Tainted: G     U           N 6.5.0-rc7+ \#155
\[55272.551620\] Hardware name: ASUS System Product Name/PRIME B560M-A AC, BIOS 0403 01/26/2021
\[55272.551626\] Call Trace:
\[55272.551629\]  \<TASK\>
\[55272.551633\]  dump\_stack\_lvl+0x57/0x90
\[55272.551639\]  print\_report+0xcf/0x630
\[55272.551645\]  ? \_raw\_spin\_lock\_irqsave+0x5f/0x70
\[55272.551652\]  ? drm\_dev\_put.part.0+0xd4/0xe0 \[drm\]
\[55272.551694\]  kasan\_report+0xd7/0x110
\[55272.551699\]  ? drm\_dev\_put.part.0+0xd4/0xe0 \[drm\]
\[55272.551742\]  drm\_dev\_put.part.0+0xd4/0xe0 \[drm\]
\[55272.551783\]  devres\_release\_all+0x15d/0x1f0
\[55272.551790\]  ? \_\_pfx\_devres\_release\_all+0x10/0x10
\[55272.551797\]  device\_unbind\_cleanup+0x16/0x1a0
\[55272.551802\]  device\_release\_driver\_internal+0x3e5/0x540
\[55272.551808\]  ? kobject\_put+0x5d/0x4b0
\[55272.551814\]  bus\_remove\_device+0x1f1/0x3f0
\[55272.551819\]  device\_del+0x342/0x910
\[55272.551826\]  ? \_\_pfx\_device\_del+0x10/0x10
\[55272.551830\]  ? lock\_release+0x339/0x5e0
\[55272.551836\]  ? kunit\_remove\_resource+0x128/0x290 \[kunit\]
\[55272.551845\]  ? \_\_pfx\_lock\_release+0x10/0x10
\[55272.551851\]  platform\_device\_del.part.0+0x1f/0x1e0
\[55272.551856\]  ? \_raw\_spin\_unlock\_irqrestore+0x30/0x60
\[55272.551863\]  kunit\_remove\_resource+0x195/0x290 \[kunit\]
\[55272.551871\]  ? \_raw\_spin\_unlock\_irqrestore+0x30/0x60
\[55272.551877\]  kunit\_cleanup+0x78/0x120 \[kunit\]
\[55272.551885\]  ? \_\_kthread\_parkme+0xc1/0x1f0
\[55272.551891\]  ? \_\_pfx\_kunit\_try\_run\_case\_cleanup+0x10/0x10 \[kunit\]
\[55272.551900\]  ? \_\_pfx\_kunit\_generic\_run\_threadfn\_adapter+0x10/0x10 \[kunit\]
\[55272.551909\]  kunit\_generic\_run\_threadfn\_adapter+0x4a/0x90 \[kunit\]
\[55272.551919\]  kthread+0x2e7/0x3c0
\[55272.551924\]  ? \_\_pfx\_kthread+0x10/0x10
\[55272.551929\]  ret\_from\_fork+0x2d/0x70
\[55272.551935\]  ? \_\_pfx\_kthread+0x10/0x10
\[55272.551940\]  ret\_from\_fork\_asm+0x1b/0x30
\[55272.551948\]  \</TASK\>

\[55272.551953\] Allocated by task 10351:
\[55272.551956\]  kasan\_save\_stack+0x1c/0x40
\[55272.551962\]  kasan\_set\_track+0x21/0x30
\[55272.551966\]  \_\_kasan\_kmalloc+0x8b/0x90
\[55272.551970\]  \_\_kmalloc+0x5e/0x160
\[55272.551976\]  kunit\_kmalloc\_array+0x1c/0x50 \[kunit\]
\[55272.551984\]  drm\_exec\_test\_init+0xfa/0x2c0 \[drm\_exec\_test\]
\[55272.551991\]  kunit\_try\_run\_case+0xdd/0x250 \[kunit\]
\[55272.551999\]  kunit\_generic\_run\_threadfn\_adapter+0x4a/0x90 \[kunit\]
\[55272.552008\]  kthread+0x2e7/0x3c0
\[55272.552012\]  ret\_from\_fork+0x2d/0x70
\[55272.552017\]  ret\_from\_fork\_asm+0x1b/0x30

\[55272.552024\] Freed by task 10353:
\[55272.552027\]  kasan\_save\_stack+0x1c/0x40
\[55272.552032\]  kasan\_set\_track+0x21/0x30
\[55272.552036\]  kasan\_save\_free\_info+0x27/0x40
\[55272.552041\]  \_\_kasan\_slab\_free+0x106/0x180
\[55272.552046\]  slab\_free\_freelist\_hook+0xb3/0x160
\[55272.552051\]  \_\_kmem\_cache\_free+0xb2/0x290
\[55272.552056\]  kunit\_remove\_resource+0x195/0x290 \[kunit\]
\[55272.552064\]  kunit\_cleanup+0x7
---truncated---

## Affected and fixed versions

- Linux: \>= d98780310719bf4076d975c2ff65c44c7c0d929e, \< c9d8be0e533738b744abb669263c4750d4830009; \>= d98780310719bf4076d975c2ff65c44c7c0d929e, \< 139a27854bf5ce93ff9805f9f7683b88c13074dc (cvelist)
- Linux: 6.3 (cvelist)

## Mitigation

- Upgrade Linux to 139a27854bf5ce93ff9805f9f7683b88c13074dc or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-53235.md
Affected: Linux >= d98780310719bf4076d975c2ff65c44c7c0d929e, < c9d8be0e533738b744abb669263c4750d4830009; >= d98780310719bf4076d975c2ff65c44c7c0d929e, < 139a27854bf5ce93ff9805f9f7683b88c13074dc; Linux 6.3
Fixed in: Linux 139a27854bf5ce93ff9805f9f7683b88c13074dc

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-2023-53235 being exploited?

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

### How serious is CVE-2023-53235?

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

### Which versions are affected by CVE-2023-53235?

Linux \>= d98780310719bf4076d975c2ff65c44c7c0d929e, \< c9d8be0e533738b744abb669263c4750d4830009; \>= d98780310719bf4076d975c2ff65c44c7c0d929e, \< 139a27854bf5ce93ff9805f9f7683b88c13074dc; Linux 6.3.

### Is there a fix for CVE-2023-53235?

Yes. Fixed in Linux 139a27854bf5ce93ff9805f9f7683b88c13074dc. Upgrade Linux to 139a27854bf5ce93ff9805f9f7683b88c13074dc or later.

### How do I check if I'm affected by CVE-2023-53235?

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/c9d8be0e533738b744abb669263c4750d4830009>
- patch: <https://git.kernel.org/stable/c/139a27854bf5ce93ff9805f9f7683b88c13074dc>

## 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-2023-53235>

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