CVE-2024-57984
NoneCVSS
—
EPSS
0.2%
Published
Feb 27, 2025
CISA due date
—
Cloudanix analysis
A timing flaw in a Linux driver can cause the system to keep using memory that has already been released, which may lead to crashes or other problems.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in dw_i3c_master allows use-after-free when dw_i3c_common_remove unregisters the device and frees master->base while a pending dw_i3c_hj_work still executes i3c_master_do_daa on that freed structure.
Why it matters to the business
Systems relying on the DesignWare I3C controller risk kernel crashes or memory corruption during driver unload, raising denial-of-service exposure on servers and embedded devices with high downstream prevalence.
How an attack unfolds
An attacker triggers an interrupt that queues dw_i3c_hj_work, then forces module removal so that dw_i3c_common_remove performs device_unregister while the work item later dereferences the already-freed master base.
How to fix it
Cancel the hj_work before unregistering in dw_i3c_common_remove; apply the upstream fix or update to a kernel containing the resolution.
How to confirm the fix worked
Inspect dw_i3c_common_remove for explicit work cancellation, then exercise repeated module load/unload cycles under interrupt load to confirm absence of UAF.
Typical attack path
- Trigger dw_i3c_master_irq_handler to schedule dw_i3c_hj_work
- Initiate dw_i3c_common_remove to call i3c_master_unregister and device_release
- Allow the delayed work to invoke i3c_master_do_daa on the freed base
How to detect it
Review kernel logs for oops/panic traces mentioning dw_i3c_hj_work or i3c_master_do_daa during module removal; correlate with audit records of dw_i3c_common_remove calls.
What your security team should do
- Apply the kernel fix immediately given the 608-day exposure window
- Audit all systems using DesignWare I3C hardware for the vulnerable driver
- Harden module unload paths with additional locking or refcounting
The record
In the Linux kernel, the following vulnerability has been resolved: i3c: dw: Fix use-after-free in dw_i3c_master driver due to race condition In dw_i3c_common_probe, &master->hj_work is bound with dw_i3c_hj_work. And dw_i3c_master_irq_handler can call dw_i3c_master_irq_handle_ibis function to start the work. If we remove the module which will call dw_i3c_common_remove to make cleanup, it will free master->base through i3c_master_unregister while the work mentioned above will be used. The sequence of operations that may lead to a UAF bug is as follows: CPU0 CPU1 | dw_i3c_hj_work dw_i3c_common_remove | i3c_master_unregister(&master->base) | device_unregister(&master->dev) | device_release | //free master->base | | i3c_master_do_daa(&master->base) | //use master->base Fix it by ensuring that the work is canceled before proceeding with the cleanup in dw_i3c_common_remove.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | kernel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-abi-stablelists | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-cross-headers | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-uki-virt | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-doc | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-headers | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules-extra-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-tools | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-tools-libs | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-tools-libs-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-uki-virt | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-uki-virt-addons | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | libperf | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | perf | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | python3-perf | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | rtla | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | rv | 0 | 6.12.0-124.8.1.el10_1 |
| Debian:11 | linux | 0 | No fix |
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Debian:13 | linux | 0 | 6.12.13-1 |
| Linux | Kernel | 5.0.0 | 6.6.76 |
| Ubuntu:24.10 | linux-aws | 0 | 6.11.0-1014.15 |
Related vulnerabilities
- CVE-2025-68285 In the Linux kernel, the following vulnerability has been resolved: libceph: fix… Also affects kernel
- CVE-2025-68287 In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: Fix race… Also affects kernel
- CVE-2025-40277 In the Linux kernel, the following vulnerability has been resolved: drm/vmwgfx: Validate… Also affects kernel
- CVE-2025-40240 In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL… Also affects kernel
- CVE-2025-40185 In the Linux kernel, the following vulnerability has been resolved: ice: ice_adapter… Also affects kernel
- CVE-2025-40176 In the Linux kernel, the following vulnerability has been resolved: tls: wait for pending… Also affects kernel
- CVE-2025-40058 In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Disallow… Also affects kernel
- CVE-2025-40047 In the Linux kernel, the following vulnerability has been resolved: io_uring/waitid… Also affects kernel