CVE-2023-52468: Vulnerability in Linux Linux
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.
AI Analysis
Technical Summary
CVE-2023-52468 is a vulnerability identified in the Linux kernel related to a use-after-free condition in the function class_register(). The issue arises because the lock_class_key remains registered and accessible in the lock_keys_hash hlist even after the associated subsys_private structure has been freed during an error handling path. This leads to a scenario where a task iterating over the lock_keys_hash may access freed memory, causing a use-after-free vulnerability. Specifically, the problem manifests when a driver fails to register a kset due to the creation of a duplicate filename under /class/xxx, triggering the error path. When Kernel Address Sanitizer (KASAN) is enabled, it reports an invalid-access bug rather than a direct use-after-free, highlighting the corrupted state of the lock_keys_hash hlist. The vulnerability is tied to lockdep being enabled, a kernel debugging feature that is not typically active on production systems. The bug is triggered during module initialization (e.g., modprobe), where the corrupted lock_keys_hash is manipulated after the lock_class_key has been freed. The root cause is the failure to unregister the lock_class_key before freeing the associated memory, which leads to stale pointers and potential memory corruption. This vulnerability is specific to certain Linux kernel versions identified by commit hashes and was published on February 25, 2024. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The issue is primarily relevant in environments where lockdep is enabled, which is uncommon in standard deployments but may be present in development, testing, or specialized debugging scenarios.
Potential Impact
For European organizations, the direct impact of CVE-2023-52468 is likely limited due to the dependency on lockdep being enabled, which is not standard in production Linux environments. However, in development, testing, or specialized debugging setups where lockdep is active, exploitation could lead to kernel memory corruption, potentially causing system instability, crashes, or denial of service. In worst-case scenarios, if an attacker can trigger this vulnerability, it might be leveraged to escalate privileges or execute arbitrary code within the kernel context, compromising confidentiality, integrity, and availability of affected systems. Organizations running custom or debug-enabled kernels, particularly in critical infrastructure, research institutions, or development environments, may face higher risk. Given the widespread use of Linux in European data centers, cloud providers, and embedded systems, any kernel-level vulnerability warrants attention. Although no active exploits are known, the vulnerability's presence in kernel module loading (modprobe) paths could be a vector if combined with other vulnerabilities or misconfigurations. The impact is thus moderate but could escalate if attackers develop reliable exploitation techniques or if lockdep-enabled kernels are used in sensitive environments.
Mitigation Recommendations
1. Apply the official Linux kernel patches that fix the use-after-free by ensuring the lock_class_key is unregistered before freeing the associated memory. Monitor Linux kernel mailing lists and distributions for updated kernel releases addressing CVE-2023-52468. 2. Disable lockdep in production environments unless explicitly required for debugging, as the vulnerability only manifests when lockdep is enabled. 3. Audit and restrict kernel module loading permissions to trusted users and processes to minimize the risk of triggering the vulnerability via modprobe or similar mechanisms. 4. Employ kernel hardening features such as Kernel Address Sanitizer (KASAN) in testing environments to detect similar issues early. 5. Regularly update Linux systems to the latest stable kernel versions provided by trusted vendors to ensure all security patches are applied. 6. For organizations using custom kernels or embedded Linux, review kernel configuration to avoid enabling lockdep unnecessarily and validate kernel module registration logic. 7. Monitor system logs for unusual modprobe activity or kernel warnings related to lockdep or memory corruption to detect potential exploitation attempts early.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Norway, Denmark, Italy, Spain
CVE-2023-52468: Vulnerability in Linux Linux
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.
AI-Powered Analysis
Technical Analysis
CVE-2023-52468 is a vulnerability identified in the Linux kernel related to a use-after-free condition in the function class_register(). The issue arises because the lock_class_key remains registered and accessible in the lock_keys_hash hlist even after the associated subsys_private structure has been freed during an error handling path. This leads to a scenario where a task iterating over the lock_keys_hash may access freed memory, causing a use-after-free vulnerability. Specifically, the problem manifests when a driver fails to register a kset due to the creation of a duplicate filename under /class/xxx, triggering the error path. When Kernel Address Sanitizer (KASAN) is enabled, it reports an invalid-access bug rather than a direct use-after-free, highlighting the corrupted state of the lock_keys_hash hlist. The vulnerability is tied to lockdep being enabled, a kernel debugging feature that is not typically active on production systems. The bug is triggered during module initialization (e.g., modprobe), where the corrupted lock_keys_hash is manipulated after the lock_class_key has been freed. The root cause is the failure to unregister the lock_class_key before freeing the associated memory, which leads to stale pointers and potential memory corruption. This vulnerability is specific to certain Linux kernel versions identified by commit hashes and was published on February 25, 2024. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The issue is primarily relevant in environments where lockdep is enabled, which is uncommon in standard deployments but may be present in development, testing, or specialized debugging scenarios.
Potential Impact
For European organizations, the direct impact of CVE-2023-52468 is likely limited due to the dependency on lockdep being enabled, which is not standard in production Linux environments. However, in development, testing, or specialized debugging setups where lockdep is active, exploitation could lead to kernel memory corruption, potentially causing system instability, crashes, or denial of service. In worst-case scenarios, if an attacker can trigger this vulnerability, it might be leveraged to escalate privileges or execute arbitrary code within the kernel context, compromising confidentiality, integrity, and availability of affected systems. Organizations running custom or debug-enabled kernels, particularly in critical infrastructure, research institutions, or development environments, may face higher risk. Given the widespread use of Linux in European data centers, cloud providers, and embedded systems, any kernel-level vulnerability warrants attention. Although no active exploits are known, the vulnerability's presence in kernel module loading (modprobe) paths could be a vector if combined with other vulnerabilities or misconfigurations. The impact is thus moderate but could escalate if attackers develop reliable exploitation techniques or if lockdep-enabled kernels are used in sensitive environments.
Mitigation Recommendations
1. Apply the official Linux kernel patches that fix the use-after-free by ensuring the lock_class_key is unregistered before freeing the associated memory. Monitor Linux kernel mailing lists and distributions for updated kernel releases addressing CVE-2023-52468. 2. Disable lockdep in production environments unless explicitly required for debugging, as the vulnerability only manifests when lockdep is enabled. 3. Audit and restrict kernel module loading permissions to trusted users and processes to minimize the risk of triggering the vulnerability via modprobe or similar mechanisms. 4. Employ kernel hardening features such as Kernel Address Sanitizer (KASAN) in testing environments to detect similar issues early. 5. Regularly update Linux systems to the latest stable kernel versions provided by trusted vendors to ensure all security patches are applied. 6. For organizations using custom kernels or embedded Linux, review kernel configuration to avoid enabling lockdep unnecessarily and validate kernel module registration logic. 7. Monitor system logs for unusual modprobe activity or kernel warnings related to lockdep or memory corruption to detect potential exploitation attempts early.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-02-20T12:30:33.297Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9831c4522896dcbe7a3d
Added to database: 5/21/2025, 9:09:05 AM
Last enriched: 7/1/2025, 9:25:01 AM
Last updated: 7/31/2025, 11:40:12 AM
Views: 14
Related Threats
CVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.