{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-21721",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-12-29T08:45:45.753Z",
        "datePublished": "2025-02-27T02:07:29.784Z",
        "dateUpdated": "2026-05-11T21:05:08.609Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-11T21:05:08.609Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: handle errors that nilfs_prepare_chunk() may return\n\nPatch series \"nilfs2: fix issues with rename operations\".\n\nThis series fixes BUG_ON check failures reported by syzbot around rename\noperations, and a minor behavioral issue where the mtime of a child\ndirectory changes when it is renamed instead of moved.\n\n\nThis patch (of 2):\n\nThe directory manipulation routines nilfs_set_link() and\nnilfs_delete_entry() rewrite the directory entry in the folio/page\npreviously read by nilfs_find_entry(), so error handling is omitted on the\nassumption that nilfs_prepare_chunk(), which prepares the buffer for\nrewriting, will always succeed for these.  And if an error is returned, it\ntriggers the legacy BUG_ON() checks in each routine.\n\nThis assumption is wrong, as proven by syzbot: the buffer layer called by\nnilfs_prepare_chunk() may call nilfs_get_block() if necessary, which may\nfail due to metadata corruption or other reasons.  This has been there all\nalong, but improved sanity checks and error handling may have made it more\nreproducible in fuzzing tests.\n\nFix this issue by adding missing error paths in nilfs_set_link(),\nnilfs_delete_entry(), and their caller nilfs_rename()."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nilfs2/dir.c",
                        "fs/nilfs2/namei.c",
                        "fs/nilfs2/nilfs.h"
                    ],
                    "versions": [
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "b38c6c260c2415c7f0968871305e7a093daabb4c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "f70bd2d8ca454e0ed78970f72147ca321dbaa015",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "607dc724b162f4452dc768865e578c1a509a1c8c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "1ee2d454baa361d2964e3e2f2cca9ee3f769d93c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "7891ac3b0a5c56f7148af507306308ab841cdc31",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "eddd3176b8c4c83a46ab974574cda7c3dfe09388",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "481136234dfe96c7f92770829bec6111c7c5f5dd",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "ee70999a988b8abc3490609142f50ebaa8344432",
                            "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/nilfs2/dir.c",
                        "fs/nilfs2/namei.c",
                        "fs/nilfs2/nilfs.h"
                    ],
                    "versions": [
                        {
                            "version": "2.6.30",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.30",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.291",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.235",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.179",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.131",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.80",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.13",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.2",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14",
                            "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": "2.6.30",
                                    "versionEndExcluding": "5.4.291"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "5.10.235"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "5.15.179"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.1.131"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.6.80"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.12.13"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.13.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.14"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/b38c6c260c2415c7f0968871305e7a093daabb4c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f70bd2d8ca454e0ed78970f72147ca321dbaa015"
                },
                {
                    "url": "https://git.kernel.org/stable/c/607dc724b162f4452dc768865e578c1a509a1c8c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1ee2d454baa361d2964e3e2f2cca9ee3f769d93c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/7891ac3b0a5c56f7148af507306308ab841cdc31"
                },
                {
                    "url": "https://git.kernel.org/stable/c/eddd3176b8c4c83a46ab974574cda7c3dfe09388"
                },
                {
                    "url": "https://git.kernel.org/stable/c/481136234dfe96c7f92770829bec6111c7c5f5dd"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ee70999a988b8abc3490609142f50ebaa8344432"
                }
            ],
            "title": "nilfs2: handle errors that nilfs_prepare_chunk() may return",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2025-11-03T19:36:19.085Z"
                }
            }
        ]
    }
}