CVE-2024-58042
MediumIn 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.
CVSS 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-667CVE-2024-58042 is a Improper Locking vulnerability
What is Improper Locking?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. Learn more on MITRE CWE
Affected versions
Linux kernel versions
6.12
and later are affected. Fixed in
6.12.13,
6.13.2,
6.14
and their respective stable series.
References
The following references provide additional information about CVE-2024-58042 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/ced8ce3c83a7150c5f5d371a8c332d7bc7f9b66d
-
PatchKernel patch commithttps://git.kernel.org/stable/c/e1d3422c95f003eba241c176adfe593c33e8a8f6
-
PatchKernel patch commithttps://git.kernel.org/stable/c/eb2e58484b838fb4e777ee9721bb9e20e6ca971d
Frequently asked questions
-
What is CVE-2024-58042?
CVE-2024-58042 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as an Improper Locking flaw (CWE-667) . It affects Linux kernel versions from 6.12 onward and has been patched in 6.12.13, 6.13.2 and 6.14. CVE-2024-58042 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2024-58042?
CVE-2024-58042 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2024-58042?
Yes — CVE-2024-58042 has been patched. Fixed versions include 6.12.13, 6.13.2 and 6.14. If you are running Linux kernel 6.12 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2024-58042 actively exploited?
No — CVE-2024-58042 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Improper Locking (CWE-667)?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. View CWE-667 on MITRE CWE →