CVE-2024-58042

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
27/02/2025
Last modified:
05/03/2025

Description

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

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.12 (including) 6.12.13 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.13 (including) 6.13.2 (excluding)