Skip to content
Heist/ feed
Back to feed
UnratedFix available

ocfs2: fix DIO failure due to insufficient transaction credits

Type: advisorySources: OSV

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

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.221, 5.15.162, 6.1.97, 6.6.37, 6.9.8
CVEs
CVE-2024-42077
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 01:58 UTC · Revision 1

Source evidence

ocfs2: fix DIO failure due to insufficient transaction credits

core-osv · Original source

Published 29 Jul 2024, 15:52 UTC

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

osv:CVE-2024-42077

Kernel

Fixed versions: 5.10.221, 5.15.162, 6.1.97, 6.6.37, 6.9.8

Complete source record
{
  "id": "f0771197be90d48c3280425f00f2ec4d5f68076a64fe543b8b863f71c96aeda4",
  "url": "https://osv.dev/vulnerability/CVE-2024-42077",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ocfs2: fix DIO failure due to insufficient transaction credits",
    "summary": "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",
    "evidence": "osv:CVE-2024-42077",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.221",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.162",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.97",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.37",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.9.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-42077",
      "aliases": [
        "CVE-2024-42077"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c15471f79506830f80eca0e7fe09b8213953ab5f"
                },
                {
                  "fixed": "a68b896aa56e435506453ec8835bc991ec3ae687"
                },
                {
                  "fixed": "320273b5649bbcee87f9e65343077189699d2a7a"
                },
                {
                  "fixed": "9ea2d1c6789722d58ec191f14f9a02518d55b6b4"
                },
                {
                  "fixed": "c05ffb693bfb42a48ef3ee88a55b57392984e111"
                },
                {
                  "fixed": "331d1079d58206ff7dc5518185f800b412f89bc6"
                },
                {
                  "fixed": "be346c1a6eeb49d8fda827d2a9522124c2f72f36"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42077.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.6.0"
                },
                {
                  "fixed": "5.10.221"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.162"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.97"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.37"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.9.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42077.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.511596229Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/320273b5649bbcee87f9e65343077189699d2a7a",
        "https://git.kernel.org/stable/c/331d1079d58206ff7dc5518185f800b412f89bc6",
        "https://git.kernel.org/stable/c/9ea2d1c6789722d58ec191f14f9a02518d55b6b4",
        "https://git.kernel.org/stable/c/a68b896aa56e435506453ec8835bc991ec3ae687",
        "https://git.kernel.org/stable/c/be346c1a6eeb49d8fda827d2a9522124c2f72f36",
        "https://git.kernel.org/stable/c/c05ffb693bfb42a48ef3ee88a55b57392984e111",
        "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42077.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-42077",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42077.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-42077",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 491749,
  "published_at": "2024-07-29T15:52:39.661+00:00"
}