Vulnerability · Published Feb 27, 2025 · Assigned by Linux

CVE-2024-58042rhashtable: Fix potential deadlock by moving schedule_work outside lock

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)0.2%top 94.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: rhashtable: Fix potential deadlock by moving schedule_work outside lock Move the hash table growth check and work scheduling outside the rht lock to prevent a possible circular locking dependency. The original implementation could trigger a lockdep warning due to a potential deadlock scenario involving nested locks between rhashtable bucket, rq lock, and dsq lock. By relocating the growth check and work scheduling after releasing the rth lock, we break this potential deadlock chain. This change expands the flexibility of rhashtable by removing restrictive locking that previously limited its use in scheduler and workqueue contexts. Import to say that this calls rht_grow_above_75(), which reads from struct rhashtable without holding the lock, if this is a problem, we can move the check to the lock, and schedule the workqueue after the lock. Modified so that atomic_inc is also moved outside of the bucket lock along with the growth above 75% check.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.12.13-1DEBIAN-CVE-2024-58042
Debian:14linux6.12.13-1DEBIAN-CVE-2024-58042
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-58042
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-58042

Affected products (as reported)

VendorProductVersions
Linux Linux f0e1a0643a59bf1f922fa209cec86a170b784f3f – before eb2e58484b838fb4e777ee9721bb9e20e6ca971df0e1a0643a59bf1f922fa209cec86a170b784f3f – before ced8ce3c83a7150c5f5d371a8c332d7bc7f9b66df0e1a0643a59bf1f922fa209cec86a170b784f3f – before e1d3422c95f003eba241c176adfe593c33e8a8f6
Linux Linux 6.12

Weakness: CWE-667 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References