CVE-2025-21721 (GCVE-0-2025-21721)
Vulnerability from cvelistv5
Published
2025-02-27 02:07
Modified
2025-05-04 07:19
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: nilfs2: handle errors that nilfs_prepare_chunk() may return Patch series "nilfs2: fix issues with rename operations". This series fixes BUG_ON check failures reported by syzbot around rename operations, and a minor behavioral issue where the mtime of a child directory changes when it is renamed instead of moved. This patch (of 2): The directory manipulation routines nilfs_set_link() and nilfs_delete_entry() rewrite the directory entry in the folio/page previously read by nilfs_find_entry(), so error handling is omitted on the assumption that nilfs_prepare_chunk(), which prepares the buffer for rewriting, will always succeed for these. And if an error is returned, it triggers the legacy BUG_ON() checks in each routine. This assumption is wrong, as proven by syzbot: the buffer layer called by nilfs_prepare_chunk() may call nilfs_get_block() if necessary, which may fail due to metadata corruption or other reasons. This has been there all along, but improved sanity checks and error handling may have made it more reproducible in fuzzing tests. Fix this issue by adding missing error paths in nilfs_set_link(), nilfs_delete_entry(), and their caller nilfs_rename().
Impacted products
Vendor Product Version
Linux Linux Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Version: 2ba466d74ed74f073257f86e61519cb8f8f46184
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/nilfs2/dir.c",
            "fs/nilfs2/namei.c",
            "fs/nilfs2/nilfs.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b38c6c260c2415c7f0968871305e7a093daabb4c",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            },
            {
              "lessThan": "f70bd2d8ca454e0ed78970f72147ca321dbaa015",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            },
            {
              "lessThan": "607dc724b162f4452dc768865e578c1a509a1c8c",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            },
            {
              "lessThan": "1ee2d454baa361d2964e3e2f2cca9ee3f769d93c",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            },
            {
              "lessThan": "7891ac3b0a5c56f7148af507306308ab841cdc31",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            },
            {
              "lessThan": "eddd3176b8c4c83a46ab974574cda7c3dfe09388",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            },
            {
              "lessThan": "481136234dfe96c7f92770829bec6111c7c5f5dd",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            },
            {
              "lessThan": "ee70999a988b8abc3490609142f50ebaa8344432",
              "status": "affected",
              "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/nilfs2/dir.c",
            "fs/nilfs2/namei.c",
            "fs/nilfs2/nilfs.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.30"
            },
            {
              "lessThan": "2.6.30",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.291",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.235",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.179",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.131",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.80",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.14",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.291",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.235",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.179",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.131",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.80",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.13",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.2",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "versionStartIncluding": "2.6.30",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T07:19:45.475Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-21721",
    "datePublished": "2025-02-27T02:07:29.784Z",
    "dateReserved": "2024-12-29T08:45:45.753Z",
    "dateUpdated": "2025-05-04T07:19:45.475Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-21721\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-02-27T02:15:15.787\",\"lastModified\":\"2025-03-13T13:15:50.060\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"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().\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nilfs2: manejar errores que nilfs_prepare_chunk() puede devolver Serie de parches \\\"nilfs2: soluciona problemas con operaciones de cambio de nombre\\\". Esta serie corrige los fallos de comprobaci\u00f3n BUG_ON informados por syzbot en torno a las operaciones de cambio de nombre, y un problema de comportamiento menor en el que el mtime de un directorio secundario cambia cuando se le cambia el nombre en lugar de moverlo. Este parche (de 2): Las rutinas de manipulaci\u00f3n de directorios nilfs_set_link() y nilfs_delete_entry() reescriben la entrada del directorio en el folio/p\u00e1gina le\u00eddo previamente por nilfs_find_entry(), por lo que se omite el manejo de errores asumiendo que nilfs_prepare_chunk(), que prepara el b\u00fafer para la reescritura, siempre tendr\u00e1 \u00e9xito para estos. Y si se devuelve un error, activa las comprobaciones BUG_ON() heredadas en cada rutina. Esta suposici\u00f3n es err\u00f3nea, como lo demuestra syzbot: la capa de b\u00fafer llamada por nilfs_prepare_chunk() puede llamar a nilfs_get_block() si es necesario, lo que puede fallar debido a la corrupci\u00f3n de metadatos u otras razones. Esto ha estado ah\u00ed desde siempre, pero las comprobaciones de cordura mejoradas y el manejo de errores pueden haberlo hecho m\u00e1s reproducible en pruebas de fuzzing. Solucione este problema agregando rutas de error faltantes en nilfs_set_link(), nilfs_delete_entry() y su llamador nilfs_rename().\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1ee2d454baa361d2964e3e2f2cca9ee3f769d93c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/481136234dfe96c7f92770829bec6111c7c5f5dd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/607dc724b162f4452dc768865e578c1a509a1c8c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7891ac3b0a5c56f7148af507306308ab841cdc31\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b38c6c260c2415c7f0968871305e7a093daabb4c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/eddd3176b8c4c83a46ab974574cda7c3dfe09388\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ee70999a988b8abc3490609142f50ebaa8344432\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f70bd2d8ca454e0ed78970f72147ca321dbaa015\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

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.
  • 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…