CVE-2024-35794

Source
https://cve.org/CVERecord?id=CVE-2024-35794
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-35794.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-35794
Downstream
Related
Published
2024-05-17T12:25:00.111Z
Modified
2026-03-13T07:55:21.999844Z
Summary
dm-raid: really frozen sync_thread during suspend
Details

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

dm-raid: really frozen sync_thread during suspend

1) commit f52f5c71f3d4 ("md: fix stopping sync thread") remove MDRECOVERYFROZEN from __mdstopwrites() and doesn't realize that dm-raid relies on _mdstopwrites() to frozen syncthread indirectly. Fix this problem by adding MDRECOVERYFROZEN in mdstopwrites(), and since stopsyncthread() is only used for dm-raid in this case, also move stopsyncthread() to mdstopwrites(). 2) The flag MDRECOVERYFROZEN doesn't mean that sync thread is frozen, it only prevent new syncthread to start, and it can't stop the running sync thread; In order to frozen syncthread, after seting the flag, stopsyncthread() should be used. 3) The flag MDRECOVERYFROZEN doesn't mean that writes are stopped, use it as condition for mdstopwrites() in raidpostsuspend() doesn't look correct. Consider that reentrant stopsyncthread() do nothing, always call mdstopwrites() in raidpostsuspend(). 4) raidmessage can set/clear the flag MDRECOVERYFROZEN at anytime, and if MDRECOVERYFROZEN is cleared while the array is suspended, new syncthread can start unexpected. Fix this by disallow raidmessage() to change syncthread status during suspend.

Note that after commit f52f5c71f3d4 ("md: fix stopping sync thread"), the test shell/lvconvert-raid-reshape.sh start to hang in stopsyncthread(), and with previous fixes, the test won't hang there anymore, however, the test will still fail and complain that ext4 is corrupted. And with this patch, the test won't hang due to stopsyncthread() or fail due to ext4 is corrupted anymore. However, there is still a deadlock related to dm-raid456 that will be fixed in following patches.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35794.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
9dbd1aa3a81c6166608fec87994b6c464701f73a
Fixed
af916cb66a80597f3523bc85812e790bcdcfd62b
Fixed
eaa8fc9b092837cf2c754bde1a15d784ce9a85ab
Fixed
16c4770c75b1223998adbeb7286f9a15c65fba73

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-35794.json"