CVE-2023-54140 (GCVE-0-2023-54140)
Vulnerability from cvelistv5
Published
2025-12-24 13:06
Modified
2026-08-05 09:17
Summary
In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse A syzbot stress test using a corrupted disk image reported that mark_buffer_dirty() called from __nilfs_mark_inode_dirty() or nilfs_palloc_commit_alloc_entry() may output a kernel warning, and can panic if the kernel is booted with panic_on_warn. This is because nilfs2 keeps buffer pointers in local structures for some metadata and reuses them, but such buffers may be forcibly discarded by nilfs_clear_dirty_page() in some critical situations. This issue is reported to appear after commit 28a65b49eb53 ("nilfs2: do not write dirty data after degenerating to read-only"), but the issue has potentially existed before. Fix this issue by checking the uptodate flag when attempting to reuse an internally held buffer, and reloading the metadata instead of reusing the buffer if the flag was lost.
Impacted products
Vendor Product Version
Linux Linux Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Version: 8c26c4e2694a163d525976e804d81cd955bbb40c
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/nilfs2/alloc.c",
            "fs/nilfs2/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "473795610594f261e98920f0945550314df36f07",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "d95e403588738c7ec38f52b9f490b15e7745d393",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "99a73016a5e12a09586a96f998e91f9ea145cd00",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "f1d637b63d8a27ac3386f186a694907f2717fc13",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "b911bef132a06de01a745c6a24172d6db7216333",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "4da07e958bfda2d69d83db105780e8916e3ac02e",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "46c11be2dca295742a5508ea910a77f7733fb7f4",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "b308b3eabc429649b5501d36290cea403fbd746c",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            },
            {
              "lessThan": "cdaac8e7e5a059f9b5e816cda257f08d0abffacd",
              "status": "affected",
              "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/nilfs2/alloc.c",
            "fs/nilfs2/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.10"
            },
            {
              "lessThan": "3.10",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.326",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.295",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.257",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.195",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.131",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.52",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.4.*",
              "status": "unaffected",
              "version": "6.4.15",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.5.*",
              "status": "unaffected",
              "version": "6.5.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.6",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.326",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.295",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.257",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.195",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.131",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.52",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.4.15",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.5.2",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse\n\nA syzbot stress test using a corrupted disk image reported that\nmark_buffer_dirty() called from __nilfs_mark_inode_dirty() or\nnilfs_palloc_commit_alloc_entry() may output a kernel warning, and can\npanic if the kernel is booted with panic_on_warn.\n\nThis is because nilfs2 keeps buffer pointers in local structures for some\nmetadata and reuses them, but such buffers may be forcibly discarded by\nnilfs_clear_dirty_page() in some critical situations.\n\nThis issue is reported to appear after commit 28a65b49eb53 (\"nilfs2: do\nnot write dirty data after degenerating to read-only\"), but the issue has\npotentially existed before.\n\nFix this issue by checking the uptodate flag when attempting to reuse an\ninternally held buffer, and reloading the metadata instead of reusing the\nbuffer if the flag was lost."
        }
      ],
      "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 through ordinary local filesystem syscalls (mkdir, write, unlink) against a mounted nilfs2 volume, plus attacker-supplied on-disk image content; there is no network-facing path into fs/nilfs2.\nAC:L - The attacker fully controls both preconditions \u2014 a crafted corrupted nilfs2 image drives the deterministic __nilfs_error()/read-only degeneration that force-clears the buffers, and the attacker\u0027s own subsequent syscall reuses the stale cached buffer; syzbot has a reliable reproducer.\nPR:L - Once the volume is mounted, an unprivileged local user triggers the reuse through unprivileged VFS operations with no capability check on the path; the image reaches the kernel via removable media that desktop/kiosk auto-mounters mount without user privilege, matching the PR:L assigned to the same-family nilfs2 buffer-state CVEs.\nUI:N - On an auto-mounting host or an already-mounted shared nilfs2 volume, the attacker\u0027s own syscalls are sufficient and no victim action is needed to reach the vulnerable reuse.\nS:U - The corrupted buffer state and resulting panic are confined to the kernel\u0027s own security authority with no crossing into a hypervisor, IOMMU, or other authority.\nC:H - Reusing a discarded, non-uptodate buffer makes nilfs2 commit stale ifile/DAT allocator bitmaps, so the same inode number or DAT virtual blocknr can be handed out twice and distinct files alias the same on-disk blocks, exposing other users\u0027 file contents.\nI:H - mark_buffer_dirty() on a stale, unmapped buffer causes garbage inode blocks and allocator bitmaps to be written into the log, corrupting on-disk metadata and enabling cross-file block aliasing \u2014 arbitrary modification of data the attacker does not own.\nA:H - The reuse hits WARN_ON_ONCE(!buffer_uptodate(bh)) in mark_buffer_dirty(), which is an outright kernel panic on panic_on_warn systems, and the resulting buffer-state inconsistency drives further filesystem failures."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T09:17:35.344Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/473795610594f261e98920f0945550314df36f07"
        },
        {
          "url": "https://git.kernel.org/stable/c/d95e403588738c7ec38f52b9f490b15e7745d393"
        },
        {
          "url": "https://git.kernel.org/stable/c/99a73016a5e12a09586a96f998e91f9ea145cd00"
        },
        {
          "url": "https://git.kernel.org/stable/c/f1d637b63d8a27ac3386f186a694907f2717fc13"
        },
        {
          "url": "https://git.kernel.org/stable/c/b911bef132a06de01a745c6a24172d6db7216333"
        },
        {
          "url": "https://git.kernel.org/stable/c/4da07e958bfda2d69d83db105780e8916e3ac02e"
        },
        {
          "url": "https://git.kernel.org/stable/c/46c11be2dca295742a5508ea910a77f7733fb7f4"
        },
        {
          "url": "https://git.kernel.org/stable/c/b308b3eabc429649b5501d36290cea403fbd746c"
        },
        {
          "url": "https://git.kernel.org/stable/c/cdaac8e7e5a059f9b5e816cda257f08d0abffacd"
        }
      ],
      "title": "nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-54140",
    "datePublished": "2025-12-24T13:06:54.784Z",
    "dateReserved": "2025-12-24T13:02:52.522Z",
    "dateUpdated": "2026-08-05T09:17:35.344Z",
    "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…