{"api_version":"1","generated_at":"2026-10-01T15:45:24+00:00","cve":"CVE-2022-49363","urls":{"html":"https://cve.report/CVE-2022-49363","api":"https://cve.report/api/cve/CVE-2022-49363.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-49363","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-49363"},"summary":{"title":"f2fs: fix to do sanity check on block address in f2fs_do_zero_range()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to do sanity check on block address in f2fs_do_zero_range()\n\nAs Yanming reported in bugzilla:\n\nhttps://bugzilla.kernel.org/show_bug.cgi?id=215894\n\nI have encountered a bug in F2FS file system in kernel v5.17.\n\nI have uploaded the system call sequence as case.c, and a fuzzed image can\nbe found in google net disk\n\nThe kernel should enable CONFIG_KASAN=y and CONFIG_KASAN_INLINE=y. You can\nreproduce the bug by running the following commands:\n\nkernel BUG at fs/f2fs/segment.c:2291!\nCall Trace:\n f2fs_invalidate_blocks+0x193/0x2d0\n f2fs_fallocate+0x2593/0x4a70\n vfs_fallocate+0x2a5/0xac0\n ksys_fallocate+0x35/0x70\n __x64_sys_fallocate+0x8e/0xf0\n do_syscall_64+0x3b/0x90\n entry_SYSCALL_64_after_hwframe+0x44/0xae\n\nThe root cause is, after image was fuzzed, block mapping info in inode\nwill be inconsistent with SIT table, so in f2fs_fallocate(), it will cause\npanic when updating SIT with invalid blkaddr.\n\nLet's fix the issue by adding sanity check on block address before updating\nSIT table with it.","state":"PUBLISHED","assigner":"Linux","published_at":"2025-02-26 07:01:12","updated_at":"2026-08-15 13:17:20"},"problem_types":["NVD-CWE-noinfo"],"metrics":[{"version":"3.1","source":"nvd@nist.gov","type":"Primary","score":"5.5","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/7361c9f2bd6a8f0cbb41cdea9aff04765ff23f67","name":"https://git.kernel.org/stable/c/7361c9f2bd6a8f0cbb41cdea9aff04765ff23f67","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/805b48b234a2803cb7daec7f158af12f0fbaefac","name":"https://git.kernel.org/stable/c/805b48b234a2803cb7daec7f158af12f0fbaefac","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a34d7b49894b0533222188a52e2958750f830efd","name":"https://git.kernel.org/stable/c/a34d7b49894b0533222188a52e2958750f830efd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/25f8236213a91efdf708b9d77e9e51b6fc3e141c","name":"https://git.kernel.org/stable/c/25f8236213a91efdf708b9d77e9e51b6fc3e141c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f2e1c38b5ac64eb1a16a89c52fb419409d12c25b","name":"https://git.kernel.org/stable/c/f2e1c38b5ac64eb1a16a89c52fb419409d12c25b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/470493be19a5730ed432e3ac0f29a2ee7fc6c557","name":"https://git.kernel.org/stable/c/470493be19a5730ed432e3ac0f29a2ee7fc6c557","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-49363","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49363","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 75cd4e098d178433436abce08146a21647bb4585 7361c9f2bd6a8f0cbb41cdea9aff04765ff23f67 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 75cd4e098d178433436abce08146a21647bb4585 a34d7b49894b0533222188a52e2958750f830efd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 75cd4e098d178433436abce08146a21647bb4585 f2e1c38b5ac64eb1a16a89c52fb419409d12c25b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 75cd4e098d178433436abce08146a21647bb4585 470493be19a5730ed432e3ac0f29a2ee7fc6c557 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 75cd4e098d178433436abce08146a21647bb4585 805b48b234a2803cb7daec7f158af12f0fbaefac git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 75cd4e098d178433436abce08146a21647bb4585 25f8236213a91efdf708b9d77e9e51b6fc3e141c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.2","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.4.198 5.4.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.121 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.46 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.17.14 5.17.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.18.3 5.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.19 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"49363","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"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":"7361c9f2bd6a8f0cbb41cdea9aff04765ff23f67","status":"affected","version":"75cd4e098d178433436abce08146a21647bb4585","versionType":"git"},{"lessThan":"a34d7b49894b0533222188a52e2958750f830efd","status":"affected","version":"75cd4e098d178433436abce08146a21647bb4585","versionType":"git"},{"lessThan":"f2e1c38b5ac64eb1a16a89c52fb419409d12c25b","status":"affected","version":"75cd4e098d178433436abce08146a21647bb4585","versionType":"git"},{"lessThan":"470493be19a5730ed432e3ac0f29a2ee7fc6c557","status":"affected","version":"75cd4e098d178433436abce08146a21647bb4585","versionType":"git"},{"lessThan":"805b48b234a2803cb7daec7f158af12f0fbaefac","status":"affected","version":"75cd4e098d178433436abce08146a21647bb4585","versionType":"git"},{"lessThan":"25f8236213a91efdf708b9d77e9e51b6fc3e141c","status":"affected","version":"75cd4e098d178433436abce08146a21647bb4585","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":"4.2"},{"lessThan":"4.2","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.4.*","status":"unaffected","version":"5.4.198","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.121","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.46","versionType":"semver"},{"lessThanOrEqual":"5.17.*","status":"unaffected","version":"5.17.14","versionType":"semver"},{"lessThanOrEqual":"5.18.*","status":"unaffected","version":"5.18.3","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"5.19","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.4.198","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.121","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.46","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.17.14","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.18.3","versionStartIncluding":"4.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.19","versionStartIncluding":"4.2","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to do sanity check on block address in f2fs_do_zero_range()\n\nAs Yanming reported in bugzilla:\n\nhttps://bugzilla.kernel.org/show_bug.cgi?id=215894\n\nI have encountered a bug in F2FS file system in kernel v5.17.\n\nI have uploaded the system call sequence as case.c, and a fuzzed image can\nbe found in google net disk\n\nThe kernel should enable CONFIG_KASAN=y and CONFIG_KASAN_INLINE=y. You can\nreproduce the bug by running the following commands:\n\nkernel BUG at fs/f2fs/segment.c:2291!\nCall Trace:\n f2fs_invalidate_blocks+0x193/0x2d0\n f2fs_fallocate+0x2593/0x4a70\n vfs_fallocate+0x2a5/0xac0\n ksys_fallocate+0x35/0x70\n __x64_sys_fallocate+0x8e/0xf0\n do_syscall_64+0x3b/0x90\n entry_SYSCALL_64_after_hwframe+0x44/0xae\n\nThe root cause is, after image was fuzzed, block mapping info in inode\nwill be inconsistent with SIT table, so in f2fs_fallocate(), it will cause\npanic when updating SIT with invalid blkaddr.\n\nLet's fix the issue by adding sanity check on block address before updating\nSIT table with it."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is reached via local VFS fallocate(FALLOC_FL_ZERO_RANGE) on a mounted crafted f2fs image (f2fs_fallocate → f2fs_zero_range → f2fs_do_zero_range → f2fs_invalidate_blocks); f2fs is not a network protocol handler, and exploitation depends on supplying/mounting malicious on-disk metadata locally.\nAC:L - The attacker fully controls the on-disk inode/dnode block addresses in the fuzzed image, so fallocate with ZERO_RANGE|KEEP_SIZE (as in the bugzilla case.c) deterministically hits update_sit_entry with the bad blkaddr; no race or attacker-uncontrollable timing is required.\nPR:L - Once the crafted image is mounted (Android/udisks automount of SD/removable media, shared workstation), triggering requires only an unprivileged local user calling fallocate on a writable file; there is no capability check on the path from vfs_fallocate into f2fs_do_zero_range.\nUI:N - After the malicious image is present and mounted via automount or delegated mount rights, the attacker drives fallocate themselves with no further action by a separate victim user.\nS:U - Corruption and crash remain within the host kernel’s f2fs/SIT memory; this is standard local kernel impact, not a VM escape, IOMMU bypass, or other cross-boundary break.\nC:H - An attacker-chosen data_blkaddr that is outside MAIN_BLKADDR..MAX_BLKADDR is passed unchecked into get_seg_entry(), which indexes sit_i->sentries[segno] with no bounds check, yielding an out-of-bounds read of adjacent kernel heap before any BUG_ON.\nI:H - The same unchecked segno drives OOB writes through update_sit_entry (valid_blocks, cur_valid_map bit ops) and, with default !CONFIG_F2FS_CHECK_FS, f2fs_bug_on only WARNs then continues mutating SIT state—an attacker-controlled heap corruption / metadata-write primitive.\nA:H - The reported impact is a hard kernel BUG at update_sit_entry (f2fs_bug_on on negative/overflow valid_blocks or wrongly cleared SIT bitmap) under CONFIG_F2FS_CHECK_FS/KASAN as in the original reproducer, and OOB accesses can also oops on unmapped memory."}]}],"providerMetadata":{"dateUpdated":"2026-08-15T12:22:39.847Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/7361c9f2bd6a8f0cbb41cdea9aff04765ff23f67"},{"url":"https://git.kernel.org/stable/c/a34d7b49894b0533222188a52e2958750f830efd"},{"url":"https://git.kernel.org/stable/c/f2e1c38b5ac64eb1a16a89c52fb419409d12c25b"},{"url":"https://git.kernel.org/stable/c/470493be19a5730ed432e3ac0f29a2ee7fc6c557"},{"url":"https://git.kernel.org/stable/c/805b48b234a2803cb7daec7f158af12f0fbaefac"},{"url":"https://git.kernel.org/stable/c/25f8236213a91efdf708b9d77e9e51b6fc3e141c"}],"title":"f2fs: fix to do sanity check on block address in f2fs_do_zero_range()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2022-49363","datePublished":"2025-02-26T02:11:09.817Z","dateReserved":"2025-02-26T02:08:31.547Z","dateUpdated":"2026-08-15T12:22:39.847Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-02-26 07:01:12","lastModifiedDate":"2026-08-15 13:17:20","problem_types":["NVD-CWE-noinfo"],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9},{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"5.4.198","matchCriteriaId":"F5FBE99B-FD10-47FC-B085-61E208BD06D6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.10.121","matchCriteriaId":"34ACD872-E5BC-401C-93D5-B357A62426E0"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.46","matchCriteriaId":"20D41697-0E8B-4B7D-8842-F17BF2AA21E1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.17.14","matchCriteriaId":"15E2DD33-2255-4B76-9C15-04FF8CBAB252"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"5.18.3","matchCriteriaId":"8E122216-2E9E-4B3E-B7B8-D575A45BA3C2"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"49363","Ordinal":"1","Title":"f2fs: fix to do sanity check on block address in f2fs_do_zero_ra","CVE":"CVE-2022-49363","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"49363","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to do sanity check on block address in f2fs_do_zero_range()\n\nAs Yanming reported in bugzilla:\n\nhttps://bugzilla.kernel.org/show_bug.cgi?id=215894\n\nI have encountered a bug in F2FS file system in kernel v5.17.\n\nI have uploaded the system call sequence as case.c, and a fuzzed image can\nbe found in google net disk\n\nThe kernel should enable CONFIG_KASAN=y and CONFIG_KASAN_INLINE=y. You can\nreproduce the bug by running the following commands:\n\nkernel BUG at fs/f2fs/segment.c:2291!\nCall Trace:\n f2fs_invalidate_blocks+0x193/0x2d0\n f2fs_fallocate+0x2593/0x4a70\n vfs_fallocate+0x2a5/0xac0\n ksys_fallocate+0x35/0x70\n __x64_sys_fallocate+0x8e/0xf0\n do_syscall_64+0x3b/0x90\n entry_SYSCALL_64_after_hwframe+0x44/0xae\n\nThe root cause is, after image was fuzzed, block mapping info in inode\nwill be inconsistent with SIT table, so in f2fs_fallocate(), it will cause\npanic when updating SIT with invalid blkaddr.\n\nLet's fix the issue by adding sanity check on block address before updating\nSIT table with it.","Type":"Description","Title":"f2fs: fix to do sanity check on block address in f2fs_do_zero_ra"}]}}}