{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38164",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:23.991Z",
        "datePublished": "2025-07-03T08:36:05.017Z",
        "dateUpdated": "2026-08-05T11:59:57.616Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:59:57.616Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: zone: fix to avoid inconsistence in between SIT and SSA\n\nw/ below testcase, it will cause inconsistence in between SIT and SSA.\n\ncreate_null_blk 512 2 1024 1024\nmkfs.f2fs -m /dev/nullb0\nmount /dev/nullb0 /mnt/f2fs/\ntouch /mnt/f2fs/file\nf2fs_io pinfile set /mnt/f2fs/file\nfallocate -l 4GiB /mnt/f2fs/file\n\nF2FS-fs (nullb0): Inconsistent segment (0) type [1, 0] in SSA and SIT\nCPU: 5 UID: 0 PID: 2398 Comm: fallocate Tainted: G           O       6.13.0-rc1 #84\nTainted: [O]=OOT_MODULE\nHardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006\nCall Trace:\n <TASK>\n dump_stack_lvl+0xb3/0xd0\n dump_stack+0x14/0x20\n f2fs_handle_critical_error+0x18c/0x220 [f2fs]\n f2fs_stop_checkpoint+0x38/0x50 [f2fs]\n do_garbage_collect+0x674/0x6e0 [f2fs]\n f2fs_gc_range+0x12b/0x230 [f2fs]\n f2fs_allocate_pinning_section+0x5c/0x150 [f2fs]\n f2fs_expand_inode_data+0x1cc/0x3c0 [f2fs]\n f2fs_fallocate+0x3c3/0x410 [f2fs]\n vfs_fallocate+0x15f/0x4b0\n __x64_sys_fallocate+0x4a/0x80\n x64_sys_call+0x15e8/0x1b80\n do_syscall_64+0x68/0x130\n entry_SYSCALL_64_after_hwframe+0x67/0x6f\nRIP: 0033:0x7f9dba5197ca\nF2FS-fs (nullb0): Stopped filesystem due to reason: 4\n\nThe reason is f2fs_gc_range() may try to migrate block in curseg, however,\nits SSA block is not uptodate due to the last summary block data is still\nin cache of curseg.\n\nIn this patch, we add a condition in f2fs_gc_range() to check whether\nsection is opened or not, and skip block migration for opened section."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
                        "baseScore": 7.1,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The trigger is entirely local — an `ioctl(F2FS_IOC_SET_PIN_FILE)` followed by a `fallocate(2)` syscall on a file the attacker created on a mounted f2fs volume. No network or adjacent-network reachability exists.\nAC:L - The reproducer is deterministic and single-threaded: touch, pin, fallocate 4GiB immediately shuts the filesystem down, with no race to win and no memory-layout dependency. On the affected configuration (f2fs on a zoned device, as shipped on Android zUFS and SMR/ZNS storage) every attempt succeeds.\nPR:L - `f2fs_ioc_set_pin_file()` performs no capability check whatsoever — only regular-file and write-access checks — and `f2fs_fallocate()` is unprivileged, so any local user or sandboxed app with write access to a directory on the f2fs mount (e.g. Android `/data`) can reach `f2fs_allocate_pinning_section()`.\nUI:N - The attacker performs every step itself; no victim action is required beyond the filesystem already being mounted, which is normal system state.\nS:U - The vulnerability and its impact are both confined to the kernel/filesystem security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:N - There is no read primitive — the stale-summary entries are rejected by `is_alive()`'s blkaddr comparison and `__set_test_and_free()` prevents a cursec from being re-handed out, so no memory or cross-file data is disclosed.\nI:H - The bug drives GC to migrate blocks in a section a log is actively writing, producing the SIT/SSA inconsistency the fix is named for, setting `SBI_NEED_FSCK` and recording `STOP_CP_REASON_CORRUPTED_SUMMARY` in the superblock so the volume requires repair; the forced checkpoint stop also discards other users' uncheckpointed data on the shared filesystem, a consequence the unprivileged attacker inflicts system-wide.\nA:H - `f2fs_handle_critical_error()` either panics the kernel outright under `errors=panic`, or sets `CP_ERROR_FLAG` so the entire filesystem returns `-EIO` for all subsequent operations until unmount and fsck — on a device whose `/data` or root volume is zoned f2fs this is a complete, unprivileged denial of service."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/f2fs/gc.c"
                    ],
                    "versions": [
                        {
                            "version": "40d76c393cca83938b11eb7ca8983aa3cd0ed69b",
                            "lessThan": "d1365d2abfaf2d85ee51a005da3ca373aea97f6a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9703d69d9d153bb230711d0d577454552aeb13d4",
                            "lessThan": "44a51592ac657d8e422585414d7ec17a5b50fb0e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9703d69d9d153bb230711d0d577454552aeb13d4",
                            "lessThan": "8d9431b0d11a5030aa1ce477defee455b3821701",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9703d69d9d153bb230711d0d577454552aeb13d4",
                            "lessThan": "773704c1ef96a8b70d0d186ab725f50548de82c4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6.6.33",
                            "lessThan": "6.6.130",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/f2fs/gc.c"
                    ],
                    "versions": [
                        {
                            "version": "6.9",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.9",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.130",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.34",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15.3",
                            "lessThanOrEqual": "6.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6.33",
                                    "versionEndExcluding": "6.6.130"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.9",
                                    "versionEndExcluding": "6.12.34"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.9",
                                    "versionEndExcluding": "6.15.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.9",
                                    "versionEndExcluding": "6.16"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/d1365d2abfaf2d85ee51a005da3ca373aea97f6a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/44a51592ac657d8e422585414d7ec17a5b50fb0e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8d9431b0d11a5030aa1ce477defee455b3821701"
                },
                {
                    "url": "https://git.kernel.org/stable/c/773704c1ef96a8b70d0d186ab725f50548de82c4"
                }
            ],
            "title": "f2fs: zone: fix to avoid inconsistence in between SIT and SSA",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}