CVE-2024-47143: dma-debug: fix a possible deadlock on radix_lock
In the Linux kernel, the following vulnerability has been resolved:
dma-debug: fix a possible deadlock on radixlock
radixlock() shouldn't be held while holding dmahashentry[idx].lock otherwise, there's a possible deadlock scenario when dma debug API is called holding rqlock():
CPU0 CPU1 CPU2 dmafreeattrs() checkunmap() adddmaentry() schedule() //out (A) rqlock() gethashbucket() (A) dmaentryhash checksync() (A) radixlock() (W) dmaentryhash dmaentryfree() (W) radixlock() // CPU2's one (W) rqlock()
CPU1 situation can happen when it extending radix tree and it tries to wake up kswapd via wakeallkswapd().
CPU2 situation can happen while perfeventtaskschedout() (i.e. dma sync operation is called while deleting perfevent using etm and etr tmc which are Arm Coresight hwtracing driver backends).
To remove this possible situation, call dmaentryfree() after puthashbucket() in checkunmap().
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-47143?
CVE-2024-47143 has a moderate severity due to its potential to cause deadlocks in the Linux kernel.
How do I fix CVE-2024-47143?
To fix CVE-2024-47143, upgrade to a version of the Linux kernel that is patched beyond 5.10.231.
What software is affected by CVE-2024-47143?
CVE-2024-47143 affects multiple versions of the Linux kernel ranging from 5.11 to 6.12.5.
Can CVE-2024-47143 cause system crashes?
Yes, CVE-2024-47143 can lead to potential deadlocks, which could result in system crashes.
Is CVE-2024-47143 generally exploitable?
Exploitation of CVE-2024-47143 is primarily dependent on specific conditions related to the use of the dma debug API.