{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-138817",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.896Z",
        "datePublished": "2026-11-30T13:25:15.605Z",
        "dateUpdated": "2026-11-30T13:25:15.605Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:25:15.605Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niomap: don't lose a fiemap iteration error when emitting the last extent\n\niomap_fiemap() emits extents one behind: iomap_fiemap_iter() flushes the\nprevious extent and remembers the current one, and the remembered extent\nis written with FIEMAP_EXTENT_LAST after the iteration loop.\n\nThat final flush overwrites ret, so when ->iomap_begin() fails partway\nthrough the iteration the error is replaced by the result of\niomap_to_fiemap() (zero on success) and iomap_fiemap() returns success\nwith a truncated extent list whose last entry is wrongly marked as the\nlast extent in the file.  The pre-iomap_iter code returned the error\nfrom inside the loop, before flushing the pending extent.\n\nCheck for the iteration error before flushing the pending extent, so\nthat real errors are propagated and only a successful iteration emits\nthe final FIEMAP_EXTENT_LAST extent.  -ENOENT (no mapping) is still not\nan error, and the pending extent is still emitted in that case."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/iomap/fiemap.c"
                    ],
                    "versions": [
                        {
                            "version": "7892386d35715d14c469ec98b6deab037e2e2232",
                            "lessThan": "904e6876bb9924c8ce8eb83786c68e6404bdb042",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7892386d35715d14c469ec98b6deab037e2e2232",
                            "lessThan": "635bacc0c05d369a0bea6855b354aa08cc0ab690",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7892386d35715d14c469ec98b6deab037e2e2232",
                            "lessThan": "29d93cc25328ec27d34098c722ef837778612dd7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7892386d35715d14c469ec98b6deab037e2e2232",
                            "lessThan": "512d832beec8d2487e058befb90258e2bce89319",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7892386d35715d14c469ec98b6deab037e2e2232",
                            "lessThan": "d6c4a5d2cc6ad695bdc89ce6ac028eac17484b9a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7892386d35715d14c469ec98b6deab037e2e2232",
                            "lessThan": "5d6f21538389fa2b9fa143afdebb4cbe170ec900",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7892386d35715d14c469ec98b6deab037e2e2232",
                            "lessThan": "0d0104adc2c8316433b660cdf6d182a09881864f",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/iomap/fiemap.c"
                    ],
                    "versions": [
                        {
                            "version": "5.15",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.15",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.117",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.63",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.4",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "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": "5.15",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.12.117"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.18.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "7.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/904e6876bb9924c8ce8eb83786c68e6404bdb042"
                },
                {
                    "url": "https://git.kernel.org/stable/c/635bacc0c05d369a0bea6855b354aa08cc0ab690"
                },
                {
                    "url": "https://git.kernel.org/stable/c/29d93cc25328ec27d34098c722ef837778612dd7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/512d832beec8d2487e058befb90258e2bce89319"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d6c4a5d2cc6ad695bdc89ce6ac028eac17484b9a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5d6f21538389fa2b9fa143afdebb4cbe170ec900"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0d0104adc2c8316433b660cdf6d182a09881864f"
                }
            ],
            "title": "iomap: don't lose a fiemap iteration error when emitting the last extent",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}