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

> A race condition in the Linux kernel MD driver can cause a deadlock during device suspension, leading to a denial of service.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Aug 2024
- **Updated:** 23 May 2026
- **Also known as:** AZL-47968, AZL-48003, BELL-CVE-2024-43855, DEBIAN-CVE-2024-43855, GHSA-5ffp-85mp-h2q2, RHSA-2025:3506, UBUNTU-CVE-2024-43855

## What is CVE-2024-43855?

CVE-2024-43855 is a medium-severity vulnerability in Linux kernel, published on 17 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official 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.

Weakness: CWE-476 (NULL Pointer Dereference)

## Which versions are affected by CVE-2024-43855?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bpftool-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:7.4.0-503.35.1.el9_5 |
| `kernel-64k-debug-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debug-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debug-devel-matched` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-devel-matched` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debug-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debug-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debug-devel-matched` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debuginfo-common-aarch64` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debuginfo-common-ppc64le` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debuginfo-common-s390x` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-debuginfo-common-x86_64` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-devel-matched` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-doc` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-rt-debug-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-rt-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-tools-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-zfcpdump-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-zfcpdump-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-zfcpdump-devel-matched` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `libperf-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `perf` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `perf-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `python3-perf-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `rtla` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `rv` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.14.0-503.35.1.el9_5 |
| `bpftool` | Red Hat:enterprise_linux:9::baseos | All versions | 0:7.4.0-503.35.1.el9_5 |
| `bpftool-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:7.4.0-503.35.1.el9_5 |
| `kernel` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-core` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debug` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debug-core` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debug-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debug-modules` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |
| `kernel-64k-debug-modules-core` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.14.0-503.35.1.el9_5 |

Products: Linux kernel.

## How do I fix CVE-2024-43855?

Apply the vendor's patch.

## Is CVE-2024-43855 being exploited?

There is no known exploitation of CVE-2024-43855 in the wild and no public exploit code.

## Other vulnerabilities in Linux kernel

- [CVE-2026-53266](https://insights.sbomify.com/CVE-2026-53266/): Linux Kernel Out-of-Bounds Write (high 8.8, exploited in the wild)
- [CVE-2013-6282](https://insights.sbomify.com/CVE-2013-6282/): Linux Kernel Improper Input Validation (high 8.8, exploited in the wild)
- [CVE-2022-0185](https://insights.sbomify.com/CVE-2022-0185/): Linux Kernel Heap-Based Buffer Overflow (high 8.4, exploited in the wild)
- [CVE-2013-2094](https://insights.sbomify.com/CVE-2013-2094/): Linux Kernel Privilege Escalation (high 8.4, exploited in the wild)
- [CVE-2026-53362](https://insights.sbomify.com/CVE-2026-53362/): Linux Kernel Unspecified (high 7.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-43855 and fix it if it is affected.

What it is: CVE-2024-43855 is a medium-severity vulnerability in Linux kernel, published on 17 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-43855 in the wild and no public exploit code.

Affected product: Linux kernel. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-43855/ (Markdown: https://insights.sbomify.com/CVE-2024-43855/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-43855
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-43855
- OSV: https://osv.dev/vulnerability/CVE-2024-43855

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-43855/
Summaries are generated and may contain mistakes; the official description above is the record.
