{
  "id": "CVE-2026-43187",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-43187",
  "published_at": "2026-05-06T11:27:57.727Z",
  "title": "xfs: delete attr leaf freemap entries when empty",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 8.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: delete attr leaf freemap entries when empty\n\nBack in commit 2a2b5932db6758 (\"xfs: fix attr leaf header freemap.size\nunderflow\"), Brian Foster observed that it's possible for a small\nfreemap at the end of the end of the xattr entries array to experience\na size underflow when subtracting the space consumed by an expansion of\nthe entries array.  There are only three freemap entries, which means\nthat it is not a complete index of all free space in the leaf block.\n\nThis code can leave behind a zero-length freemap entry with a nonzero\nbase.  Subsequent setxattr operations can increase the base up to the\npoint that it overlaps with another freemap entry.  This isn't in and of\nitself a problem because the code in _leaf_add that finds free space\nignores any freemap entry with zero size.\n\nHowever, there's another bug in the freemap update code in _leaf_add,\nwhich is that it fails to update a freemap entry that begins midway\nthrough the xattr entry that was just appended to the array.  That can\nresult in the freemap containing two entries with the same base but\ndifferent sizes (0 for the \"pushed-up\" entry, nonzero for the entry\nthat's actually tracking free space).  A subsequent _leaf_add can then\nallocate xattr namevalue entries on top of the entries array, leading to\ndata loss.  But fixing that is for later.\n\nFor now, eliminate the possibility of confusion by zeroing out the base\nof any freemap entry that has zero size.  Because the freemap is not\nintended to be a complete index of free space, a subsequent failure to\nfind any free space for a new xattr will trigger block compaction, which\nregenerates the freemap.\n\nIt looks like this bug has been in the codebase for quite a long time.",
  "cwe": "CWE-190",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c f3c0d1fc1eadbb4adbee5ab7757d41d35f48325b",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c aa9083d97e2157da3c6fb45ddb1a97af7f188f7f",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c a631899025d47ea1aa6464d76db5b4d3b6d196fd",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c ffaf5c99d0f862db021fb1af8b813c1416b1beb2",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c e1b8c6452ee99a30e188a88f3f3f804fb1c6004a",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c f31a8334e1c54b126fcecf98645a49b6bc5ad399",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 479b05fc3ee272090f671b06a41f3da8aa78eece",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 6f13c1d2a6271c2e73226864a0e83de2770b6f34"
        ],
        "fixed_in": [
          "f3c0d1fc1eadbb4adbee5ab7757d41d35f48325b",
          "aa9083d97e2157da3c6fb45ddb1a97af7f188f7f",
          "a631899025d47ea1aa6464d76db5b4d3b6d196fd",
          "ffaf5c99d0f862db021fb1af8b813c1416b1beb2",
          "e1b8c6452ee99a30e188a88f3f3f804fb1c6004a",
          "f31a8334e1c54b126fcecf98645a49b6bc5ad399",
          "479b05fc3ee272090f671b06a41f3da8aa78eece",
          "6f13c1d2a6271c2e73226864a0e83de2770b6f34"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.12"
        ],
        "fixed_in": [
          "0",
          "5.10.252",
          "5.15.202",
          "6.1.165",
          "6.6.128",
          "6.12.75",
          "6.18.16",
          "6.19.6",
          "7.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to f3c0d1fc1eadbb4adbee5ab7757d41d35f48325b or aa9083d97e2157da3c6fb45ddb1a97af7f188f7f or a631899025d47ea1aa6464d76db5b4d3b6d196fd or ffaf5c99d0f862db021fb1af8b813c1416b1beb2 or e1b8c6452ee99a30e188a88f3f3f804fb1c6004a or f31a8334e1c54b126fcecf98645a49b6bc5ad399 or 479b05fc3ee272090f671b06a41f3da8aa78eece or 6f13c1d2a6271c2e73226864a0e83de2770b6f34 or later.",
      "Upgrade Linux to 0 or 5.10.252 or 5.15.202 or 6.1.165 or 6.6.128 or 6.12.75 or 6.18.16 or 6.19.6 or 7.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
