CVE-2024-47143 dma-debug: fix a possible deadlock on radix_lock

Medium 5.5 Published Updated

A race condition in the Linux kernel's DMA debug subsystem can cause a deadlock, leading to a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-47143?

CVE-2024-47143 is a medium-severity vulnerability in Linux kernel, published on 11 Jan 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

dma-debug: fix a possible deadlock on radix_lock

radix_lock() shouldn't be held while holding dma_hash_entry[idx].lock otherwise, there's a possible deadlock scenario when dma debug API is called holding rq_lock():

CPU0 CPU1 CPU2 dma_free_attrs() check_unmap() add_dma_entry() __schedule() //out (A) rq_lock() get_hash_bucket() (A) dma_entry_hash check_sync() (A) radix_lock() (W) dma_entry_hash dma_entry_free() (W) radix_lock() // CPU2's one (W) rq_lock()

CPU1 situation can happen when it extending radix tree and it tries to wake up kswapd via wake_all_kswapd().

CPU2 situation can happen while perf_event_task_sched_out() (i.e. dma sync operation is called while deleting perf_event using etm and etr tmc which are Arm Coresight hwtracing driver backends).

To remove this possible situation, call dma_entry_free() after put_hash_bucket() in check_unmap().

Weakness: CWE-667

Which versions are affected by CVE-2024-47143?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-47143?

Apply the vendor's patch.

Is CVE-2024-47143 being exploited?

There is no known exploitation of CVE-2024-47143 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-56229, AZL-56276, BELL-CVE-2024-47143, DEBIAN-CVE-2024-47143, GHSA-g29r-ch4v-q6cx, UBUNTU-CVE-2024-47143.

Is CVE-2024-47143 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free