# CVE-2023-52468: class: fix use-after-free in class\_register()

> 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.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-02-25T08:16:32.387Z
- **Modified:** 2026-06-17T06:42:47.330Z

## Who should check

- Anyone running Linux \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< b57196a5ec5e4c0ffecde8348b085b778c7dce04; \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< 0f1486dafca3398c4c46b9f6e6452fa27e73b559; \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< 93ec4a3b76404bce01bd5c9032bef5df6feb1d62
- Anyone running Linux 6.4

## Description

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

class: fix use-after-free in class\_register()

The lock\_class\_key is still registered and can be found in
lock\_keys\_hash hlist after subsys\_private is freed in error
handler path.A task who iterate over the lock\_keys\_hash
later may cause use-after-free.So fix that up and unregister
the lock\_class\_key before kfree(cp).

On our platform, a driver fails to kset\_register because of
creating duplicate filename '/class/xxx'.With Kasan enabled,
it prints a invalid-access bug report.

KASAN bug report:

BUG: KASAN: invalid-access in lockdep\_register\_key+0x19c/0x1bc
Write of size 8 at addr 15ffff808b8c0368 by task modprobe/252
Pointer tag: \[15\], memory tag: \[fe\]

CPU: 7 PID: 252 Comm: modprobe Tainted: G        W
 6.6.0-mainline-maybe-dirty \#1

Call trace:
dump\_backtrace+0x1b0/0x1e4
show\_stack+0x2c/0x40
dump\_stack\_lvl+0xac/0xe0
print\_report+0x18c/0x4d8
kasan\_report+0xe8/0x148
\_\_hwasan\_store8\_noabort+0x88/0x98
lockdep\_register\_key+0x19c/0x1bc
class\_register+0x94/0x1ec
init\_module+0xbc/0xf48 \[rfkill\]
do\_one\_initcall+0x17c/0x72c
do\_init\_module+0x19c/0x3f8
...
Memory state around the buggy address:
ffffff808b8c0100: 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a
ffffff808b8c0200: 8a 8a 8a 8a 8a 8a 8a 8a fe fe fe fe fe fe fe fe
\>ffffff808b8c0300: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
                                     ^
ffffff808b8c0400: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03

As CONFIG\_KASAN\_GENERIC is not set, Kasan reports invalid-access
not use-after-free here.In this case, modprobe is manipulating
the corrupted lock\_keys\_hash hlish where lock\_class\_key is already
freed before.

It's worth noting that this only can happen if lockdep is enabled,
which is not true for normal system.

## Affected and fixed versions

- Linux: \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< b57196a5ec5e4c0ffecde8348b085b778c7dce04; \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< 0f1486dafca3398c4c46b9f6e6452fa27e73b559; \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< 93ec4a3b76404bce01bd5c9032bef5df6feb1d62 (cvelist)
- Linux: 6.4 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2023-52468.md
Affected: Linux >= dcfbb67e48a2becfce7990386e985b9c45098ee5, < b57196a5ec5e4c0ffecde8348b085b778c7dce04; >= dcfbb67e48a2becfce7990386e985b9c45098ee5, < 0f1486dafca3398c4c46b9f6e6452fa27e73b559; >= dcfbb67e48a2becfce7990386e985b9c45098ee5, < 93ec4a3b76404bce01bd5c9032bef5df6feb1d62; Linux 6.4
Fixed in: Linux 0f1486dafca3398c4c46b9f6e6452fa27e73b559, Linux 93ec4a3b76404bce01bd5c9032bef5df6feb1d62

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

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

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

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

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

Linux \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< b57196a5ec5e4c0ffecde8348b085b778c7dce04; \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< 0f1486dafca3398c4c46b9f6e6452fa27e73b559; \>= dcfbb67e48a2becfce7990386e985b9c45098ee5, \< 93ec4a3b76404bce01bd5c9032bef5df6feb1d62; Linux 6.4.

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

Yes. Fixed in Linux 0f1486dafca3398c4c46b9f6e6452fa27e73b559, Linux 93ec4a3b76404bce01bd5c9032bef5df6feb1d62. Upgrade Linux to 93ec4a3b76404bce01bd5c9032bef5df6feb1d62 or later.

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

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/b57196a5ec5e4c0ffecde8348b085b778c7dce04>
- patch: <https://git.kernel.org/stable/c/0f1486dafca3398c4c46b9f6e6452fa27e73b559>
- patch: <https://git.kernel.org/stable/c/93ec4a3b76404bce01bd5c9032bef5df6feb1d62>

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

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