CVE-2024-35844 (GCVE-0-2024-35844)
Vulnerability from cvelistv5
Published
2024-05-17 14:40
Modified
2025-05-04 09:06
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
f2fs: compress: fix reserve_cblocks counting error when out of space
When a file only needs one direct_node, performing the following
operations will cause the file to be unrepairable:
unisoc # ./f2fs_io compress test.apk
unisoc #df -h | grep dm-48
/dev/block/dm-48 112G 112G 1.2M 100% /data
unisoc # ./f2fs_io release_cblocks test.apk
924
unisoc # df -h | grep dm-48
/dev/block/dm-48 112G 112G 4.8M 100% /data
unisoc # dd if=/dev/random of=file4 bs=1M count=3
3145728 bytes (3.0 M) copied, 0.025 s, 120 M/s
unisoc # df -h | grep dm-48
/dev/block/dm-48 112G 112G 1.8M 100% /data
unisoc # ./f2fs_io reserve_cblocks test.apk
F2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device
adb reboot
unisoc # df -h | grep dm-48
/dev/block/dm-48 112G 112G 11M 100% /data
unisoc # ./f2fs_io reserve_cblocks test.apk
0
This is because the file has only one direct_node. After returning
to -ENOSPC, reserved_blocks += ret will not be executed. As a result,
the reserved_blocks at this time is still 0, which is not the real
number of reserved blocks. Therefore, fsck cannot be set to repair
the file.
After this patch, the fsck flag will be set to fix this problem.
unisoc # df -h | grep dm-48
/dev/block/dm-48 112G 112G 1.8M 100% /data
unisoc # ./f2fs_io reserve_cblocks test.apk
F2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device
adb reboot then fsck will be executed
unisoc # df -h | grep dm-48
/dev/block/dm-48 112G 112G 11M 100% /data
unisoc # ./f2fs_io reserve_cblocks test.apk
924
References
Impacted products
| Vendor | Product | Version | ||
|---|---|---|---|---|
| Linux | Linux |
Version: c75488fb4d82b697f381f855bf5b16779df440aa Version: c75488fb4d82b697f381f855bf5b16779df440aa Version: c75488fb4d82b697f381f855bf5b16779df440aa Version: c75488fb4d82b697f381f855bf5b16779df440aa Version: c75488fb4d82b697f381f855bf5b16779df440aa Version: c75488fb4d82b697f381f855bf5b16779df440aa |
||
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2024-35844",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-05-17T16:58:26.825804Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2024-06-04T17:34:11.979Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
},
{
"providerMetadata": {
"dateUpdated": "2024-08-02T03:21:48.533Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"tags": [
"x_transferred"
],
"url": "https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee"
},
{
"tags": [
"x_transferred"
],
"url": "https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685"
},
{
"tags": [
"x_transferred"
],
"url": "https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a"
},
{
"tags": [
"x_transferred"
],
"url": "https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc"
},
{
"tags": [
"x_transferred"
],
"url": "https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3"
},
{
"tags": [
"x_transferred"
],
"url": "https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f"
},
{
"tags": [
"x_transferred"
],
"url": "http://www.openwall.com/lists/oss-security/2024/05/30/2"
},
{
"tags": [
"x_transferred"
],
"url": "http://www.openwall.com/lists/oss-security/2024/05/30/1"
}
],
"title": "CVE Program Container"
}
],
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"fs/f2fs/file.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "fa3ac8b1a227d9b470b87972494293348b5839ee",
"status": "affected",
"version": "c75488fb4d82b697f381f855bf5b16779df440aa",
"versionType": "git"
},
{
"lessThan": "889846dfc8ee2cf31148a44bfd2faeb2faadc685",
"status": "affected",
"version": "c75488fb4d82b697f381f855bf5b16779df440aa",
"versionType": "git"
},
{
"lessThan": "f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a",
"status": "affected",
"version": "c75488fb4d82b697f381f855bf5b16779df440aa",
"versionType": "git"
},
{
"lessThan": "569c198c9e2093fd29cc071856a4e548fda506bc",
"status": "affected",
"version": "c75488fb4d82b697f381f855bf5b16779df440aa",
"versionType": "git"
},
{
"lessThan": "fc0aed88afbf6f606205129a7466eebdf528e3f3",
"status": "affected",
"version": "c75488fb4d82b697f381f855bf5b16779df440aa",
"versionType": "git"
},
{
"lessThan": "2f6d721e14b69d6e1251f69fa238b48e8374e25f",
"status": "affected",
"version": "c75488fb4d82b697f381f855bf5b16779df440aa",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"fs/f2fs/file.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "5.8"
},
{
"lessThan": "5.8",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.15.*",
"status": "unaffected",
"version": "5.15.153",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"version": "6.1.83",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.6.*",
"status": "unaffected",
"version": "6.6.23",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.7.*",
"status": "unaffected",
"version": "6.7.11",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.8.*",
"status": "unaffected",
"version": "6.8.2",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.9",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.15.153",
"versionStartIncluding": "5.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.1.83",
"versionStartIncluding": "5.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.6.23",
"versionStartIncluding": "5.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.7.11",
"versionStartIncluding": "5.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.8.2",
"versionStartIncluding": "5.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.9",
"versionStartIncluding": "5.8",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: compress: fix reserve_cblocks counting error when out of space\n\nWhen a file only needs one direct_node, performing the following\noperations will cause the file to be unrepairable:\n\nunisoc # ./f2fs_io compress test.apk\nunisoc #df -h | grep dm-48\n/dev/block/dm-48 112G 112G 1.2M 100% /data\n\nunisoc # ./f2fs_io release_cblocks test.apk\n924\nunisoc # df -h | grep dm-48\n/dev/block/dm-48 112G 112G 4.8M 100% /data\n\nunisoc # dd if=/dev/random of=file4 bs=1M count=3\n3145728 bytes (3.0 M) copied, 0.025 s, 120 M/s\nunisoc # df -h | grep dm-48\n/dev/block/dm-48 112G 112G 1.8M 100% /data\n\nunisoc # ./f2fs_io reserve_cblocks test.apk\nF2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device\n\nadb reboot\nunisoc # df -h | grep dm-48\n/dev/block/dm-48 112G 112G 11M 100% /data\nunisoc # ./f2fs_io reserve_cblocks test.apk\n0\n\nThis is because the file has only one direct_node. After returning\nto -ENOSPC, reserved_blocks += ret will not be executed. As a result,\nthe reserved_blocks at this time is still 0, which is not the real\nnumber of reserved blocks. Therefore, fsck cannot be set to repair\nthe file.\n\nAfter this patch, the fsck flag will be set to fix this problem.\n\nunisoc # df -h | grep dm-48\n/dev/block/dm-48 112G 112G 1.8M 100% /data\nunisoc # ./f2fs_io reserve_cblocks test.apk\nF2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device\n\nadb reboot then fsck will be executed\nunisoc # df -h | grep dm-48\n/dev/block/dm-48 112G 112G 11M 100% /data\nunisoc # ./f2fs_io reserve_cblocks test.apk\n924"
}
],
"providerMetadata": {
"dateUpdated": "2025-05-04T09:06:41.254Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee"
},
{
"url": "https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685"
},
{
"url": "https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a"
},
{
"url": "https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc"
},
{
"url": "https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3"
},
{
"url": "https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f"
}
],
"title": "f2fs: compress: fix reserve_cblocks counting error when out of space",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2024-35844",
"datePublished": "2024-05-17T14:40:11.419Z",
"dateReserved": "2024-05-17T13:50:33.104Z",
"dateUpdated": "2025-05-04T09:06:41.254Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"vulnrichment": {
"containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f\", \"tags\": [\"x_transferred\"]}, {\"url\": \"http://www.openwall.com/lists/oss-security/2024/05/30/2\", \"tags\": [\"x_transferred\"]}, {\"url\": \"http://www.openwall.com/lists/oss-security/2024/05/30/1\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T03:21:48.533Z\"}}, {\"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-35844\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-05-17T16:58:26.825804Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-05-23T19:01:24.576Z\"}, \"title\": \"CISA ADP Vulnrichment\"}], \"cna\": {\"title\": \"f2fs: compress: fix reserve_cblocks counting error when out of space\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"c75488fb4d82b697f381f855bf5b16779df440aa\", \"lessThan\": \"fa3ac8b1a227d9b470b87972494293348b5839ee\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c75488fb4d82b697f381f855bf5b16779df440aa\", \"lessThan\": \"889846dfc8ee2cf31148a44bfd2faeb2faadc685\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c75488fb4d82b697f381f855bf5b16779df440aa\", \"lessThan\": \"f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c75488fb4d82b697f381f855bf5b16779df440aa\", \"lessThan\": \"569c198c9e2093fd29cc071856a4e548fda506bc\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c75488fb4d82b697f381f855bf5b16779df440aa\", \"lessThan\": \"fc0aed88afbf6f606205129a7466eebdf528e3f3\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c75488fb4d82b697f381f855bf5b16779df440aa\", \"lessThan\": \"2f6d721e14b69d6e1251f69fa238b48e8374e25f\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/f2fs/file.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.8\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.8\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.15.153\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1.83\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.23\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.7.11\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.7.*\"}, {\"status\": \"unaffected\", \"version\": \"6.8.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.8.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/f2fs/file.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee\"}, {\"url\": \"https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685\"}, {\"url\": \"https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a\"}, {\"url\": \"https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc\"}, {\"url\": \"https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3\"}, {\"url\": \"https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nf2fs: compress: fix reserve_cblocks counting error when out of space\\n\\nWhen a file only needs one direct_node, performing the following\\noperations will cause the file to be unrepairable:\\n\\nunisoc # ./f2fs_io compress test.apk\\nunisoc #df -h | grep dm-48\\n/dev/block/dm-48 112G 112G 1.2M 100% /data\\n\\nunisoc # ./f2fs_io release_cblocks test.apk\\n924\\nunisoc # df -h | grep dm-48\\n/dev/block/dm-48 112G 112G 4.8M 100% /data\\n\\nunisoc # dd if=/dev/random of=file4 bs=1M count=3\\n3145728 bytes (3.0 M) copied, 0.025 s, 120 M/s\\nunisoc # df -h | grep dm-48\\n/dev/block/dm-48 112G 112G 1.8M 100% /data\\n\\nunisoc # ./f2fs_io reserve_cblocks test.apk\\nF2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device\\n\\nadb reboot\\nunisoc # df -h | grep dm-48\\n/dev/block/dm-48 112G 112G 11M 100% /data\\nunisoc # ./f2fs_io reserve_cblocks test.apk\\n0\\n\\nThis is because the file has only one direct_node. After returning\\nto -ENOSPC, reserved_blocks += ret will not be executed. As a result,\\nthe reserved_blocks at this time is still 0, which is not the real\\nnumber of reserved blocks. Therefore, fsck cannot be set to repair\\nthe file.\\n\\nAfter this patch, the fsck flag will be set to fix this problem.\\n\\nunisoc # df -h | grep dm-48\\n/dev/block/dm-48 112G 112G 1.8M 100% /data\\nunisoc # ./f2fs_io reserve_cblocks test.apk\\nF2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device\\n\\nadb reboot then fsck will be executed\\nunisoc # df -h | grep dm-48\\n/dev/block/dm-48 112G 112G 11M 100% /data\\nunisoc # ./f2fs_io reserve_cblocks test.apk\\n924\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.153\", \"versionStartIncluding\": \"5.8\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.83\", \"versionStartIncluding\": \"5.8\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.23\", \"versionStartIncluding\": \"5.8\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.7.11\", \"versionStartIncluding\": \"5.8\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.8.2\", \"versionStartIncluding\": \"5.8\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.9\", \"versionStartIncluding\": \"5.8\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-05-04T09:06:41.254Z\"}}}",
"cveMetadata": "{\"cveId\": \"CVE-2024-35844\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-05-04T09:06:41.254Z\", \"dateReserved\": \"2024-05-17T13:50:33.104Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-05-17T14:40:11.419Z\", \"assignerShortName\": \"Linux\"}",
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…