CVE-2023-53804 (GCVE-0-2023-53804)
Vulnerability from cvelistv5
Published
2025-12-09 00:01
Modified
2026-08-05 09:16
Summary
In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode() During unmount process of nilfs2, nothing holds nilfs_root structure after nilfs2 detaches its writer in nilfs_detach_log_writer(). However, since nilfs_evict_inode() uses nilfs_root for some cleanup operations, it may cause use-after-free read if inodes are left in "garbage_list" and released by nilfs_dispose_list() at the end of nilfs_detach_log_writer(). Fix this issue by modifying nilfs_evict_inode() to only clear inode without additional metadata changes that use nilfs_root if the file system is degraded to read-only or the writer is detached.
Impacted products
Vendor Product Version
Linux Linux Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Version: e912a5b66837ee89fb025e67b5efeaa11930c2ce
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/nilfs2/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f31e18131ee2ce80a4da5c808221d25b1ae9ad6d",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            },
            {
              "lessThan": "2a782ea8ebd712a458466e3103e2881b4f886cb5",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            },
            {
              "lessThan": "116d53f09ff52e6f98e3fe1f85d8898d6ba26c68",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            },
            {
              "lessThan": "6b4205ea97901f822004e6c8d59484ccfda03faa",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            },
            {
              "lessThan": "b8427b8522d9ede53015ba45a9978ba68d1162f5",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            },
            {
              "lessThan": "acc2a40e428f12780004e1e9fce4722d88f909fd",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            },
            {
              "lessThan": "fb8e8d58f116d069e5939e1f786ac84e7fa4533e",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            },
            {
              "lessThan": "9b5a04ac3ad9898c4745cba46ea26de74ba56a8e",
              "status": "affected",
              "version": "e912a5b66837ee89fb025e67b5efeaa11930c2ce",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/nilfs2/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.37"
            },
            {
              "lessThan": "2.6.37",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.316",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.284",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.244",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.181",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.113",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.30",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.3.*",
              "status": "unaffected",
              "version": "6.3.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.4",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.316",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.284",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.244",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.181",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.113",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.30",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.3.4",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.4",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()\n\nDuring unmount process of nilfs2, nothing holds nilfs_root structure after\nnilfs2 detaches its writer in nilfs_detach_log_writer().  However, since\nnilfs_evict_inode() uses nilfs_root for some cleanup operations, it may\ncause use-after-free read if inodes are left in \"garbage_list\" and\nreleased by nilfs_dispose_list() at the end of nilfs_detach_log_writer().\n\nFix this issue by modifying nilfs_evict_inode() to only clear inode\nwithout additional metadata changes that use nilfs_root if the file system\nis degraded to read-only or the writer is detached."
        }
      ],
      "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 flaw is reached only through a locally mounted nilfs2 volume \u2014 attacker-supplied on-disk metadata plus ordinary local file syscalls and the unmount path; nothing in fs/nilfs2 parses data from a remote peer.\nAC:L - The attacker fully authors the on-disk image, so the `__nilfs_error()`\u2192`SB_RDONLY` degeneration and the resulting `-EROFS` bail in `nilfs_segctor_do_construct()` are deterministic, and the free-then-use ordering inside `nilfs_detach_log_writer()` is a fixed code sequence rather than a race; syzbot reproduced it reliably.\nPR:L - An unprivileged local desktop/kiosk user is enough: udisks2/polkit lets an active local session mount and eject removable media without a password, and the writes that strand inodes on `ns_dirty_files` are ordinary unprivileged VFS operations \u2014 matching the PR:L assigned to the same-family nilfs2 crafted-image CVEs.\nUI:N - On an auto-mounting host the attacker performs every step themselves \u2014 supply the image, dirty the inodes, trigger the eject/unmount \u2014 so no action by a separate victim is required.\nS:U - The freed `nilfs_root` and `ifile` objects and any resulting corruption stay entirely within the kernel\u0027s own security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - After `kfree(root)`, `nilfs_evict_inode()` reads `ii-\u003ei_root-\u003eifile` from a reclaimable general-purpose slab object and passes it to `nilfs_ifile_get_inode_block()`/`nilfs_palloc_*`, so a groomed replacement object yields an attacker-chosen inode pointer and arbitrary kernel memory read; `root-\u003eifile` itself is also already freed and its address_space is read out of freed memory.\nI:H - `atomic64_dec(\u0026ii-\u003ei_root-\u003einodes_count)` writes directly into the freed slab object at a fixed offset, and `nilfs_ifile_delete_inode()` performs `raw_inode-\u003ei_flags = 0` plus `mark_buffer_dirty()` through the attacker-reclaimable `-\u003eifile` pointer, giving write primitives suitable for control-flow hijacking as well as corrupting ifile/allocator metadata written back to disk.\nA:H - This is a use-after-free that syzbot detected via KASAN; dereferencing the freed `nilfs_root` and the already-`iput()`ed ifile inode during unmount readily oopses or panics the kernel, and the corruption drives further filesystem failure."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T09:16:07.269Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f31e18131ee2ce80a4da5c808221d25b1ae9ad6d"
        },
        {
          "url": "https://git.kernel.org/stable/c/2a782ea8ebd712a458466e3103e2881b4f886cb5"
        },
        {
          "url": "https://git.kernel.org/stable/c/116d53f09ff52e6f98e3fe1f85d8898d6ba26c68"
        },
        {
          "url": "https://git.kernel.org/stable/c/6b4205ea97901f822004e6c8d59484ccfda03faa"
        },
        {
          "url": "https://git.kernel.org/stable/c/b8427b8522d9ede53015ba45a9978ba68d1162f5"
        },
        {
          "url": "https://git.kernel.org/stable/c/acc2a40e428f12780004e1e9fce4722d88f909fd"
        },
        {
          "url": "https://git.kernel.org/stable/c/fb8e8d58f116d069e5939e1f786ac84e7fa4533e"
        },
        {
          "url": "https://git.kernel.org/stable/c/9b5a04ac3ad9898c4745cba46ea26de74ba56a8e"
        }
      ],
      "title": "nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-53804",
    "datePublished": "2025-12-09T00:01:01.787Z",
    "dateReserved": "2025-12-08T23:58:35.276Z",
    "dateUpdated": "2026-08-05T09:16:07.269Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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…