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]
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42077.json"
}[
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36",
"digest": {
"threshold": 0.9,
"line_hashes": [
"245960170895315941234449390201511630004",
"180432073638403047197050515972705115764",
"123286455619292485591033250406318992248",
"9046632427690630706010091168871667080"
]
},
"target": {
"file": "fs/ocfs2/aops.c"
},
"id": "CVE-2024-42077-058cbbec",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a",
"digest": {
"function_hash": "314484687540709375154073089579610852865",
"length": 1971.0
},
"target": {
"file": "fs/ocfs2/aops.c",
"function": "ocfs2_dio_end_io_write"
},
"id": "CVE-2024-42077-07a5e882",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6",
"digest": {
"threshold": 0.9,
"line_hashes": [
"141476659859539260972829616766665205355",
"29849017956447989710999452039027457420",
"100540055490009448239865839524077787604",
"101434749029470550537950249586016952174"
]
},
"target": {
"file": "fs/ocfs2/journal.h"
},
"id": "CVE-2024-42077-083d8928",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687",
"digest": {
"threshold": 0.9,
"line_hashes": [
"92793260294652958464004645294355444834",
"87191109965814154894336510541781991401",
"168127193204591027609850694195943456345"
]
},
"target": {
"file": "fs/ocfs2/ocfs2_trace.h"
},
"id": "CVE-2024-42077-12673b08",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36",
"digest": {
"threshold": 0.9,
"line_hashes": [
"141476659859539260972829616766665205355",
"29849017956447989710999452039027457420",
"100540055490009448239865839524077787604",
"101434749029470550537950249586016952174"
]
},
"target": {
"file": "fs/ocfs2/journal.h"
},
"id": "CVE-2024-42077-137185e0",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4",
"digest": {
"threshold": 0.9,
"line_hashes": [
"245960170895315941234449390201511630004",
"180432073638403047197050515972705115764",
"123286455619292485591033250406318992248",
"9046632427690630706010091168871667080"
]
},
"target": {
"file": "fs/ocfs2/aops.c"
},
"id": "CVE-2024-42077-16f95c52",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"141476659859539260972829616766665205355",
"29849017956447989710999452039027457420",
"100540055490009448239865839524077787604",
"101434749029470550537950249586016952174"
]
},
"target": {
"file": "fs/ocfs2/journal.h"
},
"id": "CVE-2024-42077-2f52ba9e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4",
"digest": {
"threshold": 0.9,
"line_hashes": [
"92793260294652958464004645294355444834",
"87191109965814154894336510541781991401",
"168127193204591027609850694195943456345"
]
},
"target": {
"file": "fs/ocfs2/ocfs2_trace.h"
},
"id": "CVE-2024-42077-5041874b",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111",
"digest": {
"threshold": 0.9,
"line_hashes": [
"92793260294652958464004645294355444834",
"87191109965814154894336510541781991401",
"168127193204591027609850694195943456345"
]
},
"target": {
"file": "fs/ocfs2/ocfs2_trace.h"
},
"id": "CVE-2024-42077-5626734c",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6",
"digest": {
"threshold": 0.9,
"line_hashes": [
"92793260294652958464004645294355444834",
"87191109965814154894336510541781991401",
"168127193204591027609850694195943456345"
]
},
"target": {
"file": "fs/ocfs2/ocfs2_trace.h"
},
"id": "CVE-2024-42077-6875254b",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"245960170895315941234449390201511630004",
"180432073638403047197050515972705115764",
"123286455619292485591033250406318992248",
"9046632427690630706010091168871667080"
]
},
"target": {
"file": "fs/ocfs2/aops.c"
},
"id": "CVE-2024-42077-6c188c78",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687",
"digest": {
"threshold": 0.9,
"line_hashes": [
"245960170895315941234449390201511630004",
"180432073638403047197050515972705115764",
"123286455619292485591033250406318992248",
"9046632427690630706010091168871667080"
]
},
"target": {
"file": "fs/ocfs2/aops.c"
},
"id": "CVE-2024-42077-6c843f10",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"92793260294652958464004645294355444834",
"87191109965814154894336510541781991401",
"168127193204591027609850694195943456345"
]
},
"target": {
"file": "fs/ocfs2/ocfs2_trace.h"
},
"id": "CVE-2024-42077-6ee6c35a",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4",
"digest": {
"function_hash": "314484687540709375154073089579610852865",
"length": 1971.0
},
"target": {
"file": "fs/ocfs2/aops.c",
"function": "ocfs2_dio_end_io_write"
},
"id": "CVE-2024-42077-7bcc28e5",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111",
"digest": {
"threshold": 0.9,
"line_hashes": [
"245960170895315941234449390201511630004",
"180432073638403047197050515972705115764",
"123286455619292485591033250406318992248",
"9046632427690630706010091168871667080"
]
},
"target": {
"file": "fs/ocfs2/aops.c"
},
"id": "CVE-2024-42077-81f0800d",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687",
"digest": {
"function_hash": "314484687540709375154073089579610852865",
"length": 1971.0
},
"target": {
"file": "fs/ocfs2/aops.c",
"function": "ocfs2_dio_end_io_write"
},
"id": "CVE-2024-42077-88e29461",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36",
"digest": {
"threshold": 0.9,
"line_hashes": [
"92793260294652958464004645294355444834",
"87191109965814154894336510541781991401",
"168127193204591027609850694195943456345"
]
},
"target": {
"file": "fs/ocfs2/ocfs2_trace.h"
},
"id": "CVE-2024-42077-8a54243d",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687",
"digest": {
"threshold": 0.9,
"line_hashes": [
"189068219110157720816434886751681303151",
"127967805471160015227487949794253213719",
"185532866704054404170009554402420029182"
]
},
"target": {
"file": "fs/ocfs2/journal.c"
},
"id": "CVE-2024-42077-8c049cd6",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4",
"digest": {
"threshold": 0.9,
"line_hashes": [
"141476659859539260972829616766665205355",
"29849017956447989710999452039027457420",
"100540055490009448239865839524077787604",
"101434749029470550537950249586016952174"
]
},
"target": {
"file": "fs/ocfs2/journal.h"
},
"id": "CVE-2024-42077-9071bce6",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6",
"digest": {
"threshold": 0.9,
"line_hashes": [
"245960170895315941234449390201511630004",
"180432073638403047197050515972705115764",
"123286455619292485591033250406318992248",
"9046632427690630706010091168871667080"
]
},
"target": {
"file": "fs/ocfs2/aops.c"
},
"id": "CVE-2024-42077-93ae1230",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6",
"digest": {
"threshold": 0.9,
"line_hashes": [
"189068219110157720816434886751681303151",
"127967805471160015227487949794253213719",
"185532866704054404170009554402420029182"
]
},
"target": {
"file": "fs/ocfs2/journal.c"
},
"id": "CVE-2024-42077-9c5989b4",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36",
"digest": {
"threshold": 0.9,
"line_hashes": [
"189068219110157720816434886751681303151",
"127967805471160015227487949794253213719",
"185532866704054404170009554402420029182"
]
},
"target": {
"file": "fs/ocfs2/journal.c"
},
"id": "CVE-2024-42077-a796c1f0",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111",
"digest": {
"threshold": 0.9,
"line_hashes": [
"141476659859539260972829616766665205355",
"29849017956447989710999452039027457420",
"100540055490009448239865839524077787604",
"101434749029470550537950249586016952174"
]
},
"target": {
"file": "fs/ocfs2/journal.h"
},
"id": "CVE-2024-42077-ab45b10a",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111",
"digest": {
"threshold": 0.9,
"line_hashes": [
"189068219110157720816434886751681303151",
"127967805471160015227487949794253213719",
"185532866704054404170009554402420029182"
]
},
"target": {
"file": "fs/ocfs2/journal.c"
},
"id": "CVE-2024-42077-c52d0a70",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c05ffb693bfb42a48ef3ee88a55b57392984e111",
"digest": {
"function_hash": "314484687540709375154073089579610852865",
"length": 1971.0
},
"target": {
"file": "fs/ocfs2/aops.c",
"function": "ocfs2_dio_end_io_write"
},
"id": "CVE-2024-42077-c8a5ff1e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea2d1c6789722d58ec191f14f9a02518d55b6b4",
"digest": {
"threshold": 0.9,
"line_hashes": [
"189068219110157720816434886751681303151",
"127967805471160015227487949794253213719",
"185532866704054404170009554402420029182"
]
},
"target": {
"file": "fs/ocfs2/journal.c"
},
"id": "CVE-2024-42077-cd2228e0",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@331d1079d58206ff7dc5518185f800b412f89bc6",
"digest": {
"function_hash": "314484687540709375154073089579610852865",
"length": 1971.0
},
"target": {
"file": "fs/ocfs2/aops.c",
"function": "ocfs2_dio_end_io_write"
},
"id": "CVE-2024-42077-cf67051e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a68b896aa56e435506453ec8835bc991ec3ae687",
"digest": {
"threshold": 0.9,
"line_hashes": [
"141476659859539260972829616766665205355",
"29849017956447989710999452039027457420",
"100540055490009448239865839524077787604",
"101434749029470550537950249586016952174"
]
},
"target": {
"file": "fs/ocfs2/journal.h"
},
"id": "CVE-2024-42077-d950082e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be346c1a6eeb49d8fda827d2a9522124c2f72f36",
"digest": {
"function_hash": "314484687540709375154073089579610852865",
"length": 1971.0
},
"target": {
"file": "fs/ocfs2/aops.c",
"function": "ocfs2_dio_end_io_write"
},
"id": "CVE-2024-42077-e0731f99",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@320273b5649bbcee87f9e65343077189699d2a7a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"189068219110157720816434886751681303151",
"127967805471160015227487949794253213719",
"185532866704054404170009554402420029182"
]
},
"target": {
"file": "fs/ocfs2/journal.c"
},
"id": "CVE-2024-42077-e59f8525",
"deprecated": false,
"signature_version": "v1"
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-42077.json"