Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-43855— md: fix deadlock between mddev_suspend and flush bio

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于在mddev_suspend和flush bio之间存在死锁问题。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.21% · P11

Possible ATT&CK Techniques 1 AI

T1496 · Resource Hijacking

Affected Version Matrix 14

VendorProduct Version RangeStatus
Linux Linux f9f2d957a8ea93c73182aebf7de30935a58c027d< 32226070813140234b6c507084738e8e8385c5c6 affected
530cec617f5a8ba6f26bcbf0d64d75c951d17730< 2d0738a8322bf4e5bfe693d16b3111928a9ccfbf affected
fa2bbff7b0b4e211fec5e5686ef96350690597b5< ca963eefbc3331222b6121baa696d49ba2008811 affected
fa2bbff7b0b4e211fec5e5686ef96350690597b5< 611d5cbc0b35a752e657a83eebadf40d814d006b affected
c4c2345214b66e2505a26fd2ea58839dd7a1d48d affected
6.1.75< 6.1.103 affected
6.6.14< 6.6.44 affected
6.7.2< 6.8 affected
… +6 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-43855

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
md: fix deadlock between mddev_suspend and flush bio
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: md: fix deadlock between mddev_suspend and flush bio Deadlock occurs when mddev is being suspended while some flush bio is in progress. It is a complex issue. T1. the first flush is at the ending stage, it clears 'mddev->flush_bio' and tries to submit data, but is blocked because mddev is suspended by T4. T2. the second flush sets 'mddev->flush_bio', and attempts to queue md_submit_flush_data(), which is already running (T1) and won't execute again if on the same CPU as T1. T3. the third flush inc active_io and tries to flush, but is blocked because 'mddev->flush_bio' is not NULL (set by T2). T4. mddev_suspend() is called and waits for active_io dec to 0 which is inc by T3. T1 T2 T3 T4 (flush 1) (flush 2) (third 3) (suspend) md_submit_flush_data mddev->flush_bio = NULL; . . md_flush_request . mddev->flush_bio = bio . queue submit_flushes . . . . md_handle_request . . active_io + 1 . . md_flush_request . . wait !mddev->flush_bio . . . . mddev_suspend . . wait !active_io . . . submit_flushes . queue_work md_submit_flush_data . //md_submit_flush_data is already running (T1) . md_handle_request wait resume The root issue is non-atomic inc/dec of active_io during flush process. active_io is dec before md_submit_flush_data is queued, and inc soon after md_submit_flush_data() run. md_flush_request active_io + 1 submit_flushes active_io - 1 md_submit_flush_data md_handle_request active_io + 1 make_request active_io - 1 If active_io is dec after md_handle_request() instead of within submit_flushes(), make_request() can be called directly intead of md_handle_request() in md_submit_flush_data(), and active_io will only inc and dec once in the whole flush process. Deadlock will be fixed. Additionally, the only difference between fixing the issue and before is that there is no return error handling of make_request(). But after previous patch cleaned md_write_start(), make_requst() only return error in raid5_make_request() by dm-raid, see commit 41425f96d7aa ("dm-raid456, md/raid456: fix a deadlock for dm-raid456 while io concurrent with reshape)". Since dm always splits data and flush operation into two separate io, io size of flush submitted by dm always is 0, make_request() will not be called in md_submit_flush_data(). To prevent future modifications from introducing issues, add WARN_ON to ensure make_request() no error is returned in this context.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于在mddev_suspend和flush bio之间存在死锁问题。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux f9f2d957a8ea93c73182aebf7de30935a58c027d ~ 32226070813140234b6c507084738e8e8385c5c6 -
Linux Linux 6.8 -

II. Public POCs for CVE-2024-43855

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-43855

登录查看更多情报信息。

Other References for CVE-2024-43855 (4)

Same Patch Batch · Linux · 2024-08-17 · 109 CVEs total

CVE-2024-42285 9.8 CRITICAL RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
CVE-2024-42284 9.1 CRITICAL tipc: Return non-zero value from tipc_udp_addr2str() on error
CVE-2024-43848 8.8 HIGH wifi: mac80211: fix TTLM teardown work
CVE-2024-43847 8.8 HIGH wifi: ath12k: fix invalid memory access while processing fragmented packets
CVE-2024-42287 8.8 HIGH scsi: qla2xxx: Complete command early within lock
CVE-2024-42318 8.8 HIGH landlock: Don't lose track of restrictions on cred_transfer
CVE-2024-42301 7.8 HIGH dev/parport: fix the array out-of-bounds risk
CVE-2024-42280 7.8 HIGH mISDN: Fix a use after free in hfcmulti_tx()
CVE-2024-43846 7.8 HIGH lib: objagg: Fix general protection fault
CVE-2024-43845 7.8 HIGH udf: Fix bogus checksum computation in udf_rename()
CVE-2024-42288 7.8 HIGH scsi: qla2xxx: Fix for possible memory corruption
CVE-2024-43840 7.8 HIGH bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG
CVE-2024-42314 7.8 HIGH btrfs: fix extent map use-after-free when adding pages to compressed bio
CVE-2024-42297 7.8 HIGH f2fs: fix to don't dirty inode for readonly filesystem
CVE-2024-43830 7.8 HIGH leds: trigger: Unregister sysfs attributes before calling deactivate()
CVE-2024-42296 7.8 HIGH f2fs: fix return value of f2fs_convert_inline_inode()
CVE-2024-42299 7.8 HIGH fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed
CVE-2024-42300 7.8 HIGH erofs: fix race in z_erofs_get_gbuf()
CVE-2024-42279 7.8 HIGH spi: microchip-core: ensure TX and RX FIFOs are empty at start of a transfer
CVE-2024-42293 7.8 HIGH arm64: mm: Fix lockless walks with static and dynamic page-table folding

Showing top 20 of 109 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-43855

No comments yet


Leave a comment