In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix DIO failure due to insufficient transaction credits
The code in ocfs2dioendiowrite() estimates number of necessary transaction credits using ocfs2calcextend_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, ocfs2markextentwritten() will end up calling ocfs2replaceextentrec() 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 WARNON(jbd2handlebuffercredits(handle) <= 0) is triggered in jbd2journaldirty_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 ocfs2markextent_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 machinekexec at ffffffff8c069932 #1 _crashkexec at ffffffff8c1338fa #2 panic at ffffffff8c1d69b9 #3 ocfs2handleerror at ffffffffc0c86c0c [ocfs2] #4 _ocfs2abort at ffffffffc0c88387 [ocfs2] #5 ocfs2journaldirty at ffffffffc0c51e98 [ocfs2] #6 ocfs2splitextent at ffffffffc0c27ea3 [ocfs2] #7 ocfs2changeextentflag at ffffffffc0c28053 [ocfs2] #8 ocfs2markextentwritten at ffffffffc0c28347 [ocfs2] #9 ocfs2dioendio_write at ffffffffc0c2bef9 [ocfs2]
{ "vanir_signatures": [ { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/aops.c" }, "deprecated": false, "digest": { "line_hashes": [ "245960170895315941234449390201511630004", "180432073638403047197050515972705115764", "123286455619292485591033250406318992248", "9046632427690630706010091168871667080" ], "threshold": 0.9 }, "id": "CVE-2024-42077-058cbbec", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36" }, { "signature_version": "v1", "signature_type": "Function", "target": { "file": "fs/ocfs2/aops.c", "function": "ocfs2_dio_end_io_write" }, "deprecated": false, "digest": { "length": 1971.0, "function_hash": "314484687540709375154073089579610852865" }, "id": "CVE-2024-42077-07a5e882", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.h" }, "deprecated": false, "digest": { "line_hashes": [ "141476659859539260972829616766665205355", "29849017956447989710999452039027457420", "100540055490009448239865839524077787604", "101434749029470550537950249586016952174" ], "threshold": 0.9 }, "id": "CVE-2024-42077-083d8928", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/ocfs2_trace.h" }, "deprecated": false, "digest": { "line_hashes": [ "92793260294652958464004645294355444834", "87191109965814154894336510541781991401", "168127193204591027609850694195943456345" ], "threshold": 0.9 }, "id": "CVE-2024-42077-12673b08", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.h" }, "deprecated": false, "digest": { "line_hashes": [ "141476659859539260972829616766665205355", "29849017956447989710999452039027457420", "100540055490009448239865839524077787604", "101434749029470550537950249586016952174" ], "threshold": 0.9 }, "id": "CVE-2024-42077-137185e0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/aops.c" }, "deprecated": false, "digest": { "line_hashes": [ "245960170895315941234449390201511630004", "180432073638403047197050515972705115764", "123286455619292485591033250406318992248", "9046632427690630706010091168871667080" ], "threshold": 0.9 }, "id": "CVE-2024-42077-16f95c52", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.h" }, "deprecated": false, "digest": { "line_hashes": [ "141476659859539260972829616766665205355", "29849017956447989710999452039027457420", "100540055490009448239865839524077787604", "101434749029470550537950249586016952174" ], "threshold": 0.9 }, "id": "CVE-2024-42077-2f52ba9e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/ocfs2_trace.h" }, "deprecated": false, "digest": { "line_hashes": [ "92793260294652958464004645294355444834", "87191109965814154894336510541781991401", "168127193204591027609850694195943456345" ], "threshold": 0.9 }, "id": "CVE-2024-42077-5041874b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/ocfs2_trace.h" }, "deprecated": false, "digest": { "line_hashes": [ "92793260294652958464004645294355444834", "87191109965814154894336510541781991401", "168127193204591027609850694195943456345" ], "threshold": 0.9 }, "id": "CVE-2024-42077-5626734c", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/ocfs2_trace.h" }, "deprecated": false, "digest": { "line_hashes": [ "92793260294652958464004645294355444834", "87191109965814154894336510541781991401", "168127193204591027609850694195943456345" ], "threshold": 0.9 }, "id": "CVE-2024-42077-6875254b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/aops.c" }, "deprecated": false, "digest": { "line_hashes": [ "245960170895315941234449390201511630004", "180432073638403047197050515972705115764", "123286455619292485591033250406318992248", "9046632427690630706010091168871667080" ], "threshold": 0.9 }, "id": "CVE-2024-42077-6c188c78", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/aops.c" }, "deprecated": false, "digest": { "line_hashes": [ "245960170895315941234449390201511630004", "180432073638403047197050515972705115764", "123286455619292485591033250406318992248", "9046632427690630706010091168871667080" ], "threshold": 0.9 }, "id": "CVE-2024-42077-6c843f10", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/ocfs2_trace.h" }, "deprecated": false, "digest": { "line_hashes": [ "92793260294652958464004645294355444834", "87191109965814154894336510541781991401", "168127193204591027609850694195943456345" ], "threshold": 0.9 }, "id": "CVE-2024-42077-6ee6c35a", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a" }, { "signature_version": "v1", "signature_type": "Function", "target": { "file": "fs/ocfs2/aops.c", "function": "ocfs2_dio_end_io_write" }, "deprecated": false, "digest": { "length": 1971.0, "function_hash": "314484687540709375154073089579610852865" }, "id": "CVE-2024-42077-7bcc28e5", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/aops.c" }, "deprecated": false, "digest": { "line_hashes": [ "245960170895315941234449390201511630004", "180432073638403047197050515972705115764", "123286455619292485591033250406318992248", "9046632427690630706010091168871667080" ], "threshold": 0.9 }, "id": "CVE-2024-42077-81f0800d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111" }, { "signature_version": "v1", "signature_type": "Function", "target": { "file": "fs/ocfs2/aops.c", "function": "ocfs2_dio_end_io_write" }, "deprecated": false, "digest": { "length": 1971.0, "function_hash": "314484687540709375154073089579610852865" }, "id": "CVE-2024-42077-88e29461", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/ocfs2_trace.h" }, "deprecated": false, "digest": { "line_hashes": [ "92793260294652958464004645294355444834", "87191109965814154894336510541781991401", "168127193204591027609850694195943456345" ], "threshold": 0.9 }, "id": "CVE-2024-42077-8a54243d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.c" }, "deprecated": false, "digest": { "line_hashes": [ "189068219110157720816434886751681303151", "127967805471160015227487949794253213719", "185532866704054404170009554402420029182" ], "threshold": 0.9 }, "id": "CVE-2024-42077-8c049cd6", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.h" }, "deprecated": false, "digest": { "line_hashes": [ "141476659859539260972829616766665205355", "29849017956447989710999452039027457420", "100540055490009448239865839524077787604", "101434749029470550537950249586016952174" ], "threshold": 0.9 }, "id": "CVE-2024-42077-9071bce6", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/aops.c" }, "deprecated": false, "digest": { "line_hashes": [ "245960170895315941234449390201511630004", "180432073638403047197050515972705115764", "123286455619292485591033250406318992248", "9046632427690630706010091168871667080" ], "threshold": 0.9 }, "id": "CVE-2024-42077-93ae1230", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.c" }, "deprecated": false, "digest": { "line_hashes": [ "189068219110157720816434886751681303151", "127967805471160015227487949794253213719", "185532866704054404170009554402420029182" ], "threshold": 0.9 }, "id": "CVE-2024-42077-9c5989b4", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.c" }, "deprecated": false, "digest": { "line_hashes": [ "189068219110157720816434886751681303151", "127967805471160015227487949794253213719", "185532866704054404170009554402420029182" ], "threshold": 0.9 }, "id": "CVE-2024-42077-a796c1f0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.h" }, "deprecated": false, "digest": { "line_hashes": [ "141476659859539260972829616766665205355", "29849017956447989710999452039027457420", "100540055490009448239865839524077787604", "101434749029470550537950249586016952174" ], "threshold": 0.9 }, "id": "CVE-2024-42077-ab45b10a", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.c" }, "deprecated": false, "digest": { "line_hashes": [ "189068219110157720816434886751681303151", "127967805471160015227487949794253213719", "185532866704054404170009554402420029182" ], "threshold": 0.9 }, "id": "CVE-2024-42077-c52d0a70", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111" }, { "signature_version": "v1", "signature_type": "Function", "target": { "file": "fs/ocfs2/aops.c", "function": "ocfs2_dio_end_io_write" }, "deprecated": false, "digest": { "length": 1971.0, "function_hash": "314484687540709375154073089579610852865" }, "id": "CVE-2024-42077-c8a5ff1e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.c" }, "deprecated": false, "digest": { "line_hashes": [ "189068219110157720816434886751681303151", "127967805471160015227487949794253213719", "185532866704054404170009554402420029182" ], "threshold": 0.9 }, "id": "CVE-2024-42077-cd2228e0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4" }, { "signature_version": "v1", "signature_type": "Function", "target": { "file": "fs/ocfs2/aops.c", "function": "ocfs2_dio_end_io_write" }, "deprecated": false, "digest": { "length": 1971.0, "function_hash": "314484687540709375154073089579610852865" }, "id": "CVE-2024-42077-cf67051e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.h" }, "deprecated": false, "digest": { "line_hashes": [ "141476659859539260972829616766665205355", "29849017956447989710999452039027457420", "100540055490009448239865839524077787604", "101434749029470550537950249586016952174" ], "threshold": 0.9 }, "id": "CVE-2024-42077-d950082e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687" }, { "signature_version": "v1", "signature_type": "Function", "target": { "file": "fs/ocfs2/aops.c", "function": "ocfs2_dio_end_io_write" }, "deprecated": false, "digest": { "length": 1971.0, "function_hash": "314484687540709375154073089579610852865" }, "id": "CVE-2024-42077-e0731f99", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36" }, { "signature_version": "v1", "signature_type": "Line", "target": { "file": "fs/ocfs2/journal.c" }, "deprecated": false, "digest": { "line_hashes": [ "189068219110157720816434886751681303151", "127967805471160015227487949794253213719", "185532866704054404170009554402420029182" ], "threshold": 0.9 }, "id": "CVE-2024-42077-e59f8525", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a" } ] }