{
  "id": "CVE-2025-71159",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-71159",
  "published_at": "2026-01-23T15:23:57.824Z",
  "title": "btrfs: fix use-after-free warning in btrfs_get_or_create_delayed_node()",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/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\nbtrfs: fix use-after-free warning in btrfs_get_or_create_delayed_node()\n\nPreviously, btrfs_get_or_create_delayed_node() set the delayed_node's\nrefcount before acquiring the root-\u003edelayed_nodes lock.\nCommit e8513c012de7 (\"btrfs: implement ref_tracker for delayed_nodes\")\nmoved refcount_set inside the critical section, which means there is\nno longer a memory barrier between setting the refcount and setting\nbtrfs_inode-\u003edelayed_node.\n\nWithout that barrier, the stores to node-\u003erefs and\nbtrfs_inode-\u003edelayed_node may become visible out of order. Another\nthread can then read btrfs_inode-\u003edelayed_node and attempt to\nincrement a refcount that hasn't been set yet, leading to a\nrefcounting bug and a use-after-free warning.\n\nThe fix is to move refcount_set back to where it was to take\nadvantage of the implicit memory barrier provided by lock\nacquisition.\n\nBecause the allocations now happen outside of the lock's critical\nsection, they can use GFP_NOFS instead of GFP_ATOMIC.",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= e8513c012de75fd65e2df5499572bc6ef3f6e409, \u003c c8385851a5435f4006281828d428e5d0b0bbf8af",
          "\u003e= e8513c012de75fd65e2df5499572bc6ef3f6e409, \u003c 83f59076a1ae6f5c6845d6f7ed3a1a373d883684"
        ],
        "fixed_in": [
          "c8385851a5435f4006281828d428e5d0b0bbf8af",
          "83f59076a1ae6f5c6845d6f7ed3a1a373d883684"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.18"
        ],
        "fixed_in": [
          "0",
          "6.18.6",
          "6.19"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to c8385851a5435f4006281828d428e5d0b0bbf8af or 83f59076a1ae6f5c6845d6f7ed3a1a373d883684 or later.",
      "Upgrade Linux to 0 or 6.18.6 or 6.19 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
