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

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-02-25 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2023-52468, DEBIAN-CVE-2023-52468
- Record: https://cvemate.com/vulnerability/CVE-2023-52468 · JSON: https://cvemate.com/vulnerability/CVE-2023-52468/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.275%, percentile 21.2%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 77)

- debian linux (Debian): \< 6.6.15-1
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.5 (Ubuntu): \< 6.5.0-1022.23~22.04.1
- ubuntu linux-azure-edge (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-fde (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/b57196a5ec5e4c0ffecde8348b085b778c7dce04>
- <https://git.kernel.org/stable/c/0f1486dafca3398c4c46b9f6e6452fa27e73b559>
- <https://git.kernel.org/stable/c/93ec4a3b76404bce01bd5c9032bef5df6feb1d62>
- <https://ubuntu.com/security/CVE-2023-52468>
- <https://git.kernel.org/linus/93ec4a3b76404bce01bd5c9032bef5df6feb1d62>
- <https://www.cve.org/CVERecord?id=CVE-2023-52468>
- <https://ubuntu.com/security/notices/USN-6818-1>
- <https://ubuntu.com/security/notices/USN-6819-1>
- <https://ubuntu.com/security/notices/USN-6818-2>
- <https://ubuntu.com/security/notices/USN-6819-2>
- <https://ubuntu.com/security/notices/USN-6819-3>
- <https://ubuntu.com/security/notices/USN-6818-3>
- <https://ubuntu.com/security/notices/USN-6818-4>
- <https://ubuntu.com/security/notices/USN-6819-4>
- <https://security-tracker.debian.org/tracker/CVE-2023-52468>

---

Data as of 2026-12-05T05:11:22.419Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
