# CVE-2024-42077: ocfs2: fix DIO failure due to insufficient transaction credits

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **Published:** 2024-07-29T15:52:39.661Z
- **Modified:** 2026-06-17T07:48:45.633Z

## Who should check

- Anyone running Linux \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< a68b896aa56e435506453ec8835bc991ec3ae687; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 320273b5649bbcee87f9e65343077189699d2a7a; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 9ea2d1c6789722d58ec191f14f9a02518d55b6b4; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< c05ffb693bfb42a48ef3ee88a55b57392984e111; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 331d1079d58206ff7dc5518185f800b412f89bc6; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< be346c1a6eeb49d8fda827d2a9522124c2f72f36
- Anyone running Linux 4.6

## Description

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

ocfs2: fix DIO failure due to insufficient transaction credits

The code in ocfs2\_dio\_end\_io\_write() estimates number of necessary
transaction credits using ocfs2\_calc\_extend\_credits().  This however does
not take into account that the IO could be arbitrarily large and can
contain arbitrary number of extents.

Extent tree manipulations do often extend the current transaction but not
in all of the cases.  For example if we have only single block extents in
the tree, ocfs2\_mark\_extent\_written() will end up calling
ocfs2\_replace\_extent\_rec() all the time and we will never extend the
current transaction and eventually exhaust all the transaction credits if
the IO contains many single block extents.  Once that happens a
WARN\_ON(jbd2\_handle\_buffer\_credits(handle) \<= 0) is triggered in
jbd2\_journal\_dirty\_metadata() and subsequently OCFS2 aborts in response to
this error.  This was actually triggered by one of our customers on a
heavily fragmented OCFS2 filesystem.

To fix the issue make sure the transaction always has enough credits for
one extent insert before each call of ocfs2\_mark\_extent\_written().

Heming Zhao said:

------
PANIC: "Kernel panic - not syncing: OCFS2: (device dm-1): panic forced after error"

PID: xxx  TASK: xxxx  CPU: 5  COMMAND: "SubmitThread-CA"
  \#0 machine\_kexec at ffffffff8c069932
  \#1 \_\_crash\_kexec at ffffffff8c1338fa
  \#2 panic at ffffffff8c1d69b9
  \#3 ocfs2\_handle\_error at ffffffffc0c86c0c \[ocfs2\]
  \#4 \_\_ocfs2\_abort at ffffffffc0c88387 \[ocfs2\]
  \#5 ocfs2\_journal\_dirty at ffffffffc0c51e98 \[ocfs2\]
  \#6 ocfs2\_split\_extent at ffffffffc0c27ea3 \[ocfs2\]
  \#7 ocfs2\_change\_extent\_flag at ffffffffc0c28053 \[ocfs2\]
  \#8 ocfs2\_mark\_extent\_written at ffffffffc0c28347 \[ocfs2\]
  \#9 ocfs2\_dio\_end\_io\_write at ffffffffc0c2bef9 \[ocfs2\]
\#10 ocfs2\_dio\_end\_io at ffffffffc0c2c0f5 \[ocfs2\]
\#11 dio\_complete at ffffffff8c2b9fa7
\#12 do\_blockdev\_direct\_IO at ffffffff8c2bc09f
\#13 ocfs2\_direct\_IO at ffffffffc0c2b653 \[ocfs2\]
\#14 generic\_file\_direct\_write at ffffffff8c1dcf14
\#15 \_\_generic\_file\_write\_iter at ffffffff8c1dd07b
\#16 ocfs2\_file\_write\_iter at ffffffffc0c49f1f \[ocfs2\]
\#17 aio\_write at ffffffff8c2cc72e
\#18 kmem\_cache\_alloc at ffffffff8c248dde
\#19 do\_io\_submit at ffffffff8c2ccada
\#20 do\_syscall\_64 at ffffffff8c004984
\#21 entry\_SYSCALL\_64\_after\_hwframe at ffffffff8c8000ba

## Affected and fixed versions

- Linux: \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< a68b896aa56e435506453ec8835bc991ec3ae687; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 320273b5649bbcee87f9e65343077189699d2a7a; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 9ea2d1c6789722d58ec191f14f9a02518d55b6b4; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< c05ffb693bfb42a48ef3ee88a55b57392984e111; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 331d1079d58206ff7dc5518185f800b412f89bc6; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< be346c1a6eeb49d8fda827d2a9522124c2f72f36 (cvelist)
- Linux: 4.6 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42077. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42077.md
Affected: Linux >= c15471f79506830f80eca0e7fe09b8213953ab5f, < a68b896aa56e435506453ec8835bc991ec3ae687; >= c15471f79506830f80eca0e7fe09b8213953ab5f, < 320273b5649bbcee87f9e65343077189699d2a7a; >= c15471f79506830f80eca0e7fe09b8213953ab5f, < 9ea2d1c6789722d58ec191f14f9a02518d55b6b4; >= c15471f79506830f80eca0e…
Fixed in: Linux 320273b5649bbcee87f9e65343077189699d2a7a, Linux 9ea2d1c6789722d58ec191f14f9a02518d55b6b4, Linux 331d1079d58206ff7dc5518185f800b412f89bc6

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42077 being exploited?

There is no confirmed exploitation: CVE-2024-42077 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-42077?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< a68b896aa56e435506453ec8835bc991ec3ae687; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 320273b5649bbcee87f9e65343077189699d2a7a; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 9ea2d1c6789722d58ec191f14f9a02518d55b6b4; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< c05ffb693bfb42a48ef3ee88a55b57392984e111; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< 331d1079d58206ff7dc5518185f800b412f89bc6; \>= c15471f79506830f80eca0e7fe09b8213953ab5f, \< be346c1a6eeb49d8fda827d2a9522124c2f72f36; Linux 4.6.

### Is there a fix for CVE-2024-42077?

Yes. Fixed in Linux 320273b5649bbcee87f9e65343077189699d2a7a, Linux 9ea2d1c6789722d58ec191f14f9a02518d55b6b4, Linux 331d1079d58206ff7dc5518185f800b412f89bc6. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-42077?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/a68b896aa56e435506453ec8835bc991ec3ae687>
- patch: <https://git.kernel.org/stable/c/320273b5649bbcee87f9e65343077189699d2a7a>
- patch: <https://git.kernel.org/stable/c/9ea2d1c6789722d58ec191f14f9a02518d55b6b4>
- patch: <https://git.kernel.org/stable/c/c05ffb693bfb42a48ef3ee88a55b57392984e111>
- patch: <https://git.kernel.org/stable/c/331d1079d58206ff7dc5518185f800b412f89bc6>
- patch: <https://git.kernel.org/stable/c/be346c1a6eeb49d8fda827d2a9522124c2f72f36>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42077>

HTML: <https://flawdb.com/CVE-2024-42077> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42077>
