CVE-2022-49761: btrfs: always report error in run_one_delayed_ref()
In the Linux kernel, the following vulnerability has been resolved:
btrfs: always report error in run_one_delayed_ref()
Currently we have a btrfs_debug() for run_one_delayed_ref() failure, but
if end users hit such problem, there will be no chance that
btrfs_debug() is enabled. This can lead to very little useful info for
debugging.
This patch will:
- Add extra info for error reporting
Including:
* logical bytenr
* num_bytes
* type
* action
* ref_mod
- Replace the btrfs_debug() with btrfs_err()
- Move the error reporting into run_one_delayed_ref()
This is to avoid use-after-free, the @node can be freed in the caller.
This error should only be triggered at most once.
As if run_one_delayed_ref() failed, we trigger the error message, then
causing the call chain to error out:
btrfs_run_delayed_refs()
`- btrfs_run_delayed_refs()
`- btrfs_run_delayed_refs_for_head()
`- run_one_delayed_ref()
And we will abort the current transaction in btrfs_run_delayed_refs().
If we have to run delayed refs for the abort transaction,
run_one_delayed_ref() will just cleanup the refs and do nothing, thus no
new error messages would be output.
Security readout for executives and security teams
Plain-English summary
CVE-2022-49761 is a Linux kernel Btrfs flaw tied to delayed reference error handling. The CVSS score is high because successful local exploitation could affect confidentiality, integrity, and availability. The source bundle does not show internet-remote exploitation or active abuse.
Executive priority
Treat as a high-priority patching item for Linux fleets using Btrfs, especially shared systems with local users. It is not presented as remotely exploitable or actively exploited in the supplied sources.
Technical view
The issue is in Btrfs run_one_delayed_ref() error handling. The upstream fix moves reporting into run_one_delayed_ref(), replaces debug logging with error logging, adds context fields, and avoids using a node after it may be freed. The CVE maps this to CWE-416.
Likely exposure
Exposure is most relevant to Linux systems using Btrfs on affected kernel versions or vendor builds that have not incorporated the referenced stable fixes. Exact distribution exposure must be confirmed against vendor kernel advisories.
Exploitation context
The CVSS vector is local, low complexity, low privileges, no user interaction. The source bundle marks KEV as false and provides no cited evidence of active exploitation.
Researcher notes
The bundle supports a local kernel Btrfs CWE-416 assessment, but lacks distribution-specific fixed packages, proof-of-concept details, and real-world exploitation evidence. Avoid extrapolating beyond upstream stable commits and CVSS metadata.
Mitigation direction
Apply kernel updates containing the referenced upstream stable Btrfs fixes.
Check your Linux distribution security advisory for backported kernel packages.
Prioritize multi-user systems and hosts using Btrfs filesystems.
Limit unnecessary local account access until patched.
Monitor vendor advisories for corrected affected-version guidance.
Validation and detection
Inventory Linux hosts and identify those using Btrfs.
Compare running kernels against vendor fixed versions or referenced stable commits.
Confirm whether distribution kernels backported the Btrfs fix.
Check vulnerability scanners for CVE-2022-49761 coverage and false positives.
Document systems where Btrfs is absent or the kernel is fixed.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-416: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-416 · source CWE mapping
Use After Free
Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.