CVE-2025-71159 (GCVE-0-2025-71159)
Vulnerability from cvelistv5 – Published: 2026-01-23 15:23 – Updated: 2026-01-23 15:23
VLAI?
Title
btrfs: fix use-after-free warning in btrfs_get_or_create_delayed_node()
Summary
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix use-after-free warning in btrfs_get_or_create_delayed_node()
Previously, btrfs_get_or_create_delayed_node() set the delayed_node's
refcount before acquiring the root->delayed_nodes lock.
Commit e8513c012de7 ("btrfs: implement ref_tracker for delayed_nodes")
moved refcount_set inside the critical section, which means there is
no longer a memory barrier between setting the refcount and setting
btrfs_inode->delayed_node.
Without that barrier, the stores to node->refs and
btrfs_inode->delayed_node may become visible out of order. Another
thread can then read btrfs_inode->delayed_node and attempt to
increment a refcount that hasn't been set yet, leading to a
refcounting bug and a use-after-free warning.
The fix is to move refcount_set back to where it was to take
advantage of the implicit memory barrier provided by lock
acquisition.
Because the allocations now happen outside of the lock's critical
section, they can use GFP_NOFS instead of GFP_ATOMIC.
Severity ?
No CVSS data available.
Assigner
References
Impacted products
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"fs/btrfs/delayed-inode.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "c8385851a5435f4006281828d428e5d0b0bbf8af",
"status": "affected",
"version": "e8513c012de75fd65e2df5499572bc6ef3f6e409",
"versionType": "git"
},
{
"lessThan": "83f59076a1ae6f5c6845d6f7ed3a1a373d883684",
"status": "affected",
"version": "e8513c012de75fd65e2df5499572bc6ef3f6e409",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"fs/btrfs/delayed-inode.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "6.18"
},
{
"lessThan": "6.18",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.18.*",
"status": "unaffected",
"version": "6.18.6",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.19-rc5",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.18.6",
"versionStartIncluding": "6.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.19-rc5",
"versionStartIncluding": "6.18",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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\u0027s\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\u0027t 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\u0027s critical\nsection, they can use GFP_NOFS instead of GFP_ATOMIC."
}
],
"providerMetadata": {
"dateUpdated": "2026-01-23T15:23:57.824Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/c8385851a5435f4006281828d428e5d0b0bbf8af"
},
{
"url": "https://git.kernel.org/stable/c/83f59076a1ae6f5c6845d6f7ed3a1a373d883684"
}
],
"title": "btrfs: fix use-after-free warning in btrfs_get_or_create_delayed_node()",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2025-71159",
"datePublished": "2026-01-23T15:23:57.824Z",
"dateReserved": "2026-01-13T15:30:19.665Z",
"dateUpdated": "2026-01-23T15:23:57.824Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"nvd": "{\"cve\":{\"id\":\"CVE-2025-71159\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-01-23T16:15:52.793\",\"lastModified\":\"2026-01-26T15:03:51.687\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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\u0027s\\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\u0027t 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\u0027s critical\\nsection, they can use GFP_NOFS instead of GFP_ATOMIC.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/83f59076a1ae6f5c6845d6f7ed3a1a373d883684\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c8385851a5435f4006281828d428e5d0b0bbf8af\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…